I am a newbie to EJB3. I have written simple bean and am able to access the remote interface through the client. How do i access the local interface through client (similar to getejbhome and create() using ejb2.0). How do i do that using weblogic? I tried using java:comp/env/ejb in my client and put entries in ejb-jar.xml but i get naming exception. I am really frustrated.
I am not sure what client you are using. If it is an application client then you cannot access the Local interface from that because it will not be available. Only remote interfaces will be available at the application client.
Probably you can try accessing the Local interface from a Servlet or from a Session bean.
Hope my reply helps.
Help needed in resolving javax.naming.NameNotFoundException when i try to invoke the remote ejb object of EJB3. The ejb is deployed in the weblogic server without any errors. I can see the ejb jar file deployed in the ejb container of weblogic through the admin console.
Please find the source code snippet below....
Hashtable ht = new Hashtable();
InitialContext ctx = null;
ctx = new InitialContext(ht);
Object obj = (Object)ctx.lookup("com.acs.test.emp.EmployeeBean");
EmployeeRemote empRemote = (EmployeeRemote)PortableRemoteObject.narrow(obj,com.acs.test.emp.EmployeeRemote.class);
List empList = empRemote.getEmployeeDetails(1);
For you need to change the lookup code.
It should be context.lookup("EJBName#RemoteInterfaceWithPackage");
Another thing is you dont need to use Narrow for EJB3.