my dog learned polymorphism
The moose likes JBoss/WildFly and the fly likes Jboss7 IIOP-Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss7 IIOP-Client" Watch "Jboss7 IIOP-Client" New topic

Jboss7 IIOP-Client

Gary Dux

Joined: Aug 14, 2008
Posts: 7
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).

I agree. Here's the link:
subject: Jboss7 IIOP-Client
It's not a secret anymore!