[jboss-user] [EJB 3.0] - EJB Local Home in EJB 3.0
kancharla_g
do-not-reply at jboss.com
Thu Jan 31 23:29:28 EST 2008
Hi,
Is JBoss supports LocalHome? I am not able to lookup from the JSF backing bean which is also in the same ear file.
I have created an Stateful Session Bean as follows
@Stateful
@LocalHome(value=TestUserHome.class)
public class TestUserBean implements TestUserLocal {
@Init
public void initDefault(){
}
...
}
My ear package is as follows.
MyApplication.ear
|
|____ entities.jar
|
|____ ejb-beans.jar
|
|____ webapp.war
|
|____ META-INF
|
|____ application.xml
I need to lookup the TestUserHome which is in ejb-beans.jar from my JSF backing bean which is webapp.war. I tried the following ways to lookup none of them successful.
a) TestUserBean/localhome
b) TestUserBean/home
c) ejb-beans.jar#TestUserBean/home
d) Define in web.xml as follows
<ejb-local-ref>
<ejb-ref-name>TestUser</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.test.TestUserHome</local-home>
com.test.TestUserLocal
</ejb-local-ref>
and in jboss-web.xml
<ejb-local-ref>
<ejb-ref-name>TestUser</ejb-ref-name>
<local-jndi-name>TestUserBean/localhome</local-jndi-name>
</ejb-local-ref>
e) TestUserHome.class.getName();
Please suggest me how to lookup LocalHome. I am using jboss-4.2.2.GA
Thank you,
Gupta.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125356#4125356
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125356
More information about the jboss-user
mailing list