[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-1153) Client container needs an java:comp/ORB binding
Scott M Stark (JIRA)
jira-events at lists.jboss.org
Fri Dec 7 11:04:09 EST 2007
Client container needs an java:comp/ORB binding
-----------------------------------------------
Key: EJBTHREE-1153
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1153
Project: EJB 3.0
Issue Type: Feature Request
Reporter: Scott M Stark
Fix For: AS 5.0.0.CR1
EE.5.11ORB References
Some Java EE applications will need to make use of the CORBA ORB to perform certain operations. Such applications can find an appropriate object implementing the ORB interface by looking up the JNDI name java:comp/ORB or by requesting injection of an ORB object. The container is required to provide the java:comp/ORB name for all components except applets. Any such reference to a ORB object is only valid within the component instance that performed the lookup.
The following example illustrates how an application component acquires and uses an ORB object via injection.
@Resource ORB orb;
public void method(...) {
...
// Get the POA to use when creating object references.
POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");
...
}
The following example illustrates how an application component acquires and uses an ORB object using a JNDI lookup.
public void method(...) {
...
// Obtain the default initial JNDI context.
Context initCtx = new InitialContext();
// Look up the ORB object.
ORB orb = (ORB)initCtx.lookup("java:comp/ORB");
// Get the POA to use when creating object references.
POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list