Class JNDIStateFactoryImpl

  • All Implemented Interfaces:
    javax.naming.spi.StateFactory

    public class JNDIStateFactoryImpl
    extends java.lang.Object
    implements javax.naming.spi.StateFactory
    StateFactory that turns java.rmi.Remote objects to org.omg.CORBA.Object. This version works either with standard RMI-IIOP or Dynamic RMI-IIOP.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,​java.lang.reflect.Field> orbFields  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.reflect.Field getField​(java.lang.Class<?> aClass, java.lang.String fieldName)  
      private ORB getORB​(javax.naming.Context ctx)  
      private java.lang.reflect.Field getOrbField​(javax.naming.Context ctx)  
      java.lang.Object getStateToBind​(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable<?,​?> env)
      Returns the CORBA object for a Remote object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • orbFields

        private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,​java.lang.reflect.Field> orbFields
    • Constructor Detail

      • JNDIStateFactoryImpl

        public JNDIStateFactoryImpl()
    • Method Detail

      • getStateToBind

        public java.lang.Object getStateToBind​(java.lang.Object orig,
                                               javax.naming.Name name,
                                               javax.naming.Context ctx,
                                               java.util.Hashtable<?,​?> env)
                                        throws javax.naming.NamingException
        Returns the CORBA object for a Remote object. If input is not a Remote object, or if Remote object uses JRMP, return null. If the RMI-IIOP library is not available, throw ConfigurationException.
        Specified by:
        getStateToBind in interface javax.naming.spi.StateFactory
        Parameters:
        orig - The object to turn into a CORBA object. If not Remote, or if is a JRMP stub or impl, return null.
        name - Ignored
        ctx - The non-null CNCtx whose ORB to use.
        env - Ignored
        Returns:
        The CORBA object for orig or null.
        Throws:
        javax.naming.ConfigurationException - If the CORBA object cannot be obtained due to configuration problems
        javax.naming.NamingException - If some other problem prevented a CORBA object from being obtained from the Remote object.
      • getORB

        private ORB getORB​(javax.naming.Context ctx)
      • getOrbField

        private java.lang.reflect.Field getOrbField​(javax.naming.Context ctx)
      • getField

        private java.lang.reflect.Field getField​(java.lang.Class<?> aClass,
                                                 java.lang.String fieldName)