Hello,
I posted this to the Resin mailing list yesterday. It may be of
interest to people on this list, too. I orignally attached a sample
JSP page that accessed an EJB, but apparently the jBoss list doesn't
like attachments. If you want the example, let me know and I'll email
you individually.
To have a Resin web application use jBoss, do the following:
1. Copy "ejb.jar", "jboss-client.jar", and "jnp-client.jar" from
$JBOSS_HOME/client into WEB-INF/lib.
2. Copy the EJB jar file that you put in $JBOSS_HOME/deploy into
WEB-INF/lib.
3. Put the following <web-app> into resin.conf:
<web-app id='/web-app-path' app-dir='/real/path/of/web-app'>
<jndi-link>
<jndi-name>java:comp/env</jndi-name>
<jndi-factory>org.jnp.interfaces.NamingContextFactory</jndi-factory>
<init-param java.naming.provider.url="localhost:1099"/>
</jndi-link>
</web-app>
Of course change the JNDI URL if you're running jBoss on a different
machine. Make sure you map all of your EJBs to the "ejb/" JNDI
context. For example, I have this in my jboss.xml:
<enterprise-beans>
<entity>
<ejb-name>UserBean</ejb-name>
<jndi-name>ejb/UserHome</jndi-name>
</entity>
.... other beans ....
</enterprise-beans>
This way you can lookup all the Home interfaces in the
"java:comp/env/ejb/" context.
And don't forget that if you re-deploy your beans to jBoss, you should
copy over the jar file into WEB-INF and restart Resin.
Hope that helps!
-Dave
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]