The error I get is that my ejb is not bound when I try to access it through a 
webservice. My application has a front-end that connects to my webservice and 
my webservice must connect to my sessionBean.

Here is my ejb-jar.xml

  |     <session>
  |       <ejb-name>Foo</ejb-name>
  |       <home>project.ejb.session.FooHome</home>
  |       <remote>project.ejb.session.Foo</remote>
  |       <ejb-class>project.ejb.session.FooBean</ejb-class>
  |       <session-type>Stateful</session-type>
  |       <transaction-type>Container</transaction-type>
  |       <ejb-ref>
  |         <ejb-ref-name>ejb/Foo</ejb-ref-name>
  |         <ejb-ref-type>Session</ejb-ref-type>
  |         <home>project.ejb.session.FooHome</home>
  |         <remote>project.ejb.session.Foo</remote>
  |       </ejb-ref>
  |       <security-identity>
  |         <use-caller-identity/>
  |       </security-identity>
  |       <security-role-ref>
  |         <role-name>beheerder</role-name>
  |         <role-link>beheerders</role-link>
  |       </security-role-ref>
  |     </session>
  | 

Here is my jboss.xml

  |     <session>
  |       <ejb-name>Foo</ejb-name>
  |       <jndi-name>Foo</jndi-name>
  |       <ejb-ref>
  |         <ejb-ref-name>ejb/Foo</ejb-ref-name>
  |         <jndi-name>java:comp/env/ejb/Foo</jndi-name>
  |       </ejb-ref>
  |       <port-component>
  |         <port-component-name>Foo</port-component-name>
  |         <port-component-uri>/authentication/*</port-component-uri>
  |         <auth-method>BASIC</auth-method>
  |       </port-component>
  |     </session>
  | 

The code in my webservice implements class

  | InitialContext inictx = new InitialContext();
  | Object ref = inictx.lookup("java:comp/env/ejb/Foo");                        
  | FooHome fooHome = (FooHome)PortableRemoteObject.narrow(ref, FooHome.class);
  | Foo FooBean = fooHome.create();
  | 

The exacte error is:
javax.naming.NameNotFoundException: Foo not bound

When i look in my jboss jmx console i can see that my Foo has been deployed. I 
double checked this also with a piece of code that shows all my deployed beans 
show that is not the problem! 

But what is?? Can anyone help me please! 



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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to