|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.util.JndiHelper
public class JndiHelper
Constructor Summary | |
---|---|
JndiHelper()
|
Method Summary | ||
---|---|---|
static Context |
getApplicationContext()
|
|
static Context |
getContext()
Returns a reference to an InitialContext object. |
|
static
|
lookup(String lookupname,
Class<T> lookupClass)
|
|
static
|
lookupApplicationScope(String lookupname,
Class<T> lookupClass)
|
|
static DataSource |
lookupDataSource(String originalLookup)
|
|
static
|
lookupNarrow(String lookupName,
Class<T> lookupClass)
Convenience method for getting a remote JNDI reference to an object. |
|
static String |
translateDatasourceName(String originalDatasourceName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JndiHelper()
Method Detail |
---|
public static Context getContext() throws NamingException
NamingException
- if InitialContext cannot be obtainedpublic static Context getApplicationContext() throws NamingException
NamingException
public static <T> T lookupNarrow(String lookupName, Class<T> lookupClass) throws NamingException, ClassCastException
The code this executes looks like:
PortableRemoteObject.narrow( JndiHelper.getContext().lookup(lookupName), lookupClass);
lookupName
- The JNDI name of the object to locatelookupClass
- The desired class type
NamingException
- If the lookup() call fails
ClassCastException
- If lookupName cannot be cast to lookupClassPortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
public static <T> T lookup(String lookupname, Class<T> lookupClass) throws NamingException
NamingException
public static <T> T lookupApplicationScope(String lookupname, Class<T> lookupClass) throws NamingException
NamingException
public static String translateDatasourceName(String originalDatasourceName)
public static DataSource lookupDataSource(String originalLookup) throws NamingException
NamingException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |