-
1. Re: CorbaNamingService for EJB3 in AS trunk
jhalliday Feb 5, 2008 5:25 AM (in response to jhalliday)So mixing EJB3 with jboss.xml configuration is a mistake. Looks like the proper way to do this is to throw out the xml (sweet!) and use e.g.
@Stateless @Remote(MyRemote.class) @RemoteBinding(factory= RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
on the bean impl class -
2. Re: CorbaNamingService for EJB3 in AS trunk
pelam888 Mar 25, 2008 9:12 PM (in response to jhalliday)Could you please provide some more information as to how you have managed to get your EJB3 bean accessible over IIOP. There seems to be very little complete documentation on how to expose EJB3.0 beans over IIOP in JBoss.
I have the following:
1. A simple Stateless Session Bean, IIOPInvokableBean ,@Stateless @Remote(IIOPInvokable.class) @RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR) public class IIOPInvokableBean implements IIOPInvokable { public void doSomething() { System.out.println("IIOPInvokableBean - Invoked doSomething() !"); } public String getString() { System.out.println("IIOPInvokableBean - Invoked getString() !"); return "HELLO!"; } }
2. Its remote interface...@Remote public interface IIOPInvokable extends EJBObject { public void doSomething(); public String getString(); }
3. I have REMOVED the jboss.xml from the META-INF folder as you have advised
4. When I deploy the bean to JBoss 5.0.0.Beta3 (and also Jboss 4.2.2), I am presented with the following exception...11:33:19,140 INFO [EJBContainer] STARTED EJB: IIOPInvokableEJB.IIOPInvokableBean ejbName: IIOPInvokableBean 11:33:20,625 INFO [EJBContainer] STOPPED EJB: IIOPInvokableEJB.IIOPInvokableBean ejbName: IIOPInvokableBean 11:33:20,625 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:jar=IIOPInvokableEJBPOC.jar,name=IIOPInvokableBean,service=EJB3 state=Create java.lang.NullPointerException at org.jboss.ejb3.iiop.BeanCorbaServant.<init>(BeanCorbaServant.java:122) at org.jboss.ejb3.iiop.IORFactory.start(IORFactory.java:348)
Am I missing something or doing something incorrectly? Your assistance is appreciated. -
3. Re: CorbaNamingService for EJB3 in AS trunk
utiao Dec 29, 2010 12:23 AM (in response to pelam888)Hi, do you resolve your problem? I am facing the same problem now.
-
4. Re: CorbaNamingService for EJB3 in AS trunk
tnas Nov 8, 2012 3:15 PM (in response to utiao)Me too.
-
5. Re: CorbaNamingService for EJB3 in AS trunk
ymartin Feb 5, 2013 10:31 AM (in response to jhalliday)Does this help ?
http://thetechtips.wordpress.com/2009/09/02/problems-with-ejb3-over-iiop-on-jboss/
With EJB3, the jboss.xml schema has changed since 5.1 and "invoker-bindings" are no longer available.
But I find no example with "remote-binding" in jboss.xml
-
6. Re: CorbaNamingService for EJB3 in AS trunk
ymartin Feb 5, 2013 11:24 AM (in response to ymartin)Here is an answer here: https://community.jboss.org/message/787363
-
7. Re: CorbaNamingService for EJB3 in AS trunk
tnas Jun 14, 2013 12:47 PM (in response to tnas)I've got success to call the EJB3 over IIOP as follow:
Properties props = new Properties();
props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jboss.iiop.naming.ORBInitialContextFactory");
pops.put(InitialContext.PROVIDER_URL, "corbaloc::localhost:3528/JBoss/Naming/root");
InitialContext intCtx = new InitialContext(props);
Object obj = intCtx.lookup(JNDI_NAME);
IService admService = (IService) obj;
MyTask task = admService.getMyTask("id_task");
However, I'm not sure if my ejb3 is in fact exposed over IIOP. How can I verify this?