Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jboss7 IIOP-Client

Gary Dux
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello together,

investigating "getting started" for Jboss7 i have an example for an IIOP-Configuration: jboss-as-quickstart-master\jts\application-component-2(

there i found an jboss-ejb3.xml with configuration:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:ejb-jar xmlns:jboss=""
urn:iiop jboss-ejb-iiop_1_0.xsd"

And the Code calling this EJB from a Container would be like this:
@EJB(lookup = "corbaname:iiop:localhost:3628#org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean")
RemoteCounter counterBean;

My Question is, how would be the jndi.properies or else for the Client like this?

public static RemoteCounter lookupRemoteStatefulCounter() throws NamingException {
final Hashtable jndiProperties = new Hashtable();

// jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
// jndiProperties.put(Context.OBJECT_FACTORIES,"");

final Context context = new InitialContext(jndiProperties);
String iiopJNDI = "corbaname:iiop:localhost:3528#org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean";

return (RemoteCounter) context.lookup(iiopJNDI);

My many attempts do not led to any success.

I know there is another way to "lookup" an ejb on Jboss7 but i need it on this way. Please do not come with answer from the same sample-collection(f.e. ejb-remote).

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic