GlassFish is Universal

Today, we are gathered to celebrate a new achievement of the GlassFish community.

After being used by a vibrant community around the world, GlassFish is the first application server officially adopted by Aliens. We are now Universal

The delegate from the Meelaneese race, a mate called "Robertoch Inni Ci" (nicely pictured here) has signed an extensive agreement to use and enhance the GlassFish Project.

You can learn more from our new GlassFisher friend from his blog, and although he talks about moons, his actual planet location remains a mystery.
Ok le'ts be serious for minute. Starting with build 40, the two native binaries used by the application server are now universal binaries which mean they run on PowerPC as well as the new exciting Intel based Macs.

Here are my findings and adventures on how to transition your JNI libraries to universal binaries.
One of these native component, the libcliutil.jnilib which is a JNI library used to implement one function so we don't echo the password when using the asadmin command in interactive mode. The other component, called the native launcher was used in 8.x to launch the application server with the right JVM parameters. It has since then been replaced with a Java Launcher but we keep this version for backward compatibility reasons.

The changes to support cross compilation were actually not that easy to find, the reason being that Apple's documentation (although being very nicely written and presented) rely too much on XCode to build your native binaries. Well, some folks still want to use good old makefiles to build their software and that was not easy to find the appropriate gcc flags :

-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk

The -isysroot is very important when you use a PowerPC based Mac since they have the universal and PPC SDKs installed. With an Intel Mac, you only have the universal installed or at least it is the default one. If you do not add this option, you will get this kind of exception :

/usr/lib/libSystem.B.dylib does not contain an architecture that matches the specified -arch flag: i386

Now you may think that I am lucky to own all this Apple hardware, and indeed, my wife works at Apple afterall :).

This time however, I didn't get to own the Intel iMac I used to change the makefiles, I got the machine from James Gosling who was kind enough to lend me his iMac for some time so I could do this. And that machine (entry level 17inch iMac) really suprised me how fast it was. I am ready to trade my dual PowerMac G5 for those anytime !

I just wished that working on James Gosling's machine made me smarter... well that's a totally different story !
Comments:

Post a Comment:
Comments are closed for this entry.
About

dochez

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today