The installer is still a work in progress (I'm working on it today), but the currently checked in version works fine on unix.

David's process is correct, but here are the exact steps:

1. copy openejb-tomcat-3.0.0-SNAPSHOT-bin.zip to your Tomcat webapps directory
2. make sure Tomcat is running
3. visit http://localhost:8080/openejb/installer
4. Assuming you don't get any errors, reboot tomcat

At this point OpenEJB will be installed just like the manual instructions (http://cwiki.apache.org/confluence/display/OPENEJB/New +Instructions). As for your applications, simply include EJBs in your war WEB-INF/classes or WEB-INF/lib/*.jar using either annotated classes or via a META-INF/ejb-jar.xml file.

Restrictions
o The installer only runs on Unix. Windows support will require a tweaked catalina.bat and a work around for Windows file locking. Cygwin won't work either and will require even more work arounds in the Unix code to deal with pathing problems. o There is no uninstaller. Currently, the installer deletes the non- compliant Tomcat annotations-api.jar so in addition to backing out the changes, you need to restore this file. o Annotations in servlets to OpenEJB resources (EJBs, PersistenceUnits, Topics, Queues, DataSources, etc) don't resolve. You will have to use global JNDI for the time being. o There is no security integration. I suggest you don't even try using secured EJB in Tomcat embedded mode yet.

Hope this helps,

-dain


On Sep 12, 2007, at 1:10 PM, Dario Laverde wrote:

Ah that helps clarify things, thanks David.

And was the classloader issue with Tomcat 6 resolved as well? (you had mentioned
there was one back in April on the Tomcat list).

sorry for the double post,
Dario

The OpenEJB Tomcat support has been reworked and does support
collapsed ears.  Actually it supports both the old style (ejb
globally available) and new (collapsed ear) in the same setup.  The
result though is that the docs are way out of sync and there are
JIRAs to basically rewrite the Tomcat section of the docs.

The new integration basically involves putting the war file from
assembly/openejb-tomcat into Tomcat server where there is an auto
installer that performs the required steps and spits the output out.
Dain, wrote the auto installer servlet just last week -- i've never
run it.

Dain, did I get the details more or less right?

-David

On Sep 12, 2007, at 9:40 AM, Dario Laverde wrote:

hi all,

Good to see 3.1 almost there. But I'm having some problem per the
available docs:

Can you review these? I tried both on Tomcat 5.5 and 6.0 (some
notes below)

Configure OpenEJB per webapp requires the following steps:

Copy the openejb-loader-*.jar into the WEB-INF/lib directory of the
webapp that is
to use EJBs deployed onto OpenEJB
Add the loader servlet definition to the WEB-INF/web.xml file of
the webapp with a
valid value for openejb.home init-param.
<servlet>
    <servlet-name>loader</servlet-name>
    <servlet-class>org.openejb.loader.LoaderServlet</servlet-class>
    <init-param>
      <param-name>openejb.loader</param-name>
      <param-value>tomcat-webapp</param-value>
    </init-param>
    <init-param>
      <param-name>openejb.home</param-name>
      <param-value>...define OPENEJB_HOME here...</param-value>

note: do we need openejb.home here?

    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>

Should you define other OpenEJB configuration settings use another
<init-param>
stanza. It's just for that. These parameters are directly passed to
OpenEJB at
initialization of the servlet. Think about the loader servlet as a
bridge between
OpenEJB's world (EJBs) and Tomcat's world (servlets, JSPs).

At startup OpenEJB prints out all of the configuration settings to
Tomcat logs:

INFO: Installing web application at context path /openejb from URL
file:C:\webapps\openejb
OpenEJB init-params:
        param-name: openejb.home, param-value: c:\openejb
        param-name: openejb.configuration, param-value: conf
\openejb.cfg
        param-name: openejb.base, param-value: c:\webapps\openejb
\WEB-INF\openejb
        param-name: openejb.loader, param-value: tomcat-webapp
Start up Tomcat and have fun with the EJBs


I looked at all the logs - no luck, do I also need to configure
bean lookups? I
thought that was done automatically..

thanks,
Dario







Reply via email to