[jboss-user] [EJB/JBoss] - EJB3 and CORBA clients
arv
do-not-reply at jboss.com
Tue May 6 11:00:46 EDT 2008
Hello,
could somebody explain me, how to connect a ejb3 bean deployed in jboss-5.0.0.Beta4 from a CORBA client (Java and/or C++) ?
Here is the bean code:
Bean Interface:
| package arv;
|
| import java.rmi.RemoteException;
| import javax.ejb.EJBObject;
|
| public interface HelloInterface extends EJBObject
| {
| void helloWorld() throws RemoteException;
| }
|
Bean Implementation:
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
|
| import org.jboss.ejb3.annotation.IIOP;
| import org.jboss.ejb3.annotation.RemoteBinding;
| import org.jboss.ejb3.annotation.defaults.RemoteBindingDefaults;
|
| import java.rmi.RemoteException;
|
| @Stateless
| @Remote(HelloInterface.class)
| @RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
| @IIOP(interfaceRepositorySupported=false)
| public class HelloWorldBean {
|
| public HelloWorldBean() throws Exception {}
|
| public void helloWorld() throws RemoteException {
| System.out.println("Hello");
| }
|
| }
|
|
I compiled both classes and packaged them in a jar-file HelloWorld.jar.
I copied the jar file into jboss-5.0.0.Beta4/server/all/deploy and
got following jboss output:
|
| 13:44:02,426 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=HelloWorld.jar,name=HelloWorldBean,service=EJB3 with dependencies:
| 13:44:02,457 INFO [MCKernelAbstraction] and demands:
| 13:44:02,457 INFO [MCKernelAbstraction] jboss.ejb:service=EJBTimerService
| 13:44:02,457 INFO [MCKernelAbstraction] and supplies:
| 13:44:06,263 INFO [EJBContainer] STARTED EJB: arv.HelloWorldBean ejbName: HelloWorldBean
|
|
JNDIView shows following entries:
| java:comp namespace of the component jboss.j2ee:jar=HelloWorld.jar,name=HelloWorldBean,service=EJB3 :
|
| +- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
| +- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)
| +- EJBContext (class: javax.ejb.EJBContext)
| +- env (class: org.jnp.interfaces.NamingContext)
| +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
|
|
Thank you very much !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148851#4148851
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148851
More information about the jboss-user
mailing list