This content has been marked as final.
Show 2 replies
-
1. Re: Migrating JavaBean <resource-ref>s from Tomcat to JBoss
jaikiran Feb 28, 2007 9:41 PM (in response to pdanielsen)If i understand your question right, you are looking for the jboss-web.xml file where you can configure this. You can find the dtd for this xml here:
http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd
Here's an extract:<!ELEMENT jboss-web (class-loading?, security-domain?, context-root?,
virtual-host*, use-session-cookies?, replication-config?, resource-env-ref*,
resource-ref* , ejb-ref* , ejb-local-ref*, depends*)> -
2. Re: Migrating JavaBean <resource-ref>s from Tomcat to JBoss
pdanielsen Mar 1, 2007 10:06 AM (in response to pdanielsen)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.