Thanks for the hint. Would you please tell me where in web.xml can I specify 
module name?

-----Original Message-----
From: Romain Manni-Bucau [mailto:[email protected]] 
Sent: Saturday, March 30, 2013 4:41 AM
To: [email protected]
Subject: Re: JNDI lookup

Think you didnt specify a module name in your web.xml Le 29 mars 2013 20:45, 
"Patel, Sanjay" <[email protected]> a écrit :

> I use EJBs in my spring application.
> To inject EJB in my controller I do as below.
>
> @EJB(mappedName = "java:global/myAppName/MyBean") MyBean myBean;
>
> It works fine.
>
> Now when I deploy my application in production, It fails to find EJB.
> Because there is no context in my production environment, EJBs get 
> deployed in TomEE like "java:global//MyBean". So the spring controller 
> cannot find the EJBs.
>
> Is there any better way to inject EJBs?
>

Reply via email to