Package javax.naming

Examples of javax.naming.Referenceable


            final E annotated, final UnifiedVirtualFile vfs, final Module duModule, final String name,
            final String className, final AbstractComponentDescription componentDescription) {
        UnifiedServiceRefMetaData ref = processor.process(annotation, annotated, vfs);
        // FIXME SPIProviderResolver won't require a TCCL in the future
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        final Referenceable referenceable;
        try {
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
            final ServiceRefHandler serviceRefHandler = spiProvider.getSPI(ServiceRefHandlerFactory.class).getServiceRefHandler();
            referenceable = serviceRefHandler.createReferenceable(ref);
View Full Code Here


                                                String className)
            throws Exception {
        println("Testing recreated empty data source.");
        // Create an empty data source.
        Object ds = Class.forName(className).newInstance();
        Referenceable refDs = (Referenceable)ds;
        Reference dsAsReference = refDs.getReference();
        String factoryClassName = dsAsReference.getFactoryClassName();
        ObjectFactory factory =
            (ObjectFactory)Class.forName(factoryClassName).newInstance();
        Object recreatedDs =
            factory.getObjectInstance(dsAsReference, null, null, null);
View Full Code Here

            } else {
                fail("'" + property + "' not settable - update test!!");
            }
        }

        Referenceable refDs = (Referenceable)ds;
        Reference dsAsReference = refDs.getReference();
        String factoryClassName = dsAsReference.getFactoryClassName();
        ObjectFactory factory =
            (ObjectFactory)Class.forName(factoryClassName).newInstance();
        Object recreatedDs =
            factory.getObjectInstance(dsAsReference, null, null, null);
View Full Code Here

    public Object getValue() throws IllegalStateException, IllegalArgumentException {
        final ClassLoader oldCL = getContextClassLoader();
        try {
            final ClassLoader integrationCL = new DelegateClassLoader(getClassLoader(),oldCL);
            setContextClassLoader(integrationCL);
            final Referenceable referenceable = getReferenceable(integrationCL);
            final Class<?> clazz = Class.forName(referenceable.getReference().getFactoryClassName(), true, integrationCL);
            final ObjectFactory factory = (ObjectFactory)clazz.newInstance();
            return factory.getObjectInstance(referenceable.getReference(), null, null, null);
        } catch (final Exception e) {
            throw new RuntimeException(e);
        } finally {
            setContextClassLoader(oldCL);
        }
View Full Code Here

        }

        private Referenceable getReferenceable() {
            // FIXME SPIProviderResolver won't require a TCCL in the future
            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
            final Referenceable referenceable;
            try {
                Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
                final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
                final ServiceRefHandler serviceRefHandler = spiProvider.getSPI(ServiceRefHandlerFactory.class).getServiceRefHandler();
                return serviceRefHandler.createReferenceable(serviceRef);
View Full Code Here

         }
      }

      // Do not use rebind, the binding should be unique
      // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
      Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
      Util.bind(encCtx, encName, serviceReferenceable);

   }
View Full Code Here

/* 200 */         WSFException.rethrow("Cannot extract service QName for target service", e);
/*     */       }
/*     */
/*     */     }
/*     */
/* 206 */     Referenceable serviceReferenceable = buildServiceReferenceable(serviceImplClass, targetClassName, serviceRef);
/* 207 */     Util.bind(encCtx, encName, serviceReferenceable);
/*     */   }
View Full Code Here

        final Reference reference = cast(object);
        return reference;
    }

    public static Referenceable asReferenceable(final Object object) {
        final Referenceable referenceable = cast(object);
        return referenceable;
    }
View Full Code Here

TOP

Related Classes of javax.naming.Referenceable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.