Class DeploymentHelper
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.sqlstore.ejb.DeploymentHelper
-
public class DeploymentHelper extends Object
This class is used for static method invocations to avoid unnecessary registration requirements to use EJBHelper and/or CMPHelper from deploytool, verifier, or any other stand-alone client.
-
-
Constructor Summary
Constructors Constructor Description DeploymentHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Connection
getConnection(String name)
Get a Connection from the resource specified by the JNDI name of a CMP resource.static String
getDDLNamePrefix(Object info)
Returns name prefix for DDL files extracted from the info instance by the Sun-specific code.static boolean
isJavaToDatabase(Properties prop)
Returns boolean value for theDatabaseConstants.JAVA_TO_DB_FLAG
flag in this Properties object.
-
-
-
Method Detail
-
getDDLNamePrefix
public static String getDDLNamePrefix(Object info)
Returns name prefix for DDL files extracted from the info instance by the Sun-specific code.- Parameters:
info
- the instance to use for the name generation.- Returns:
- name prefix as String.
-
isJavaToDatabase
public static boolean isJavaToDatabase(Properties prop)
Returns boolean value for theDatabaseConstants.JAVA_TO_DB_FLAG
flag in this Properties object.- Parameters:
prop
- a Properties object where flag is located- Returns:
- true if there is a property value that contains "true" as
the value for the
DatabaseConstants.JAVA_TO_DB_FLAG
key.
-
getConnection
public static Connection getConnection(String name) throws SQLException
Get a Connection from the resource specified by the JNDI name of a CMP resource. This connection is aquired from a non-transactional resource which does not go through transaction enlistment/delistment. The deployment processing is required to use only those connections.- Parameters:
name
- JNDI name of a cmp-resource for the connection.- Returns:
- a Connection.
- Throws:
JDOFatalUserException
- if name cannot be looked up, or we cannot get a connection based on the name.SQLException
- if can not get a Connection.
-
-