From: rdoust <do-...@jb...> - 2006-07-06 23:21:47
|
I'm going to try to be more specific. I have a session bean defined in a jar file that's packaged with a war file into an ear. The session bean is declared in its ejb-jar.xml as follows: | <session> | <display-name>The Shopping Client Controller</display-name> | <ejb-name>TheShoppingClientController</ejb-name> | <home>com.control.ejb.ShoppingClientControllerHome</home> | <remote>com.control.ejb.ShoppingClientController</remote> | <ejb-class>com.control.ejb.ShoppingClientControllerEJB</ejb-class> | <session-type>Stateful</session-type> | <transaction-type>Container</transaction-type> | . | . | </session> | The jboss.xml file contains the following: | <session> | <ejb-name>TheShoppingClientController</ejb-name> | <jndi-name>foo/scc</jndi-name> | . | . | </session> | The web.xml contains the following: | <ejb-ref> | <ejb-ref-name>ejb/scc/Scc</ejb-ref-name> | <ejb-ref-type>Session</ejb-ref-type> | <home>com.control.ejb.ShoppingClientControllerHome</home> | <remote>com.control.ejb.ShoppingClientController</remote> | </ejb-ref> | The jboss-web.xml contains the following: <ejb-ref> <ejb-ref-name>ejb/scc/Scc</ejb-ref-name> <jndi-name>foo/scc</jndi-name> </ejb-ref> In the web-tier the code does this: | public static ShoppingClientControllerHome getSCCHome() | throws javax.naming.NamingException { | InitialContext initial = new InitialContext(); | Object objref = initial.lookup("java:comp/env/ejb/scc/Scc"); | return (ShoppingClientControllerHome) | PortableRemoteObject.narrow(objref, | ShoppingClientControllerHome.class); | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956031#3956031 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956031 |