blob: aa7551d0e0430d4081f7f97c6ed1c297ebb1854f [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>OpenEJB and Geronimo --
Running the test suite on Geronimo 1.0 M1</title><link href="default.css" rel="stylesheet"><link href="/images/favicon.ico" rel="SHORTCUT ICON"></head><body marginwidth="0" marginheight="0" leftmargin="0" bottommargin="0" topmargin="0" vlink="#6763a9" link="#6763a9" bgcolor="#ffffff"><a name="top"></a><table height="400" width="712" cellspacing="0" cellpadding="0" border="0"><tr><td bgcolor="#7270c2" align="left" valign="top" width="20"><img border="0" height="1" width="1" src="images/dotTrans.gif"></td><td bgcolor="#7270c2" align="left" valign="top" width="95"><img border="0" height="1" width="1" src="images/dotTrans.gif"></td><td align="left" valign="top" width="7"><img height="1" width="1" border="0" src="images/dotTrans.gif"></td><td align="left" valign="top" width="40"><img border="0" height="6" width="40" src="images/dotTrans.gif"></td><td bgcolor="#5A5CB8" align="left" valign="top" width="430"><img border="0" height="6" width="430" src="images/top_2.gif"></td><td bgcolor="#E24717" align="left" valign="top" width="120"><img src="images/top_3.gif" width="120" height="6" border="0"></td></tr><tr><td align="left" valign="top" bgcolor="#7270c2" width="20"><img height="1" width="1" border="0" src="images/dotTrans.gif"></td><td align="left" valign="top" bgcolor="#7270c2" width="95"><img height="1" width="1" border="0" src="images/dotTrans.gif"></td><td align="left" valign="top" bgcolor="#ffffff" width="7"></td><td align="left" valign="top" width="40"><img border="0" height="1" width="1" src="images/dotTrans.gif"></td><td align="left" valign="middle" width="430"><a href="faq.html"><span class="menuTopOff">[ f a q ]</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wiki.codehaus.org/openejb"><span class="menuTopOff">[ w i k i ]</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://archive.openejb.codehaus.org/user/"><span class="menuTopOff">[ l i s t s ]</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://cvs.openejb.org/"><span class="menuTopOff">[ c v s ]</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://jira.codehaus.org/secure/BrowseProject.jspa?id=10401"><span class="menuTopOff">[ b u g s ]</span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img border="0" height="2" width="1" src="images/dotTrans.gif"></td><td align="left" valign="top" height="20" width="120">&nbsp;</td></tr><tr><td align="left" valign="top" bgcolor="#7270c2" width="20"><img border="0" height="3" width="20" src="images/dotTrans.gif"></td><td align="left" valign="top" bgcolor="#7270c2" width="95"><img border="0" height="3" width="105" src="images/line_sm.gif"></td><td align="left" valign="top" bgcolor="#a9a5de" width="7"><img border="0" height="3" width="7" src="images/line_sm.gif"></td><td align="left" valign="top" width="40"><img border="0" height="3" width="40" src="images/line_light.gif"></td><td align="left" valign="top" width="430"><img border="0" height="3" width="430" src="images/line_light.gif"></td><td align="left" valign="top" width="120"><img height="1" width="1" border="0" src="images/dotTrans.gif"></td></tr><tr><td align="left" valign="top" bgcolor="#7270c2"><img border="0" height="10" width="20" src="images/dotTrans.gif"></td><td align="left" valign="top" bgcolor="#7270c2" width="95"><img border="0" height="2" width="1" src="images/dotTrans.gif"><br><table cellspacing="0" cellpadding="0" border="0"><tr><td align="left" valign="top"><span class="subMenuOn">Main</span></td></tr><tr><td align="left" valign="top"><a href="index.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Welcome!</span></a></td></tr><tr><td align="left" valign="top"><a href="download.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Download</span></a></td></tr><tr><td align="left" valign="top"><a href="lists.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Mailing Lists</span></a></td></tr><tr><td align="left" valign="top"><a href="cvs.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Source Code</span></a></td></tr><tr><td align="left" valign="top"><a href="contributors.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
The Team</span></a></td></tr><tr><td align="left" valign="top"><a href="status.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Status</span></a></td></tr></table><table cellspacing="0" cellpadding="0" border="0"><tr><td align="left" valign="top"><span class="subMenuOn">Users</span></td></tr><tr><td align="left" valign="top"><a href="quickstart.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Quickstart</span></a></td></tr><tr><td align="left" valign="top"><a href="hello-world.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Hello World!</span></a></td></tr><tr><td align="left" valign="top"><a href="cmp_entity_postgresql.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
CMP Example</span></a></td></tr><tr><td align="left" valign="top"><a href="cmp_guide.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
CMP Guide</span></a></td></tr><tr><td align="left" valign="top"><a href="deploy.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Deploy</span></a></td></tr><tr><td align="left" valign="top"><a href="start-command.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Startup</span></a></td></tr><tr><td align="left" valign="top"><a href="validate.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Validation</span></a></td></tr><tr><td align="left" valign="top"><a href="config_containers.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Configuration</span></a></td></tr><tr><td align="left" valign="top"><a href="properties.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Properties</span></a></td></tr></table><table cellspacing="0" cellpadding="0" border="0"><tr><td align="left" valign="top"><span class="subMenuOn">Servers</span></td></tr><tr><td align="left" valign="top"><a href="embedded.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Local Server</span></a></td></tr><tr><td align="left" valign="top"><a href="remote-server.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Remote Server</span></a></td></tr><tr><td align="left" valign="top"><a href="tomcat.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Tomcat</span></a></td></tr><tr><td align="left" valign="top"><a href="geronimo.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Geronimo</span></a></td></tr></table><table cellspacing="0" cellpadding="0" border="0"><tr><td align="left" valign="top"><span class="subMenuOn">Integrators</span></td></tr><tr><td align="left" valign="top"><a href="whyopenejb.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Why OpenEJB</span></a></td></tr><tr><td align="left" valign="top"><a href="containersystem.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Overview</span></a></td></tr><tr><td align="left" valign="top"><a href="design_openejb.html"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Design</span></a></td></tr><tr><td align="left" valign="top"><a href="OpenEJB_presentaion.ppt"><span class="subMenuOff">&nbsp;&nbsp;&nbsp;
Presentation</span></a></td></tr></table><img border="0" height="15" width="1" src="images/dotTrans.gif"><br><img border="0" height="3" width="105" src="images/line_sm.gif"><br><A href="http://codehaus.org"><IMG alt="The Codehaus" border="0" height="17" width="88" src="http://www.openejb.org/codehaus-smaller.png"></A></td><td align="left" valign="top" bgcolor="#a9a5de" width="7">&nbsp;</td><td align="left" valign="top" width="40">&nbsp;</td><td valign="top" width="430" rowspan="4"><table width="430" cellspacing="0" cellpadding="0" border="0" rows="2" cols="1"><tr><td align="left" valign="top"><br><img width="200" vspace="0" src="./images/logo_ejb2.gif" hspace="0" height="55" border="0"><br><img src="images/dotTrans.gif" hspace="0" height="7" border="0"><br><span class="pageTitle">OpenEJB and Geronimo</span><br><span class="pageSubTitle">Running the test suite on Geronimo 1.0 M1</span><br><img src="images/dotTrans.gif" hspace="0" height="1" border="0"></td></tr></table><p></p><br><a name="example"><h2>Wanna really big example?</h2></a>
<p><span class="bodyBlack">
OpenEJB has a pretty slick integration test suite that it's been using over the years. The test suite is
basically a plain Java client and about 19 large EJBs. Ok, so maybe the client isn't so plain, its a spicy
JUnit test suite, but does interact with the server in a completely standards compliant way.
</span></p>
<p><span class="bodyBlack">
We packaged the whole thing up so you can see what is required to deploy an EJB jar in the server and
run a client against it. If you are just curious as to what the ejb jar looks like, you can just
<a href="http://openejb.codehaus.org/2.0M1/example-app/openejb-itests-beans2/"> look at an unpacked version</a>.
</span></p>
<a name="before"><h2>Before we start</h2></a>
<p><span class="bodyBlack">
We assume you have downloaded and installed Geronimo 1.0 M1. If you haven't, you can grab that <a href="http://www.apache.org/dist/">here</a>.
Installation for Geronimo is pretty simple, you just download a tar or zip and unpack it.
</span></p>
<p><span class="bodyBlack">
We also assume you have <a href="http://ant.apache.org/">Ant</a> installed. Ant isn't required to use
Geronimo, we just whipped up an ant <a href="http://openejb.codehaus.org/2.0M1/example-app/build.xml">build.xml</a> to use in this example so you don't have to use the command line deployer and muck
with classpaths. To see if you have Ant setup well enough to run this example, just type this on a command line
</span></p>
<p><span class="bodyBlack">
<span class="command">C:\&gt; ant -version</span>
</span></p>
<p><span class="bodyBlack">
If you don't see something like "Apache Ant version 1.6.0 compiled on December 18 2003" printed out, then ant isn't installed correctly on your system and you should get that setup before continuing.
</span></p>
<p><span class="bodyBlack">
Last thing you need is the example. Grab a tar.gz or zip <a href="http://openejb.codehaus.org/2.0M1/">here</a>. When you get that downloaded and unpacked, you just a have to crack open the build.xml file and set the "geronimo.home" property in the build.xml to the location in which you installed Geronimo 1.0-M1. So something like "C:\mystuff\incubator-geronimo-1.0-M1".
</span></p>
<a name="deploy"><h2>Deploying the EJBs with Ant</h2></a>
<p><span class="bodyBlack">Ok, you got all the setup garbage out of the way. Time for some action!
</span></p>
<p><span class="bodyBlack">Run the following command to deploy the EJBs and a JCA connector for database access.</span></p>
<p><span class="bodyBlack">
<span class="command">C:\example-app&gt; ant install</span>
</span></p>
<p><span class="bodyBlack">You should see the following output:</span></p>
<p><span class="bodyBlack">
<table width="440" cellspacing="0" cellpadding="0" border="0"><tr><td bgcolor="#e0e0e0"><span class="code-block"><pre>
Buildfile: build.xml
install:
[echo] Installing the Axion Datasource
[echo] Installing the OpenEJB Integration Test Suite
BUILD SUCCESSFUL
Total time: 22 seconds
</pre></span></td></tr></table>
</span></p>
<p><span class="bodyBlack">If everything went OK, then contratulations are in order. You just deployed your first set of EJBs into Geronimo! If you see something like <a href="http://openejb.codehaus.org/2.0M1/example-app-bad-setup.txt">this instead</a>, the geronimo.home property was not set correctly. Double check the path you used in the build.xml during the "Before we start" section.</span></p>
<a name="deploy.noant"><h2>Deploying the EJBs without Ant</h2></a>
<p><span class="bodyBlack">If your not particulary keen on using ant, you could do the same thing right from the command line using the following commands:</span></p>
<p><span class="bodyBlack"><span class="command">C:\example-app&gt; java -jar %geronimo_home%\bin\deployer.jar --install --module openejb-jca-2.0M1.rar</span></span></p>
<p><span class="bodyBlack"><span class="command">C:\example-app&gt; java -jar %geronimo_home%\bin\deployer.jar --install --module openejb-itests-beans2.jar</span></span></p>
<p><span class="bodyBlack">The first command deployed the OpenEJB JCA-JDBC resource adapter with Axion as the default datasource. The second command deployed the test EJBs.</span></p>
<p><span class="bodyBlack">We are assuming you set up a %geronimo_home% environment variable pointing to the directory where Geronimo lives. If you don't know how to setup environment variables, you can just type the full path of the deployer.jar. So maybe something like this:</span></p>
<p><span class="bodyBlack"><span class="command">C:\example-app&gt; java -jar C:\incubator-geronimo-1.0-M1\bin\deployer.jar ...</span></span></p>
<a name="server"><h2>Starting the server</h2></a>
<p><span class="bodyBlack">Next, move to the directory where you installed Geronimo and type the following start command</span></p>
<p><span class="bodyBlack"><span class="command">C:\example-app&gt; cd C:\incubator-geronimo-1.0-M1</span></span></p>
<p><span class="bodyBlack"><span class="command">C:\incubator-geronimo-1.0-M1&gt; java -jar bin/server.jar org/openejb/itests</span></span></p>
<p><span class="bodyBlack">You should see the following output:</span></p>
<p><span class="bodyBlack">
<table width="440" cellspacing="0" cellpadding="0" border="0"><tr><td bgcolor="#e0e0e0"><span class="code-block"><pre>
18:25:08,105 INFO [Kernel] Starting boot
18:25:08,335 INFO [MBeanServerFactory] Created MBeanServer with ID: b8f675:fc2e493566:-8000:dain.local:1
18:25:08,941 INFO [Kernel] Booted
18:25:08,999 INFO [ConfigurationManager] Loaded Configuration geronimo.config:name="org/apache/geronimo/System"
18:25:09,518 INFO [Configuration] Started configuration org/apache/geronimo/System
18:25:09,600 INFO [ReadOnlyRepository] Repository root is file:/C:/incubator-geronimo-1.0-M1/repository/
18:25:09,686 INFO [ConfigurationManager] Loaded Configuration geronimo.config:name="org/openejb/itests"
18:25:09,719 INFO [ConfigurationManager] Loaded Configuration geronimo.config:name="org/openejb/connector/axion"
18:25:09,753 INFO [ConfigurationManager] Loaded Configuration geronimo.config:name="org/apache/geronimo/Server"
18:25:10,761 INFO [LogSupport] Log instance is class org.apache.geronimo.kernel.log.GeronimoLog
18:25:11,581 INFO [Configuration] Started configuration org/apache/geronimo/Server
18:25:11,597 INFO [HttpServer] Starting Jetty/5.0.beta0
18:25:11,610 INFO [HttpServer] Started org.mortbay.jetty.Server@a30589
18:25:11,776 INFO [SocketListener] Started SocketListener on 0.0.0.0:8080
18:25:12,043 INFO [TcpTransportServerChannel] Listening for connections at: tcp://localhost:61616
18:25:12,051 INFO [ActiveMQBrokerImpl] ActiveMQ JMS Broker started
18:25:12,696 INFO [Configuration] Started configuration org/openejb/connector/axion
18:25:18,166 INFO [Configuration] Started configuration org/openejb/itests
</pre></span></td></tr></table></span></p>
<a name="client"><h2>Running the client</h2></a>
<p><span class="bodyBlack">Once the server has fully started, open another command window and run the test suite
(from the same directory containing the build.xml file) using the following command:
</span></p>
<p><span class="bodyBlack"><span class="command">C:\example-app&gt; ant test</span></span></p>
<p><span class="bodyBlack">You should see the following output:</span></p>
<p><span class="bodyBlack"><table width="440" cellspacing="0" cellpadding="0" border="0"><tr><td bgcolor="#e0e0e0"><span class="code-block"><pre>
Buildfile: build.xml
test:
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] .........................................
[java] ....................................
[java] Time: 151.55
[java] OK (405 tests)
BUILD SUCCESSFUL
Total time: 2 minutes 34 seconds
</pre></span></td></tr></table>
</span></p>
<a name="help"><h2>Help! It didn't work!</h2></a>
<p><span class="bodyBlack">If you are running windows, 8 of the tests will fail. Those running Mac OS X should experience no problems. There is a difference between the Sun windows Java VM and the Mac OS X Java VM such that we are experiencing classloading issues deserializing arrays of EJBObjects or EJBHomes sent from the client into the server. Totally fine on a Mac, fails on Windows. Don't know what the status is for Linux.</span></p>
<p><span class="bodyBlack">Things are fine sending arrays of EJBObjects from the server to the client, as well as sending EJBObjects either direction inside other objects. Just arrays of EJBObjects going into the server from the client. Strange VM garbage. Anyway, we are aware of the problem and are working our butts off to figure out what the heck is going on.</span></p>
<p><span class="bodyBlack">It just goes to show you how hard it is to pass our test suite. If this is a VM bug, it would be the second one we've found. Did you know the Sun 1.3.0 VM can't serialize one of the eight Java primitives? If you serialize a char, it tries to deserialize it as a java.lang.Char, which obviously doesn't exist.</span></p>
<a name="help"><h2>Getting support</h2></a>
<p><span class="bodyBlack">Any problems with this release can be reported to the Geronimo mailing list or Jira issue tracker.
<table cellspacing="2" cellpadding="2" border="0"><tr><td height="5" colspan="2"></td></tr><span class="bodyGrey">
<tr><td width="10" valign="top" align="left"><img src="images/grayDot.gif"></td><td valign="top" align="left"><span class="bodyBlack"><a href="mailto:geronimo-dev-subscribe@incubator.apache.org">Subscribe</a> to the Geronimo mailing list or <a href="http://nagoya.apache.org/eyebrowse/SummarizeList?listId=140">view archive</a></span></td></tr>
<tr><td width="10" valign="top" align="left"><img src="images/grayDot.gif"></td><td valign="top" align="left"><span class="bodyBlack">File a <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10220">bug report</a> in Jira</span></td></tr>
</span></table>
</span></p>
</td><td align="left" valign="top" height="5" width="120">
&nbsp;
</td></tr><tr height="5"><td align="left" valign="top" bgcolor="#7270c2" height="5" width="20">&nbsp;</td><td valign="top" bgcolor="#7270c2" height="5" width="95">&nbsp;</td><td align="left" valign="top" bgcolor="#a9a5de" height="5" width="7">&nbsp;</td><td align="left" valign="top" height="5" width="40">&nbsp;</td><td align="left" valign="top" height="5" width="120">&nbsp;</td></tr><tr><td align="left" valign="top" bgcolor="#7270c2" height="5" width="20">&nbsp;</td><td align="left" valign="top" bgcolor="#7270c2" width="95">&nbsp;</td><td align="left" valign="top" bgcolor="#a9a5de" width="7"><img border="0" height="25" width="1" src="images/dotTrans.gif"></td><td align="left" valign="top" width="40"><img border="0" height="25" width="1" src="images/dotTrans.gif"></td><td align="left" valign="top" width="120">&nbsp;</td></tr><tr height="5"><td align="left" valign="bottom" bgcolor="#7270c2" height="100%" rowspan="2" width="20"><img border="0" height="125" width="20" src="images/stripes1.gif"></td><td align="left" valign="bottom" bgcolor="#7270c2" height="100%" rowspan="2" width="95"><img border="0" height="125" width="105" src="images/stripe105.gif"></td><td align="left" valign="top" bgcolor="#a9a5de" height="100%" rowspan="2" width="7">&nbsp;</td><td align="left" valign="top" height="100%" width="40">&nbsp;</td><td align="left" valign="top" height="100%" width="120">&nbsp;</td></tr><tr height="5"><td align="left" valign="top" height="25" width="40">&nbsp;</td><td align="left" valign="bottom" height="25" width="430"><br><br><img height="3" width="430" border="0" src="images/line_light.gif"><br><p></p><span class="bodyGrey"><small><notice>
OpenEJB is a trademark of the OpenEJB Group.
Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and in other
countries. XML, XML Schema, XSLT and related standards are trademarks or registered
trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web
Consortium. All other product names mentioned herein are trademarks of their respective
owners.
</notice><br>&nbsp;<br></small></span><p></p>
&nbsp;
</td><td align="left" valign="top" height="25" width="120">&nbsp;</td></tr></table></body></html>