Reputation: 1539
Is it possible to remotely access an EJB on a JBoss AS 4 from a JBoss AS 7 and vice versa (using EJB3)?
If so, how can I do it?
I am looking for any information about remoting between different JBoss Versions. There must be something on the web, but I'm struggling on finding the right search terms.
Upvotes: 3
Views: 45
Reputation: 5960
It's possible.
You have to create the remote interface and the bean on JBoss A4.
@javax.ejb.Remote
public interface JBossFourRemote{
int doSomething();
}
@javax.ejb.Stateless
public JBossFourBean implements JBossFourRemote{
public int doSomething(){
return 1;
}
}
Deploy that, and then call the bean from the JBoss AS 7 client as follows.
public void someJBossSevenMethod(String args[]){
JBossFourRemote bean = (JBossFourRemote)new InitialContext().lookup("java:global/app/module/JBossFourBean!JBossFourRemote");
bean.doSomething();
}
Upvotes: 1