[jboss-user] [Beginners Corner] - Re: Migrating JavaBean <resource-ref>s from Tomcat to JBoss

pdanielsen do-not-reply at jboss.com
Thu Mar 1 10:06:41 EST 2007

Thanks for replying.

I've already added a <resource-ref> to the jboss-web.xml file.  Here's an example.  The web.xml contains this:
  |   <resource-ref>
  |     <description>Logger Service Locator Configuration Bean Factory</description>
  |     <res-ref-name>bean/LoggerServiceLocatorConfigBeanFactory</res-ref-name>
  |     <res-type>com.xyz.test.webapp.LoggerServiceLocatorConfigBean</res-type>
  |     <res-auth>Container</res-auth>
  |   </resource-ref>
where the res-type is the name of a JavaBean class that contains configuration data.  It's not an EJB, just a regular JavaBean.
The jboss-web.xml contains this:

  |   <resource-ref>
  |     <res-ref-name>bean/LoggerServiceLocatorConfigBeanFactory</res-ref-name>
  |     <jndi-name>java:/bean/LoggerServiceLocatorConfigBeanFactory</jndi-name>
  |   </resource-ref>
to map the res-ref-name to a JNDI name.

I'm trying to understand where and how I specify
1. the properties of this JavaBean in JBoss?
2. the factory JBoss should use to create the bean?
The JBoss documentation I've found so far only takes me through the jboss-web.xml step, but doesn't explain how values are assigned to JNDI names.  In Tomcat, an application-specific context file under $TOMCAT/conf/Catalina/localhost identifies the factory and the JavaBean properties, as shown in the documentation referenced in my original post.  I also looked at WebSphere and saw how to do both these actions there, so I'm thinking there must be a similar feature in JBoss.

Thanks again for your assistance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024294#4024294

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024294

More information about the jboss-user mailing list