On Jun 5, 2008, at 2:52 AM, uglything wrote:

<snip/>
Nothing complex... But Tomcat tries to load MyWebApp before openejb, as
expected from the specifications... Hence the deployment fails.



Well, to address that, I tried to add explicitely the openejb context before
MyWebApp :



    &lt;Context docBase="openejb" /&gt;
    &lt;Context docBase="../../target/MyWebApp" /&gt;

If you add the OpenEJBListener to the server.xml file, OpenEJB will always initialize first. Simply copy the openejb-javaagent.jar file to the Tomcat lib directory, and add this declaration at the top of the server.xml file:

  <!-- OpenEJB plugin for Tomcat -->
  <Listener className="org.apache.openejb.loader.OpenEJBListener" />

Since Tomcat starts components in the order they are declared in the server.xml file, OpenEJB will guaranteed to be running by the time your application is deployed.

-dain

Reply via email to