• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jboss7 IIOP-Client

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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(https://github.com/jboss-jdf/jboss-as-quickstart)

there i found an jboss-ejb3.xml with configuration:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:iiop="urn:iiop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:iiop jboss-ejb-iiop_1_0.xsd"
version="3.1"
impl-version="2.0">
<assembly-descriptor>
<iiop:iiop>
<ejb-name>CounterBean</ejb-name>
<iiop:binding-name>org/jboss/as/quickstarts/ejb/remote/stateful/CounterBean</iiop:binding-name>
</iiop:iiop>
</assembly-descriptor>
</jboss:ejb-jar>

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.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming");

//jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
// jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
//jndiProperties.put(Context.PROVIDER_URL,"corbaloc::localhost:3528/JBoss/Naming/root");
// jndiProperties.put(Context.OBJECT_FACTORIES,"org.jboss.tm.iiop.client.IIOPClientUserTransactionObjectFactory");

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).








 
reply
    Bookmark Topic Watch Topic
  • New Topic