You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Dario Laverde <da...@nycjava.net> on 2007/09/12 19:26:49 UTC

Re: can't get 'collapsed ear' / webapp based ejbs working

> What do you mean by bean look-ups, u mean assign JNDI names for them ?

I mean I'm using
@EJB private static MyBean mybean;
on the client

Just wondering if I'm missing any additional configuration, yes jndi properties
somewhere.

BTW I'm writing up a how-to on OpenEJB+Tomcat (specifically the multi-instance and
not the single instance of OpenEJB in Tomcat) I was about to post it on my blog
assuming it would've worked per instructions but I'm having problems.

thanks,
Dario


> On 9/12/07, Dario Laverde <da...@nycjava.net> 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
>>
>>
>
>
> --
> Thanks
> - Mohammad Nour
>