Package org.glassfish.jdbc.util
Class JdbcResourcesUtil
- java.lang.Object
-
- org.glassfish.jdbc.util.JdbcResourcesUtil
-
public class JdbcResourcesUtil extends Object
Utility class for JDBC related classes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JdbcResourcesUtil
createInstance()
JdbcConnectionPool
getJdbcConnectionPoolOfResource(ResourceInfo resourceInfo)
String
getRANameofJdbcConnectionPool(JdbcConnectionPool pool)
This method takes in an admin JdbcConnectionPool and returns the RA that it belongs to.static <T> Resource
getResourceByName(Resources resources, Class<T> type, String name)
static Collection<BindableResource>
getResourcesOfPool(Resources resources, String connectionPoolName)
boolean
isJdbcPoolReferredInServerInstance(PoolInfo poolInfo)
Determines if a JDBC connection pool is referred in a server-instance via resource-refs
-
-
-
Method Detail
-
createInstance
public static JdbcResourcesUtil createInstance()
-
getResourceByName
public static <T> Resource getResourceByName(Resources resources, Class<T> type, String name)
-
getResourcesOfPool
public static Collection<BindableResource> getResourcesOfPool(Resources resources, String connectionPoolName)
-
getRANameofJdbcConnectionPool
public String getRANameofJdbcConnectionPool(JdbcConnectionPool pool)
This method takes in an admin JdbcConnectionPool and returns the RA that it belongs to.- Parameters:
pool
- - The pool to check- Returns:
- The name of the JDBC RA that provides this pool's data-source
-
getJdbcConnectionPoolOfResource
public JdbcConnectionPool getJdbcConnectionPoolOfResource(ResourceInfo resourceInfo)
-
isJdbcPoolReferredInServerInstance
public boolean isJdbcPoolReferredInServerInstance(PoolInfo poolInfo)
Determines if a JDBC connection pool is referred in a server-instance via resource-refs- Parameters:
poolInfo
- pool-name- Returns:
- boolean true if pool is referred in this server instance as well enabled, false otherwise
-
-