本文整理了Java中javax.naming.Context.getNameParser()
方法的一些代码示例,展示了Context.getNameParser()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getNameParser()
方法的具体详情如下:
包路径:javax.naming.Context
类名称:Context
方法名:getNameParser
暂无
代码示例来源:origin: wildfly/wildfly
@Override
public NameParser getNameParser(String name) throws NamingException {
return context.getNameParser(name);
}
代码示例来源:origin: wildfly/wildfly
@Override
public NameParser getNameParser(Name name) throws NamingException {
return context.getNameParser(name.toString());
}
代码示例来源:origin: wildfly/wildfly
@Override
public NameParser getNameParser(final String name) throws NamingException {
return CNCtxFactory.INSTANCE.getInitialContext(environment).getNameParser(name);
}
代码示例来源:origin: wildfly/wildfly
@Override
public NameParser getNameParser(final Name name) throws NamingException {
return CNCtxFactory.INSTANCE.getInitialContext(environment).getNameParser(name);
}
代码示例来源:origin: wildfly/wildfly
/**
* Unbinds a name from ctx, and removes parents if they are empty
*
* @param ctx the parent JNDI Context under which the name will be unbound
* @param name The name to unbind
* @throws NamingException for any error
*/
public static void unbind(Context ctx, String name) throws NamingException {
unbind(ctx, ctx.getNameParser("").parse(name));
}
代码示例来源:origin: wildfly/wildfly
/**
* Rebind val to name in ctx, and make sure that all intermediate contexts exist
*
* @param ctx the parent JNDI Context under which value will be bound
* @param name the name relative to ctx where value will be bound
* @param value the value to bind.
* @throws NamingException for any error
*/
public static void rebind(final Context ctx, final String name, final Object value) throws NamingException {
final Name n = ctx.getNameParser("").parse(name);
rebind(ctx, n, value);
}
代码示例来源:origin: hibernate/hibernate-orm
private Name parseName(String jndiName, Context context) {
try {
return context.getNameParser( "" ).parse( jndiName );
}
catch ( InvalidNameException e ) {
throw new JndiNameException( "JNDI name [" + jndiName + "] was not valid", e );
}
catch ( NamingException e ) {
throw new JndiException( "Error parsing JNDI name [" + jndiName + "]", e );
}
}
代码示例来源:origin: hibernate/hibernate-orm
Name n = ctx.getNameParser( "" ).parse( name );
while ( n.size() > 1 ) {
final String ctxName = n.get( 0 );
代码示例来源:origin: wildfly/wildfly
NameParser parser = ctx.getNameParser("");
String securityDomain = null;
Name name = null;
代码示例来源:origin: wildfly/wildfly
public NameParser getNameParser(final CompositeName compositeName) throws NamingException {
if (compositeName.isEmpty()) {
return getNativeNameParser();
}
final String first = compositeName.get(0);
final Name nativeName = getNativeNameParser().parse(first);
final Object obj = lookup(nativeName);
if (obj instanceof Context) {
final Context context = (Context) obj;
try {
return context.getNameParser(compositeName.getSuffix(1));
} finally {
safeClose(context);
}
} else {
throw log.notContextInCompositeName(first);
}
}
}
代码示例来源:origin: apache/james-project
@Override
public Object operation() throws NamingException {
return getDelegate().getNameParser(name);
}
}.perform();
代码示例来源:origin: apache/james-project
@Override
public Object operation() throws NamingException {
return getDelegate().getNameParser(name);
}
}.perform();
代码示例来源:origin: org.jboss/jboss-common-core
/** Create a subcontext including any intermediate contexts.
@param ctx the parent JNDI Context under which value will be bound
@param name the name relative to ctx of the subcontext.
@return The new or existing JNDI subcontext
@throws javax.naming.NamingException on any JNDI failure
*/
public static Context createSubcontext(Context ctx, String name) throws NamingException
{
Name n = ctx.getNameParser("").parse(name);
return createSubcontext(ctx, n);
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-test
/**
* Unbinds a name from ctx, and removes parents if they are empty
*
* @param ctx the parent JNDI Context under which the name will be unbound
* @param name The name to unbind
* @throws NamingException for any error
*/
public static void unbind(Context ctx, String name) throws NamingException {
unbind(ctx, ctx.getNameParser("").parse(name));
}
代码示例来源:origin: org.jboss/jboss-common-core
/** Bind val to name in ctx, and make sure that all intermediate contexts exist
@param ctx the parent JNDI Context under which value will be bound
@param name the name relative to ctx where value will be bound
@param value the value to bind.
@throws NamingException for any error
*/
public static void bind(Context ctx, String name, Object value) throws NamingException
{
Name n = ctx.getNameParser("").parse(name);
bind(ctx, n, value);
}
代码示例来源:origin: org.jboss/jboss-common-core
/** Unbinds a name from ctx, and removes parents if they are empty
@param ctx the parent JNDI Context under which the name will be unbound
@param name The name to unbind
@throws NamingException for any error
*/
public static void unbind(Context ctx, String name) throws NamingException
{
unbind(ctx, ctx.getNameParser("").parse(name));
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-test
/**
* Create a subcontext including any intermediate contexts.
*
* @param ctx the parent JNDI Context under which value will be bound
* @param name the name relative to ctx of the subcontext.
* @return The new or existing JNDI subcontext
* @throws javax.naming.NamingException on any JNDI failure
*/
public static Context createSubcontext(Context ctx, String name) throws NamingException {
Name n = ctx.getNameParser("").parse(name);
return createSubcontext(ctx, n);
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-test
/**
* Rebind val to name in ctx, and make sure that all intermediate contexts exist
*
* @param ctx the parent JNDI Context under which value will be bound
* @param name the name relative to ctx where value will be bound
* @param value the value to bind.
* @throws NamingException for any error
*/
public static void rebind(Context ctx, String name, Object value) throws NamingException {
Name n = ctx.getNameParser("").parse(name);
rebind(ctx, n, value);
}
代码示例来源:origin: org.jboss/jboss-common-core
/** Rebind val to name in ctx, and make sure that all intermediate contexts exist
@param ctx the parent JNDI Context under which value will be bound
@param name the name relative to ctx where value will be bound
@param value the value to bind.
@throws NamingException for any error
*/
public static void rebind(Context ctx, String name, Object value) throws NamingException
{
Name n = ctx.getNameParser("").parse(name);
rebind(ctx, n, value);
}
代码示例来源:origin: com.sun.jersey/jersey-servlet
private static javax.naming.Context diveIntoJNDIContext(javax.naming.Context initialContext, JNDIContextDiver diver) throws NamingException {
Name jerseyConfigCtxName = initialContext.getNameParser("").parse(JNDI_CDIEXTENSION_CTX);
javax.naming.Context currentContext = initialContext;
for (int i=0; i<jerseyConfigCtxName.size(); i++) {
currentContext = diver.stepInto(currentContext, jerseyConfigCtxName.get(i));
}
return currentContext;
}
内容来源于网络,如有侵权,请联系作者删除!