users@glassfish.java.net

Re: How to run both 64 and 32 bit JVM in Glassfish

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Wed, 03 Feb 2010 12:28:05 -0500

The config/domain.xml doesn't allow you to pick a JVM, however; only to
configure it.

In V2, you will need a completely different installation of glassfish,
because it will always use the JVM defined as AS_JAVA in the
config/asenv.conf file (that is the /path_to_glassfish/config directory;
not the domain config directory). That variable must be defined in V2.

In v3, if that variable isn't in the asenv.conf file, then glassfish
will use whatever java binary is in your path. So you could have
separate domains started in separate shells with different paths running
the different domains.

However, as always I'm curious as to what use case you have for a 64-bit
JVM -- meaning does your heap really consume more than 3.5GB? If you're
caching database values (JPA does that pretty much automatically) then
that's one reason, but I'd be interested to hear another reason if it
applies.

Also, I completely agree with Alexis that the best workaround is to use
a Java alternative :-)

-Scott

n 02/03/10 12:16, Alexis Moussine-Pouchkine wrote:
> you cannot load 32-bit shared-lib in a64-bit JVM.
> you'll have to use another process and thus another GlassFish domain, the config/domain.xml has a section for configuring the JVM.
> the best workaround to using a native library is to use a Java alternative ;)
> -Alexis
>
> On 3 févr. 2010, at 18:12, glassfish_at_javadesktop.org wrote:
>
>> I have Glassfish running on a Redhat server using a 64 bit JVM. However, I need to load and run a 32 bit native library that will be called using the Java Native Interface (JNI). This requires the 32 bit JVM.
>>
>> I had to install a 32 bit JVM to do this with Tomcat. However, I don't want to limit Glassfish to only a 32 bit JVM.
>>
>> My question is, how do I configure Glassfish to run both 64 and 32 bit JVMs? Is this a domain level configuration? Do I need to install 2 complete Glassfish web servers to accomplish this?
>>
>> I'd also be interested in the simplest way to work around the native library class loading problem.
>>
>> Thanks
>> [Message sent by forum member 'superstition_free' (superstition_free_at_yahoo.com)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=384560
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>