-
1. Re: Local ejb lookup from another ear on same JBoss 7.1.1.
sergiu_pienar Jan 20, 2014 6:57 AM (in response to nschweig)Your EJB should hold something like:
@LocalBinding(jndiBinding = "java:global/<deploymentName>/BeanName!<fullyQualifiedBeanName>Local")
More on this topic, here: Remote EJB invocations via JNDI - EJB client API or remote-naming project - JBoss AS 7.1 - Project Documentation Editor
-
2. Re: Local ejb lookup from another ear on same JBoss 7.1.1.
wdfink Jan 20, 2014 7:21 AM (in response to nschweig)An Example is better than 1000 words
You might have a look to the ejb-multi-server quickstart the app-web will invoke ejb's deployed on different servers, the app-main do it local from a JSF application.
If you use a remote-interface you are able to decide whether you deploy it local or remote, you might need additional configuration to prevent from local serialization if wanted.
A local-interface can only do in-vm invocations so you need to have the 'foreign' app deployed to the same server.
hope that helps
-
3. Re: Local ejb lookup from another ear on same JBoss 7.1.1.
nschweig Jan 21, 2014 6:15 AM (in response to wdfink)Hello
and thanks for your answers.
I took a look in ejb-multi-server quickstart. I only tested the ejb lookup from the web project to the ejb project and it works. I placed both (the app-main-ejb and app-main-web project into one EAR) And this is the difference to my project!
I have 2 different EAR´s in one server and so the lookup does not work.
Here is the error that occurs:
New missing/unsatisfied dependencies: service jboss.naming.context.java.module.RoleManager.RoleManagerWeb.env.ejb:IDMService.IDMServiceEJB."LdapService!de.thm.mnd.idmservice.ldapIntegration.ejb.LdapServiceRemote" (missing) dependents: [service jboss.naming.context.java.module.RoleManager.RoleManagerWeb.env."de.thm.mnd.roleManagement.jsf.PersonSearchBean".ldapService]
At the end there is another message:
newly corrected services:
service jboss.naming.context.java.module.RoleManager.RoleManagerWeb.env.ejb:IDMService.IDMServiceEJB."LdapService!de.thm.mnd.idmservice.ldapIntegration.ejb.LdapServiceRemote" (new available)
I tried the lookup similar to the notation you did the lookup for bean MainEjbClient34AppBean.
Here´s the structure of my project:
IDMService (EAR)
- IDMServiceEJB (EJBModule)
- de.thm.mnd.idmservice.ldapIntegration.ejb
-LdapService (Bean)
-LdapServiceRemote (Interface)
Second EAR:
Rolemanager (EAR)
- RoleManagerEJB
- RoleManagerWeb
- de.thm.mnd.roleManagement.jsf
- PersonSearchBean (JSF Managed Bean)
The PersonSearchBean in the RoleManagerWeb wants to do the lookup in this way
@Resource(mappedName="ejb:IDMService/IDMServiceEJB/LdapService!de.thm.mnd.idmservice.ldapIntegration.ejb.LdapServiceRemote") LdapServiceRemote ldapService;
)
The RoleManagerWeb project contains the jboss-client.jar. The IDMServiceEJB contains the jboss-ejb-client.xml in the src-folder.
Do you have any ideas?
Thanks a lot!!
Bye Nicole