App or global lookups work but it is not the names you used. Check the log
for the exact one.
Le 11 févr. 2016 09:12, "Rentius" <[email protected]> a écrit :

> Hi
>
> I have a Web project and a EJB project running on the same TomEE sever, but
> they are separate deploys.
>
> I have deployed the EJB project in the apps folder of the TomEE server and
> can see the EJB's are starting when the server starts.
>
> /INFO: Jndi(name=DefaultRegistrationProcess) -->
> Ejb(deployment-id=DefaultRegistrationProcess)/
>
> Below is one of the @Stateless beans in the EJB project
>
> /@Stateless(name = "DefaultRegistrationProcess")
> public class DefaultRegistrationProcess implements RegistrationProcess {
>
>     @Override
>     public void process(Registration registration) {
>         System.out.println("Hello from Default registration process!");
>     }
>
> }/
>
> I have tried the following from the Web project
>
> /new InitialContext().lookup("java:module/DefaultRegistrationProcess");
> new InitialContext().lookup("java:global/DefaultRegistrationProcess");
> new
>
> InitialContext().lookup("java:global/ProjectName/DefaultRegistrationProcess");
> new InitialContext().lookup("java:app/DefaultRegistrationProcess");/
>
> For every above scenario I get the error: /Name
> "java:?/DefaultRegistrationProcess" not found/
>
> When packaging the EJB via Maven with the Web Project I can do the lookup
> by
> using new
> /InitialContext().lookup("java:module/DefaultRegistrationProcess");/
>
> Is it possible to do a local JNDI call from my Web project to lookup the
> DefaultRegistrationProcess bean in the separately deployed EJB module?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Calling-separate-EJB-from-Web-project-deployed-on-same-server-tp4677588.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to