tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Davidson" <>
Subject RE: Include Classpath not sharing Deployed EJBs?
Date Tue, 09 Feb 2010 17:33:52 GMT
Multi-Threaded programming can be tricky enough, but Multi-process???
UGH!  Especially when I don't realize that its occurring!

Figured this out. 

The long version;
Maven was starting a separate process (not sure if a completely separate
JVM, did not check out the Fork settings) for Jetty, and then launching
the Integration Tests.  The reason this was working for my WebService
tests is they were connecting to Jetty via HTTP (and I had some code to
set up the Port).  If I had Remote EJBs, then these tests would also
probably work as is in Jetty.  But I only have Local Ejbs, and Open EJB
is (quite properly, I might add) looking for the EJBs in the local
process.  And since the JUnit tests never configured OpenEjb to deploy
them (handled by Maven during Jetty startup, right?), it was not finding

Bottom line, the test cases I came up with were perfect for Remote EJBs,
but failed when I threw in Local Ejbs.


-----Original Message-----
From: Stephen Davidson [] 
Sent: Thursday, February 04, 2010 5:35 PM
Subject: RE: Include Classpath not sharing Deployed EJBs?

Hi David.

I have attached a demo project, which shows (in a much reduced scale)
what I am experiencing.  As the Demo project does not have a delegate
tier, I had the Integration Test call the Servlet.  In the project, we
have a Delegate Tier that the Servlets call to access the EJBs, and the
test cases are calling the Delegates instead.

As attached, the project works.  Delete the ejb-jar.xml file from the
EJB Jar, and watch it fail on "mvn clean install".  The goal in the
Integration test is;
mvn integration-test

To just start jetty, mvn jetty:run

Something odd I noticed with the Demo project is that the generated ear
file is being deployed twice.  In the case of no ejb-jar.xml file, the
EJBs are deployed only once (the first pass), but not on the second pass
(which seems to be the Test Pass).  

In the case of ejb-jar.xml file present, the EJBs are apparently
deployed twice as well.

I've confirmed this occurs for my application for both cases.

Any thoughts?


View raw message