本文整理了Java中javax.naming.Reference.size
方法的一些代码示例,展示了Reference.size
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.size
方法的具体详情如下:
包路径:javax.naming.Reference
类名称:Reference
方法名:size
暂无
代码示例来源:origin: wildfly/wildfly
static ObjectFactory lookForURLs(Reference ref, Hashtable environment)
throws NamingException {
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
if (addr instanceof StringRefAddr &&
addr.getType().equalsIgnoreCase("URL")) {
String url = (String) addr.getContent();
ObjectFactory answer = processURL(url, environment);
if (answer != null) {
return answer;
}
}
}
return null;
}
代码示例来源:origin: org.wildfly/wildfly-naming
static ObjectFactory lookForURLs(Reference ref, Hashtable environment)
throws NamingException {
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
if (addr instanceof StringRefAddr &&
addr.getType().equalsIgnoreCase("URL")) {
String url = (String) addr.getContent();
ObjectFactory answer = processURL(url, environment);
if (answer != null) {
return answer;
}
}
}
return null;
}
代码示例来源:origin: org.jboss.eap/wildfly-naming
static ObjectFactory lookForURLs(Reference ref, Hashtable environment)
throws NamingException {
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
if (addr instanceof StringRefAddr &&
addr.getType().equalsIgnoreCase("URL")) {
String url = (String) addr.getContent();
ObjectFactory answer = processURL(url, environment);
if (answer != null) {
return answer;
}
}
}
return null;
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Returns the Reference object for the data source object.
This is used by JNDI when bound in a JNDI naming service.
Contains the information necessary to reconstruct the data source
object when it is later retrieved from JNDI via an object factory.
@return A Reference object for the data source object.
@exception NamingException If a naming error occurs resolving the object.
**/
public Reference getReference()
throws NamingException
{
Reference ref = new Reference(this.getClass().getName(),
"com.ibm.as400.access.AS400JDBCObjectFactory",
null);
Reference dsRef = super.getReference();
for (int i=0; i< dsRef.size(); i++)
ref.add( dsRef.get(i) );
return ref;
}
代码示例来源:origin: net.sf.jt400/jt400
/**
* Returns the Reference object for the data source object.
* This is used by JNDI when bound in a JNDI naming service.
* Contains the information necessary to reconstruct the data source
* object when it is later retrieved from JNDI via an object factory.
*
* @return A Reference object for the data source object.
* @exception NamingException If a naming error occurs resolving the object.
**/
public Reference getReference() throws NamingException
{
Reference ref = new Reference(this.getClass().getName(),
"com.ibm.as400.access.AS400JDBCObjectFactory",
null);
Reference dsRef = super.getReference();
for (int i=0; i< dsRef.size(); i++)
ref.add( dsRef.get(i) );
return ref;
}
代码示例来源:origin: org.exoplatform.kernel/exo.kernel.component.common
/**
* @inheritDoc
*/
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception
{
if ((obj == null) || !(obj instanceof Reference))
{
return null;
}
Reference ref = (Reference)obj;
if (!"javax.sql.DataSource".equals(ref.getClassName()))
{
return null;
}
Properties properties = new Properties();
for (int i = 0; i < ref.size(); i++)
{
String propertyName = ref.get(i).getType();
RefAddr ra = ref.get(propertyName);
if (ra != null)
{
String propertyValue = ra.getContent().toString();
properties.setProperty(propertyName, propertyValue);
}
}
return createDataSource(properties);
}
代码示例来源:origin: com.caucho/com.springsource.com.caucho
String password = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: alipay/sofa-hessian
String url = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: com.caucho/com.springsource.com.caucho
String password = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: org.vx68k.quercus/hessian
String url = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: org.vx68k.quercus/hessian
String password = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: alipay/sofa-hessian
String password = null;
for (int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
代码示例来源:origin: stackoverflow.com
System.out.println("Resolving context reference values dynamically");
for(int i = 0; i < ref.size(); i++) {
RefAddr addr = ref.get(i);
String tag = addr.getType();
代码示例来源:origin: c3p0/c3p0
/**
* @deprecated nesting references seemed useful until I realized that
* references are Serializable and can be stored in a BinaryRefAddr.
* Oops.
*/
public static void appendToReference(Reference appendTo, Reference orig)
throws NamingException
{
int len = orig.size();
appendTo.add( new StringRefAddr( REFADDR_VERSION, String.valueOf( CURRENT_REF_VERSION ) ) );
appendTo.add( new StringRefAddr( REFADDR_CLASSNAME, orig.getClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY, orig.getFactoryClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY_CLASS_LOCATION,
orig.getFactoryClassLocation() ) );
appendTo.add( new StringRefAddr( REFADDR_SIZE, String.valueOf(len) ) );
for (int i = 0; i < len; ++i)
appendTo.add( orig.get(i) );
}
代码示例来源:origin: org.exoplatform.kernel/exo.kernel.component.common
for (int i = 0; i < reference.size(); i++)
代码示例来源:origin: com.mchange.c3p0/com.springsource.com.mchange.v2.c3p0
/**
* @deprecated nesting references seemed useful until I realized that
* references are Serializable and can be stored in a BinaryRefAddr.
* Oops.
*/
public static void appendToReference(Reference appendTo, Reference orig)
throws NamingException
{
int len = orig.size();
appendTo.add( new StringRefAddr( REFADDR_VERSION, String.valueOf( CURRENT_REF_VERSION ) ) );
appendTo.add( new StringRefAddr( REFADDR_CLASSNAME, orig.getClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY, orig.getFactoryClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY_CLASS_LOCATION,
orig.getFactoryClassLocation() ) );
appendTo.add( new StringRefAddr( REFADDR_SIZE, String.valueOf(len) ) );
for (int i = 0; i < len; ++i)
appendTo.add( orig.get(i) );
}
代码示例来源:origin: com.mchange/mchange-commons-java
/**
* @deprecated nesting references seemed useful until I realized that
* references are Serializable and can be stored in a BinaryRefAddr.
* Oops.
*/
public static void appendToReference(Reference appendTo, Reference orig)
throws NamingException
{
int len = orig.size();
appendTo.add( new StringRefAddr( REFADDR_VERSION, String.valueOf( CURRENT_REF_VERSION ) ) );
appendTo.add( new StringRefAddr( REFADDR_CLASSNAME, orig.getClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY, orig.getFactoryClassName() ) );
appendTo.add( new StringRefAddr( REFADDR_FACTORY_CLASS_LOCATION,
orig.getFactoryClassLocation() ) );
appendTo.add( new StringRefAddr( REFADDR_SIZE, String.valueOf(len) ) );
for (int i = 0; i < len; ++i)
appendTo.add( orig.get(i) );
}
代码示例来源:origin: net.sf.jt400/jt400
for (int i=0; i<dsRef.size(); i++)
代码示例来源:origin: codefollower/Tomcat-Research
for (int i = 0; i < ref.size(); i++)
if (ServiceRef.SERVICEENDPOINTINTERFACE.equals(ref.get(i).getType())) {
String serviceendpoint = "";
代码示例来源:origin: org.jboss.jbossas/jboss-as-server
reference.add(addr);
if (reference.size() == 1 && reference.get("default") == null)
内容来源于网络,如有侵权,请联系作者删除!