[jboss-user] [EJB 3.0] - Re: Binding / JNDI / EJB

jaikiran do-not-reply at jboss.com
Sun Dec 21 08:41:36 EST 2008


PB,

I reread the entire thread again:

anonymous wrote : 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? 

1) Since these are EJB3 beans, use the ejb 3.0 xsd in the ejb-jar.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar
  |         xmlns="http://java.sun.com/xml/ns/javaee"
  |         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  |                             http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
  |         version="3.0">
  |    <enterprise-beans>
  | ...


2) There's a difference in the "remote" element and the "business-remote" element in the ejb-jar.xml. The "remote" element points the EJB2.x style remote interface (which used to extend EJBObject) and the business-remote element points to EJB3 style business interface. I guess, your usecase falls in the latter style. So change the remote to business-remote in the ejb-jar.xml. Here's an example:

<?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar
  |         xmlns="http://java.sun.com/xml/ns/javaee"
  |         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  |                             http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
  |         version="3.0">
  |    <enterprise-beans>
  |       <session>
  |          <ejb-name>SubscriberEjb</ejb-name>
  | 	<business-remote>com.sita.wab.ejb.subscriber.SubscriberEjbRemote</business-remote>
  |          <ejb-class>com.sita.wab.ejb.subscriber.SubscriberEjbBean</ejb-class>
  | 	<session-type>Stateless</session-type>
  | 			<transaction-type>Container</transaction-type>
  | 
  |       </session>
  |    </enterprise-beans>
  | </ejb-jar>
  | 	
  | 
  | 
  | 
  | 

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

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



More information about the jboss-user mailing list