[jboss-user] [EJB 3.0] New message: "Re: Persistence unit issues when migrating to JBOSS 5.1.0"

jaikiran pai do-not-reply at jboss.com
Fri Jan 15 09:28:43 EST 2010


User development,

A new message was posted in the thread "Persistence unit issues when migrating to JBOSS 5.1.0":

http://community.jboss.org/message/520308#520308

Author  : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran

Message:
--------------------------------------------------------------
> dbobes wrote:
>  
>  has a stateless bean defined like this:
>  
> @Stateless(name="Server", mappedName="myapp/Server/local")
> 
> 
>  
> 
> In the seam's components.xml file I have defined the server component like this:
> 
>  
> 
>     <component name="server" auto-create="true"
>               scope="event" jndi-name="myapp/Server/local"
>               class="com.company.ServerImpl">
> 
> 
> 
> But when I try to inject the component into a seam bean:
> 
>  
> 
> @In Server server;
> 
> 
>  
> 
> it throws:
> 
>  
> 
> javax.naming.NameNotFoundException: Server not bound
> 
>  
> 
> 
> 
 
The mappedName attribute of @Stateless is _not_ used as the jndi name for binding into JNDI. You will have to use @RemoteBinding (or @LocalBinding) as explained http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.7/html/JNDI_Bindings.html

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/520308#520308




More information about the jboss-user mailing list