Running Geronimo on Harmony
This article describes the ways and known issues to run Geronimo v2.0.2 using Apache Harmony as a JVM.
This article has the following structure:
Geronimo configuration
Configure the server to use Harmony RMI Registry provider for JNDI
Harmony places JNDI providers in org.apache.harmony.jndi
package tree, not in com.sun.jndi
like Sun Java does, so you have to point Geronimo into the right direction to locate and properly access the RMI Registry provider.
For that, edit var/config/config.xml
file, adjust NamingProperties GBean configuration as follows:
<gbean name="NamingProperties"> <attribute name="namingFactoryUrlPkgs">org.apache.harmony.jndi.provider</attribute> <attribute name="namingProviderUrl">rmi://${ServerHostname}:${NamingPort + PortOffset}</attribute> </gbean>
Use TLS instead of SSL
Harmony doesn't have SSL implementation, so the following statements have to be added to var/config/config.xml
file to instruct Geronimo to use TLS instead of SSL:
<module name="org.apache.geronimo.configs/j2ee-corba-yoko/2.0.2/car"> <gbean name="CORBASSLConfig"> <attribute name="protocol">TLS</attribute> </gbean> </module>
Change default keystore type
Geronimo uses JKS keystore that Harmony doesn't support. For now, there's no way to workaround this problem except by patching the Geronimo source code. See GERONIMO-2015 for details.
Customize the server startup
You may either edit the Geronimo startup scripts or run the server from the command line, but in either case you should make the following adjustments:
1. Harmony doesn't accept the -javaagent
option, so you have to omit it.
2. Geronimo v2.0.2 needs access to Internet for applications like SPECjAppServer2004 to be deployed – it tries to fetch XML schemas from http://java.sun.com site. So if you're going to deploy applications like that, and you're behind a firewall, you should add the appropriate -Dhttp.proxyHost=
and -Dhttp.proxyPort=
options to the Geronimo command line. This problem is caused by OPENEJB-700 bug and should disappear after that bug is fixed and the fix is propagated to a new version of Geronimo.
So, your final startup line may look like this:
java -Xms256M -Xmx512M -Djava.endorsed.dirs=lib/endorsed -Dhttp.proxyHost=your.proxy -Dhttp.proxyPort=8080 -jar bin/server.jar
Configure Deployer to use Harmony RMI Registry provider for JNDI
The Geronimo Deployer doesn't use the var/config/config.xml
file (see above), so the JNDI configuration needs to be supplied through the system properties, like this:
java -Djava.naming.factory.url.pkgs=org.apache.harmony.jndi.provider -jar bin/deployer.jar ...
Harmony Configuration
Use DRLVM
You should use DRLVM (Harmony VM) to run Geronimo.
Harmony also supports IBM J9 VM, but Geronimo doesn't work with it, as Geronimo relies on java.util.concurrent
package that requires a proper implementation of sun.misc.Unsafe
class that is missing in IBM J9 VM.