Aug
26
2009
I am going to go over setting up Glassfish Enterprise v2.1 in a windows clustered high availability environment. For this we will be using two Windows 2003 servers with two network interface cards (NIC) in each server that are network loadbalanced, 2 instances of IIS as the web container and 4 instances of glassfish with HADB behind IIS. You may ask why, and the reason is simply those were the technologies I had to work with; my task was to move from JBOSS to Glassfish. I will attempt to go over this setup in great detail, so as anyone with a basic understanding of these technologies should be able to get this running. For all of the images in the post, click on them for a full size version.
Continue reading
1 comment | tags: Cluster, Glassfish, HADB, IIS, JAVA, NLB, Server, windows | posted in Software
Aug
13
2009
Just a quick note about a simple but annoying error I encountered when porting an app to glassfish; The code in question was as follows:
...
Charset charset = Charset.forName("UTF-8");
CharsetEncoder encoder = charset.newEncoder();
ByteBuffer bbuf = encoder.encode(CharBuffer.wrap(str));
SecretKeySpec key = new SecretKeySpec( KEY_BASE, "DES" );
private static Cipher ecipher = Cipher.getInstance( "DES");
ecipher.init( Cipher.ENCRYPT_MODE, key );
byte[] enc = ecipher.doFinal( bbuf.array() );
...
The code above just converts a string (stored as str here) to UTF-8 then encrypts it using DES. Equivalently you could use str.getBytes() for the UTF conversion. The code above worked fine on JBOSS, and worked fine stand alone. It even worked on my glassfish test server, however when deployed on glassfish enterprise I started getting the following stacktrace: Continue reading
5 comments | tags: Glassfish, JAVA, JBoss, Security | posted in Software
Aug
2
2009
First day out on Hoosier R-Compound Tires. More Later.
no comments | posted in Events, Racing