/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal()); javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties(); while (i.hasNext()) { String key = i.next().toString(); Object val = resourceLink.getProperty(key); if (val!=null) { StringRefAddr refAddr = new StringRefAddr(key, val.toString()); ref.add(refAddr); } } javax.naming.Context ctx = "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) log.debug(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); ctx.bind(resourceLink.getName(), ref); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
/** * Set the specified resource link in the naming context. */ public void addResourceLink(ContextResourceLink resourceLink) { // Create a reference to the resource. Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal()); // Adding the additional parameters, if any addAdditionalParameters(resourceLink.getNamingResources(), ref, resourceLink.getName()); try { if (debug >= 2) log(" Adding resource link " + resourceLink.getName()); createSubcontexts(envCtx, resourceLink.getName()); envCtx.bind(resourceLink.getName(), ref); } catch (NamingException e) { String msg = MessageFormat.format(rb.getString(LogFacade.BIND_OBJECT_FAILED), e); log(msg); } }
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties();
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name * @param factory The possibly null class name of the object's factory. * @param factoryLocation The possibly null location from which to load the * factory (e.g. URL) */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }
Reference ref = new ResourceLinkRef (resourceLink.getType(), resourceLink.getGlobal(), resourceLink.getFactory(), null); Iterator<String> i = resourceLink.listProperties();
/** * ResourceLink Reference. * * @param resourceClass Resource class * @param globalName Global name * @param factory The possibly null class name of the object's factory. * @param factoryLocation The possibly null location from which to load the * factory (e.g. URL) */ public ResourceLinkRef(String resourceClass, String globalName, String factory, String factoryLocation) { super(resourceClass, factory, factoryLocation); StringRefAddr refAddr = null; if (globalName != null) { refAddr = new StringRefAddr(GLOBALNAME, globalName); add(refAddr); } }