[jboss-user] [EJB 3.0] - Binding / JNDI / EJB
pbaker01
do-not-reply at jboss.com
Fri Dec 19 16:56:58 EST 2008
We have an application that has three Stateless EJBs. During the initial development we did not use ejb-jar.xml or jboss.xml config files. When the beans were deplyed the system created several entries in the Global JNDI.
We have now created jBoss.xml and ejb-jar files and now the EJB Global JNDI entries are no longer being created. What are we missing?
THanks!
>From the console:
anonymous wrote : 16:31:40,148 INFO [EJBContainer] STARTED EJB: com.sita.wab.mdb.ssim.SSMListener ejbName: SSMListener
| 16:31:40,317 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
| AirlineEjbBean/remote - EJB3.x Default Remote Business Interface
| AirlineEjbBean/remote-com.sita.wab.ejb.airline.AirlineEjbRemote - EJB3.x Remote Business Interface
| AirlineEjbBean/local - EJB3.x Default Local Business Interface
| AirlineEjbBean/local-com.sita.wab.ejb.airline.AirlineEjbLocal - EJB3.x Local Business Interface
|
| 16:31:40,347 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
| SsimEjbBean/remote - EJB3.x Default Remote Business Interface
| SsimEjbBean/remote-com.sita.wab.ejb.ssim.SsimEjbRemote - EJB3.x Remote Business Interface
| SsimEjbBean/local - EJB3.x Default Local Business Interface
| SsimEjbBean/local-com.sita.wab.ejb.ssim.SsimEjbLocal - EJB3.x Local Business Interface
|
| 16:31:40,368 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
|
| SubscriberEjbBean/remote - EJB3.x Default Remote Business Interface
| SubscriberEjbBean/remote-com.sita.wab.ejb.subscriber.SubscriberEjbRemote - EJB3.x Remote Business Interface
| SubscriberEjbBean/local - EJB3.x Default Local Business Interface
| SubscriberEjbBean/local-com.sita.wab.ejb.subscriber.SubscriberEjbLocal - EJB3.x Local Business Interface
|
| 16:31:40,558 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
|
These entries can be seen using JMX:
anonymous wrote : +- SubscriberEjbBean (class: org.jnp.interfaces.NamingContext)
| | +- local (class: Proxy for: com.sita.wab.ejb.subscriber.SubscriberEjbLocal)
| | +- remote (class: Proxy for: com.sita.wab.ejb.subscriber.SubscriberEjbRemote)
| | +- local-com.sita.wab.ejb.subscriber.SubscriberEjbLocal (class: Proxy for: com.sita.wab.ejb.subscriber.SubscriberEjbLocal)
| | +- remote-com.sita.wab.ejb.subscriber.SubscriberEjbRemote (class: Proxy for: com.sita.wab.ejb.subscriber.SubscriberEjbRemote)
|
We have created a JBoss.xml config file:
<jboss>
| <enterprise-beans>
| <message-driven>
| <ejb-name>SSMListener</ejb-name>
| <configuration-name>Standard Message Driven Bean</configuration-name>
| <destination-jndi-name>queue/SSMQueue</destination-jndi-name>
| </message-driven>
|
| <session>
| <ejb-name>SubscriberEjb</ejb-name>
| <configuration-name>Standard Stateless SessionBean</configuration-name>
| <jndi-name>SubscriberEjb</jndi-name>
| </session>
|
| <session>
| <ejb-name>AirlineEjb</ejb-name>
| <configuration-name>Standard Stateless SessionBean</configuration-name>
| <jndi-name>AirlineEjb</jndi-name>
| </session>
|
| <session>
| <ejb-name>SsimEjbBean</ejb-name>
| <configuration-name>Standard Stateless SessionBean</configuration-name>
| <jndi-name>SsimEjbBean</jndi-name>
| </session>
|
| </enterprise-beans>
| </jboss>
And an ejb-jar.xml file:
<?xml version="1.0"?>
| <!DOCTYPE ejb-jar PUBLIC
| "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
| "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
| <ejb-jar>
| <enterprise-beans>
| <message-driven>
| <ejb-name>SSMListener</ejb-name>
| <ejb-class>com.sita.wab.mdb.ssim.SSMListener</ejb-class>
| <transaction-type>Container</transaction-type>
| <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| <subscription-durability>
| Durable
| </subscription-durability>
| </message-driven-destination>
| </message-driven>
|
| <session>
| <ejb-name>SubscriberEjb</ejb-name>
| <remote>
| com.sita.wab.ejb.subscriber.SubscriberEjbRemote
| </remote>
| <ejb-class>
| com.sita.wab.ejb.subscriber.SubscriberEjbBean
| </ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
| </session>
|
| <session>
| <ejb-name>AirlineEjb</ejb-name>
| <remote>com.sita.wab.ejb.airline.AirlineEjbRemote</remote>
| <ejb-class>
| com.sita.wab.ejb.airline.AirlineEjbBean
| </ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
| </session>
|
| <session>
| <ejb-name>SsimEjbBean</ejb-name>
| <remote>com.sita.wab.ejb.ssim.SsimEjbRemote</remote>
| <ejb-class>com.sita.wab.ejb.ssim.SsimEjbBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
| </session>
|
|
| </enterprise-beans>
|
| <assembly-descriptor>
| <container-transaction>
| <method>
| <ejb-name>SSMListener</ejb-name>
| <method-name>onMessage</method-name>
| </method>
| <trans-attribute>Required</trans-attribute>
| </container-transaction>
| </assembly-descriptor>
| </ejb-jar>
|
When deployed with these config file the ejbs are not added to the global JNDI.
Why?
Global JNDI Namespace
| +- UserTransactionSessionFactory (proxy: $Proxy96 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
| +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
| +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
| +- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- topic (class: org.jnp.interfaces.NamingContext)
| +- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- ProfileService (class: AOPProxy$0)
| +- queue (class: org.jnp.interfaces.NamingContext)
| | +- SSMQueue (class: org.jboss.jms.destination.JBossQueue)
| | +- DLQ (class: org.jboss.jms.destination.JBossQueue)
| | +- ExpiryQueue (class: org.jboss.jms.destination.JBossQueue)
| +- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
| +- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
| +- jmx (class: org.jnp.interfaces.NamingContext)
| | +- invoker (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor (proxy: $Proxy98 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| | +- rmi (class: org.jnp.interfaces.NamingContext)
| | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
| +- persistence.unit:unitName=#WABPU (class: org.hibernate.impl.SessionFactoryImpl)
| +- TomcatAuthenticators (class: java.util.Properties)
| +- console (class: org.jnp.interfaces.NamingContext)
| | +- PluginManager (proxy: $Proxy99 implements interface org.jboss.console.manager.PluginManagerMBean)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197746#4197746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197746
More information about the jboss-user
mailing list