Examples of Referenceable


Examples of javax.resource.Referenceable

         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

Examples of javax.resource.Referenceable

/*     */     {
/* 123 */       log.debug("Binding object '" + this.cf + "' into JNDI at '" + this.bindName + "'");
/*     */
/* 125 */       NonSerializableFactory.rebind(this.bindName, this.cf);
/*     */
/* 133 */       Referenceable referenceable = (Referenceable)this.cf;
/*     */
/* 135 */       ByteArrayOutputStream baos = new ByteArrayOutputStream();
/* 136 */       ObjectOutputStream oos = new ObjectOutputStream(baos);
/* 137 */       oos.writeObject(this.theProxy);
/* 138 */       oos.close();
/* 139 */       byte[] proxyBytes = baos.toByteArray();
/* 140 */       BinaryRefAddr dsAddr = new BinaryRefAddr("ProxyData", proxyBytes);
/* 141 */       String factory = DataSourceFactory.class.getName();
/* 142 */       Reference dsRef = new Reference("javax.sql.DataSource", dsAddr, factory, null);
/* 143 */       referenceable.setReference(dsRef);
/*     */
/* 145 */       baos.reset();
/* 146 */       ObjectOutputStream oos2 = new ObjectOutputStream(baos);
/* 147 */       oos2.writeObject(DataSourceFactory.vmID);
/* 148 */       oos2.close();
View Full Code Here

Examples of javax.resource.Referenceable

/*     */   {
/* 272 */     InitialContext initCtx = new InitialContext();
/*     */     try
/*     */     {
/* 277 */       NonSerializableFactory.rebind(this.bindName, this.cf);
/* 278 */       Referenceable referenceable = (Referenceable)this.cf;
/*     */
/* 280 */       ByteArrayOutputStream baos = new ByteArrayOutputStream();
/* 281 */       ObjectOutputStream oos = new ObjectOutputStream(baos);
/* 282 */       oos.writeObject(this.theProxy);
/* 283 */       oos.close();
/*     */
/* 285 */       byte[] proxyBytes = baos.toByteArray();
/* 286 */       BinaryRefAddr dsAddr = new BinaryRefAddr("ProxyData", proxyBytes);
/* 287 */       String remoteFactoryName = RemoteConnectionFactoryHelper.class.getName();
/* 288 */       String localFactoryName = this.cf.getClass().getName();
/*     */
/* 290 */       Reference dsRef = new Reference(localFactoryName, dsAddr, remoteFactoryName, null);
/* 291 */       referenceable.setReference(dsRef);
/*     */
/* 293 */       baos.reset();
/* 294 */       ObjectOutputStream oos2 = new ObjectOutputStream(baos);
/* 295 */       oos2.writeObject(RemoteConnectionFactoryHelper.vmID);
/* 296 */       oos2.close();
View Full Code Here

Examples of javax.resource.Referenceable

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

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

        final Referenceable referenceable = (Referenceable) obj;
        referenceable.setReference(reference);

        final Context context = new InitialContext();
        try {
            Util.bind(context, jndiName, obj);
            log.debugf("Bound %s under %s", className, jndiName);
View Full Code Here

Examples of javax.resource.Referenceable

            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())
               log.debug("Bound " + ao.getClass().getName() + " under " + jndiName);
View Full Code Here

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

Examples of javax.resource.Referenceable

         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())
            log.debug("Bound " + ao.getClass().getName() + " under " + jndiName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.