Package javax.resource

Examples of javax.resource.Referenceable


            ref.add(new StringRefAddr("name", jndiName));

            if (objs.putIfAbsent(qualifiedName(jndiName, className), cf) != null)
               throw new Exception(bundle.deploymentFailedSinceJndiNameHasDeployed(className, jndiName));

            Referenceable referenceable = (Referenceable)cf;
            referenceable.setReference(ref);
           
            Util.bind(context, jndiName, cf);

            if (log.isDebugEnabled())
               log.debug("Bound " + cf.getClass().getName() + " under " + jndiName);
View Full Code Here


               ref.add(new StringRefAddr("name", jndiName));

               if (objs.putIfAbsent(qualifiedName(jndiName, className), ao) != null)
                  throw new Exception(bundle.deploymentFailedSinceJndiNameHasDeployed(className, jndiName));

               Referenceable referenceable = (Referenceable)ao;
               referenceable.setReference(ref);
            }
           
            Util.bind(context, jndiName, ao);

            if (log.isDebugEnabled())
View Full Code Here

         ref.add(new StringRefAddr("name", jndiName));

         if (objs.putIfAbsent(qualifiedName(jndiName, className), cf) != null)
            throw new Exception(bundle.deploymentFailedSinceJndiNameHasDeployed(className, jndiName));

         Referenceable referenceable = (Referenceable)cf;
         referenceable.setReference(ref);

         Util.bind(context, jndiName, cf);

         if (log.isDebugEnabled())
            log.debug("Bound " + cf.getClass().getName() + " under " + jndiName);
View Full Code Here

         is being done locally or remotely and returns either the just bound
         connection factory, or a DataSource proxy that uses the detached
         invoker framework to expose remote proxies to the server side
         DataSource and related elements.
         */
         Referenceable referenceable = (Referenceable) cf;
         // Set the DataSource proxy as the ProxyData ref address
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(baos);
         oos.writeObject(theProxy);
         oos.close();
         byte[] proxyBytes = baos.toByteArray();
         BinaryRefAddr dsAddr = new BinaryRefAddr("ProxyData", proxyBytes);
         String factory = DataSourceFactory.class.getName();
         Reference dsRef = new Reference("javax.sql.DataSource", dsAddr, factory, null);
         referenceable.setReference(dsRef);
         // Set the VMID as the address local/remote indicator
         baos.reset();
         ObjectOutputStream oos2 = new ObjectOutputStream(baos);
         oos2.writeObject(DataSourceFactory.vmID);
         oos2.close();
View Full Code Here

      try
      {

         NonSerializableFactory.rebind(bindName, cf);
         final Referenceable referenceable = (Referenceable) cf;

         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
         final ObjectOutputStream oos = new ObjectOutputStream(baos);
         oos.writeObject(theProxy);
         oos.close();

         final byte[] proxyBytes = baos.toByteArray();
         final BinaryRefAddr dsAddr = new BinaryRefAddr("ProxyData", proxyBytes);
         final String remoteFactoryName = RemoteConnectionFactoryHelper.class.getName();
         final String localFactoryName = cf.getClass().getName();

         final Reference dsRef = new Reference(localFactoryName, dsAddr, remoteFactoryName, null);
         referenceable.setReference(dsRef);

         baos.reset();
         final ObjectOutputStream oos2 = new ObjectOutputStream(baos);
         oos2.writeObject(RemoteConnectionFactoryHelper.vmID);
         oos2.close();
View Full Code Here

            ref.add(new StringRefAddr("name", jndiName));

            if (objs.putIfAbsent(qualifiedName(jndiName, className), cf) != null)
               throw new Exception("Deployment " + className + " failed, " + jndiName + " is already deployed");

            Referenceable referenceable = (Referenceable)cf;
            referenceable.setReference(ref);
           
            Util.bind(context, jndiName, cf);

            if (log.isDebugEnabled())
               log.debug("Bound " + cf.getClass().getName() + " under " + jndiName);
View Full Code Here

            ref.add(new StringRefAddr("name", jndiName));

            if (objs.putIfAbsent(qualifiedName(jndiName, className), ao) != null)
               throw new Exception("Deployment " + className + " failed, " + jndiName + " is already deployed");

            Referenceable referenceable = (Referenceable)ao;
            referenceable.setReference(ref);
           
            Util.bind(context, jndiName, ao);

            if (log.isDebugEnabled())
               log.debug("Bound " + ao.getClass().getName() + " under " + jndiName);
View Full Code Here

         ref.add(new StringRefAddr("name", jndiName));

         if (objs.putIfAbsent(qualifiedName(jndiName, className), cf) != null)
            throw new Exception("Deployment " + className + " failed, " + jndiName + " is already deployed");

         Referenceable referenceable = (Referenceable)cf;
         referenceable.setReference(ref);

         Util.bind(context, jndiName, cf);

         if (log.isDebugEnabled())
            log.debug("Bound " + cf.getClass().getName() + " under " + jndiName);
View Full Code Here

         ref.add(new StringRefAddr("name", jndiName));

         if (objs.putIfAbsent(qualifiedName(jndiName, className), ao) != null)
            throw new Exception("Deployment " + className + " failed, " + jndiName + " is already deployed");

         Referenceable referenceable = (Referenceable)ao;
         referenceable.setReference(ref);

         Util.bind(context, jndiName, ao);

         if (log.isDebugEnabled())
            log.debug("Bound " + ao.getClass().getName() + " under " + jndiName);
View Full Code Here

            ref.add(new StringRefAddr("name", jndiName));

            if (connectionFactories.putIfAbsent(qualifiedName(jndiName, className), cf) != null)
               throw new Exception("Deployment " + className + " failed, " + jndiName + " is already deployed");

            Referenceable referenceable = (Referenceable)cf;
            referenceable.setReference(ref);
           
            Util.bind(context, jndiName, cf);

            if (log.isDebugEnabled())
               log.debug("Bound " + cf.getClass().getName() + " under " + jndiName);
View Full Code Here

TOP

Related Classes of javax.resource.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.