|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.sessions.factories.XMLSessionConfigLoader
public class XMLSessionConfigLoader
Provide a mechanism for loading Session configuration XML files. This is used by the SessionManager to define how to find and load a Session from a sessions XML file. The sessions XML file is typically deployed in the applications jar (ejb-jar) and named sessions.xml in the /META-INF directory. Several loading options are provided,
Nested Class Summary | |
---|---|
class |
XMLSessionConfigLoader.XMLSessionConfigLoaderErrorHandler
INTERNAL: Purpose: Provide a mechanism to swallow all parsing errors |
Field Summary | |
---|---|
protected java.lang.ClassLoader |
classLoader
Define the class loader that should be used to find the resource. |
protected static java.lang.String |
DEFAULT_RESOURCE_NAME
|
protected static java.lang.String |
DEFAULT_RESOURCE_NAME_IN_META_INF
|
static java.lang.String |
ECLIPSELINK_SESSIONS_SCHEMA
|
protected org.eclipse.persistence.internal.sessions.factories.PersistenceEntityResolver |
entityResolver
Used to store the entity resolver to validate the XML schema when parsing. |
protected java.util.Vector |
exceptionStore
Stores any exceptions that occurred to provide all the exceptions up front if the load fails. |
protected static Project |
project
Cache the creation and initialization of the Session XML mapping project. |
protected java.lang.String |
resourceName
|
protected java.lang.String |
resourcePath
Stores the resource path to provide a better error message if the load fails. |
protected java.lang.String |
sessionName
Stores the name of the Session in the sessions XML file desired to be loaded. |
protected boolean |
shouldCheckClassLoader
Defines if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader. |
protected boolean |
shouldLogin
Define if the loaded session should be connected, default true. |
protected boolean |
shouldRefresh
Define if the loaded session should be refreshed from the file. |
Constructor Summary | |
---|---|
XMLSessionConfigLoader()
PUBLIC: This constructor is used when the file resource named 'sessions.xml' will be parsed for configuration. |
|
XMLSessionConfigLoader(java.lang.String resourceName)
PUBLIC: This constructor is used when passing in the resource name of the configuration file that should be parsed |
Method Summary | |
---|---|
java.lang.ClassLoader |
getClassLoader()
PUBLIC: Return the class loader that should be used to find the resource. |
java.util.Vector |
getExceptionStore()
INTERNAL: |
protected static Project |
getProject()
Cache the creation and initialization of the Session XML mapping project. |
java.lang.String |
getResourceName()
PUBLIC: Returns the resource name we are trying to load. |
java.lang.String |
getResourcePath()
INTERNAL: Will return the the resource name with full path of the resource file. |
java.lang.String |
getSessionName()
PUBLIC: Returns the name of the Session in the sessions XML file desired to be loaded. |
boolean |
load(SessionManager sessionManager,
java.lang.ClassLoader loader)
INTERNAL: This method instantiates the parser and builds the document based on the schema. |
org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs |
loadConfigsForMappingWorkbench(java.lang.ClassLoader loader)
INTERNAL: This method is to be used to load config objects for the Mapping Workbench only. |
org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs |
loadConfigsForMappingWorkbench(java.lang.ClassLoader loader,
boolean validate)
INTERNAL: This method is to be used to load config objects for the Mapping Workbench only. |
protected org.w3c.dom.Document |
loadDocument(java.lang.ClassLoader loader)
INTERNAL: Load a session.xml document. |
protected org.w3c.dom.Document |
loadDocument(java.lang.ClassLoader loader,
boolean validate)
INTERNAL: Load a session.xml document. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
PUBLIC: Set the class loader that should be used to find the resource. |
void |
setResourceName(java.lang.String resourceName)
PUBLIC: Set the resource name we are trying to load. |
void |
setSessionName(java.lang.String sessionName)
PUBLIC: Set the name of the Session in the sessions XML file desired to be loaded. |
void |
setShouldCheckClassLoader(boolean shouldCheckClassLoader)
PUBLIC: Set if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader. |
void |
setShouldLogin(boolean shouldLogin)
PUBLIC: Set if the loaded session should be connected. |
void |
setShouldRefresh(boolean shouldRefresh)
PUBLIC: Set if the loaded session should be refreshed from the file. |
boolean |
shouldCheckClassLoader()
PUBLIC: Return if the session will be refreshed from the file if the class loader requesting the load is different than the loaded session's class loader. |
boolean |
shouldLogin()
PUBLIC: Return if the loaded session should be connected. |
boolean |
shouldRefresh()
PUBLIC: Return if the loaded session should be refreshed from the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String resourceName
protected java.lang.String resourcePath
protected java.lang.String sessionName
protected boolean shouldLogin
protected boolean shouldRefresh
protected java.lang.ClassLoader classLoader
protected boolean shouldCheckClassLoader
protected java.util.Vector exceptionStore
protected org.eclipse.persistence.internal.sessions.factories.PersistenceEntityResolver entityResolver
public static final java.lang.String ECLIPSELINK_SESSIONS_SCHEMA
protected static final java.lang.String DEFAULT_RESOURCE_NAME
protected static final java.lang.String DEFAULT_RESOURCE_NAME_IN_META_INF
protected static Project project
Constructor Detail |
---|
public XMLSessionConfigLoader()
public XMLSessionConfigLoader(java.lang.String resourceName)
Method Detail |
---|
protected static Project getProject()
public java.lang.String getResourcePath()
public java.util.Vector getExceptionStore()
public java.lang.String getResourceName()
public void setResourceName(java.lang.String resourceName)
public java.lang.String getSessionName()
public void setSessionName(java.lang.String sessionName)
public boolean shouldLogin()
public void setShouldLogin(boolean shouldLogin)
public boolean shouldRefresh()
public void setShouldRefresh(boolean shouldRefresh)
public boolean shouldCheckClassLoader()
public void setShouldCheckClassLoader(boolean shouldCheckClassLoader)
public java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader classLoader)
public boolean load(SessionManager sessionManager, java.lang.ClassLoader loader)
public org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs loadConfigsForMappingWorkbench(java.lang.ClassLoader loader)
public org.eclipse.persistence.internal.sessions.factories.model.SessionConfigs loadConfigsForMappingWorkbench(java.lang.ClassLoader loader, boolean validate)
protected org.w3c.dom.Document loadDocument(java.lang.ClassLoader loader)
protected org.w3c.dom.Document loadDocument(java.lang.ClassLoader loader, boolean validate)
|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |