Refine search
public Reference getReference() throws NamingException { final String className = getClass().getName(); final String factoryName = className + "Factory"; // XXX: not robust Reference ref = new Reference(className, factoryName, null); ref.add(new StringRefAddr("instanceKey", instanceKey)); ref.add(new StringRefAddr("url", this.getUrl())); ref.add(new StringRefAddr("username", this.getUsername())); ref.add(new StringRefAddr("password", this.getPassword())); // TODO ADD OTHER PROPERTIES return ref; }
@Override public Reference getReference() { return new Reference(Ehcache3XAResourceProducer.class.getName(), new StringRefAddr("uniqueName", getUniqueName()), ResourceObjectFactory.class.getName(), null); }
/** * Adds custom properties for this DataSource to the properties defined in the superclass. */ public Reference getReference() throws NamingException { Reference ref = super.getReference(); ref.add(new StringRefAddr("dataSourceName", dataSourceName)); if (initialConnections > 0) { ref.add(new StringRefAddr("initialConnections", Integer.toString(initialConnections))); } if (maxConnections > 0) { ref.add(new StringRefAddr("maxConnections", Integer.toString(maxConnections))); } return ref; }
public Reference getReference() throws NamingException { final String className = getClass().getName(); final String factoryName = className + "Factory"; // XXX: not robust Reference ref = new Reference(className, factoryName, null); ref.add(new StringRefAddr("instanceKey", instanceKey)); ref.add(new StringRefAddr("url", this.getUrl())); ref.add(new StringRefAddr("username", this.getUsername())); ref.add(new StringRefAddr("password", this.getPassword())); // TODO ADD OTHER PROPERTIES return ref; }
@Override public Reference getReference() { // from javax.naming.Referenceable LOG.debug( "Returning a Reference to the SessionFactory" ); return new Reference( SessionFactoryImpl.class.getName(), new StringRefAddr("uuid", getUuid()), SessionFactoryRegistry.ObjectFactoryImpl.class.getName(), null ); }
/** * Adds custom properties for this DataSource to the properties defined in * the superclass. */ public Reference getReference() throws NamingException { Reference ref = super.getReference(); ref.add(new StringRefAddr("dataSourceName", dataSourceName)); if (initialConnections > 0) { ref.add(new StringRefAddr("initialConnections", Integer.toString(initialConnections))); } if (maxConnections > 0) { ref.add(new StringRefAddr("maxConnections", Integer.toString(maxConnections))); } return ref; } }
/** * Get a new reference for this object, using the current settings. * * @return the new reference */ @Override public Reference getReference() { debugCodeCall("getReference"); String factoryClassName = JdbcDataSourceFactory.class.getName(); Reference ref = new Reference(getClass().getName(), factoryClassName, null); ref.add(new StringRefAddr("url", url)); ref.add(new StringRefAddr("user", userName)); ref.add(new StringRefAddr("password", convertToString(passwordChars))); ref.add(new StringRefAddr("loginTimeout", String.valueOf(loginTimeout))); ref.add(new StringRefAddr("description", description)); return ref; }
public Reference getReference() throws NamingException { return new Reference( BitronixTransactionManager.class.getName(), new StringRefAddr("TransactionSynchronizationRegistry", "BitronixTransactionSynchronizationRegistry"), BitronixTransactionSynchronizationRegistryObjectFactory.class.getName(), null ); }
ref.add(new StringRefAddr("serverName", serverName)); if (portNumber != 0) ref.add(new StringRefAddr("portNumber", Integer.toString(portNumber))); ref.add(new StringRefAddr("databaseName", databaseName)); if (user != null) ref.add(new StringRefAddr("user", user)); ref.add(new StringRefAddr("password", password)); ref.add(new StringRefAddr("prepareThreshold", Integer.toString(prepareThreshold))); ref.add(new StringRefAddr("unknownLength", Integer.toString(unknownLength))); ref.add(new StringRefAddr("loginTimeout", Integer.toString(loginTimeout))); ref.add(new StringRefAddr("socketTimeout", Integer.toString(socketTimeout))); ref.add(new StringRefAddr("ssl", Boolean.toString(ssl))); ref.add(new StringRefAddr("sslfactory", sslfactory)); ref.add(new StringRefAddr("tcpKeepAlive", Boolean.toString(tcpKeepAlive))); if (compatible != null) ref.add(new StringRefAddr("compatible", compatible)); ref.add(new StringRefAddr("logLevel", Integer.toString(logLevel))); ref.add(new StringRefAddr("protocolVersion", Integer.toString(protocolVersion))); ref.add(new StringRefAddr("ApplicationName", applicationName));
/** * @param on ObjectName instance to work with. * @return A simple reference based on passed <code>on</code> */ public static Reference getReference(final ObjectName on) { Reference r = new Reference(String.class.getName()); Hashtable<String,String> ht = on.getKeyPropertyList(); r.add(new StringRefAddr("host", (String)ht.get("host"))); r.add(new StringRefAddr("name", (String)ht.get("name"))); // Put in a value to serve as a unique 'key'. r.add(new StringRefAddr("key", on.getCanonicalKeyPropertyListString())); return r; }
/** * @see javax.naming.Referenceable#getReference() */ public Reference getReference() throws NamingException { return new Reference( SessionFactoryStub.class.getName(), new StringRefAddr("uuid", uuid), SessionFactoryObjectFactory.class.getName(), null ); }
public Reference getReference() throws NamingException { Reference ref = createReference(); ref.add(new StringRefAddr("serverName", serverName)); if (portNumber != 0) { ref.add(new StringRefAddr("portNumber", Integer.toString(portNumber))); } ref.add(new StringRefAddr("databaseName", databaseName)); if (user != null) { ref.add(new StringRefAddr("user", user)); } if (password != null) { ref.add(new StringRefAddr("password", password)); } for (PGProperty property : PGProperty.values()) { if (property.isPresent(properties)) { ref.add(new StringRefAddr(property.getName(), property.get(properties))); } } return ref; }
/** * Get a new reference for this object, using the current settings. * * @return the new reference */ @Override public Reference getReference() { debugCodeCall("getReference"); String factoryClassName = JdbcDataSourceFactory.class.getName(); Reference ref = new Reference(getClass().getName(), factoryClassName, null); ref.add(new StringRefAddr("url", url)); ref.add(new StringRefAddr("user", userName)); ref.add(new StringRefAddr("password", convertToString(passwordChars))); ref.add(new StringRefAddr("loginTimeout", String.valueOf(loginTimeout))); ref.add(new StringRefAddr("description", description)); return ref; }
@Override public Reference getReference() throws NamingException { return new Reference( BitronixTransactionManager.class.getName(), new StringRefAddr("TransactionSynchronizationRegistry", "BitronixTransactionSynchronizationRegistry"), BitronixTransactionSynchronizationRegistryObjectFactory.class.getName(), null ); }
/** * Insert a key/value String/String couple in the given Reference as a StringRefAddr. * @param ref Reference to be modified * @param key Address' key * @param value Address' value */ public static void insertInto(final Reference ref, final String key, final String value) { if (value != null) { RefAddr addr = new StringRefAddr(key, value); ref.add(addr); } // else, print a debug message ? }
/** * Create a Reference instance from a JNDIStorable object * * @param instanceClassName * The name of the class that is being created. * @param po * The properties object to use when configuring the new instance. * * @return Reference * * @throws NamingException if an error occurs while creating the new instance. */ public static Reference createReference(String instanceClassName, JNDIStorable po) throws NamingException { Reference result = new Reference(instanceClassName, JNDIReferenceFactory.class.getName(), null); try { Properties props = po.getProperties(); for (Enumeration iter = props.propertyNames(); iter.hasMoreElements();) { String key = (String)iter.nextElement(); result.add(new StringRefAddr(key, props.getProperty(key))); } } catch (Exception e) { throw new NamingException(e.getMessage()); } return result; }
/** * @see javax.naming.Referenceable#getReference() */ public Reference getReference() throws NamingException { return new Reference( SessionFactoryStub.class.getName(), new StringRefAddr("uuid", uuid), SessionFactoryObjectFactory.class.getName(), null ); }
/** Sets the naming reference of a connection factory. */ public void toReference(Reference ref) throws NamingException { ref.add(new StringRefAddr("dest.agentId", agentId)); ref.add(new StringRefAddr("dest.adminName", adminName)); }
/** * Create a Reference instance from a JNDIStorable object * * @param instanceClassName * @param po * @return * @throws NamingException */ public static Reference createReference(String instanceClassName, JNDIStorableInterface po) throws NamingException { if (log.isTraceEnabled()) { log.trace("Creating reference: " + instanceClassName + "," + po); } Reference result = new Reference(instanceClassName, JNDIReferenceFactory.class.getName(), null); try { Properties props = po.getProperties(); for (Enumeration iter = props.propertyNames(); iter.hasMoreElements();) { String key = (String)iter.nextElement(); String value = props.getProperty(key); javax.naming.StringRefAddr addr = new javax.naming.StringRefAddr(key, value); result.add(addr); } } catch (Exception e) { log.error(e.getMessage(), e); throw new NamingException(e.getMessage()); } return result; }
/** * @see javax.naming.Referenceable#getReference() */ @Override public Reference getReference() throws NamingException { return new Reference( SessionFactoryStub.class.getName(), new StringRefAddr("uuid", uuid), SessionFactoryRegistry.ObjectFactoryImpl.class.getName(), null ); }