Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Package Functions

com.cosylab.cdb.jdal.DALImpl Class Reference

Inheritance diagram for com.cosylab.cdb.jdal.DALImpl:
com.cosylab.cdb.jdal.Recoverer

List of all members.

Classes

class  Filter

Public Member Functions

void loadFactory ()
void recoverClients ()
String getRecordPath (String curl)
void parseNode (DALNode node, XMLHandler xmlSolver, String path) throws SAXException, IOException, AcsJCDBXMLErrorEx
XMLHandler loadRecords (String curl, boolean toString) throws AcsJCDBRecordDoesNotExistEx, AcsJCDBXMLErrorEx
boolean wasCacheLimitReached ()
String get_DAO (String curl) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
synchronized String internal_get_DAO (String curl, boolean precacheStage) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
synchronized DAO get_DAO_Servant (String curl) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
void shutdown ()
void shutdownEmbeddedDALImpl ()
void loadListeners ()
boolean saveListeners ()
int add_change_listener (DALChangeListener listener)
void listen_for_changes (String curl, int listenerID)
void remove_change_listener (int listenerID)
void clear_cache (String curl)
void clear_cache_all ()
String list_nodes (String name)
String list_daos (String name)
String configuration_name ()
SAXParser getSaxParser ()
boolean isShutdown ()

Static Public Member Functions

static String getSchemas (String root, Logger logger)
static void getFiles (String filePath, LinkedHashMap< String, String > map)

Public Attributes

final boolean useXsdCache

Static Public Attributes

static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema"
static final String EXTERNAL_SCHEMA_LOCATION_PROPERTY_ID = "http://apache.org/xml/properties/schema/external-schemaLocation"
static final String USE_XSD_CACHE_PROPERTYNAME = "cdb.useXsdCache"

Protected Member Functions

void object_changed (String curl)
File getStorageFile ()
void cleanListenedCurls ()

Protected Attributes

final AtomicLong totalDALInvocationCounter

Package Functions

 DALImpl (String args[], ORB orb_val, POA poa_val, Logger logger)

Detailed Description

A note about the inheritance structure used in this module: The writable variant of the DAL interface delegates to an instance of DALImpl for all JDALOperations, see WDALBaseImpl. It only adds the implementation of the WDALOperations methods.


Constructor & Destructor Documentation

com.cosylab.cdb.jdal.DALImpl.DALImpl ( String  args[],
ORB  orb_val,
POA  poa_val,
Logger  logger 
) [package]

C'tor

Parameters:
args 
orb_val 
poa_val 
Exceptions:
IllegalArgumentException if the computed CDB root directory does not exist.

References com.cosylab.cdb.jdal.DALImpl.loadFactory(), com.cosylab.cdb.jdal.DALImpl.shutdown(), com.cosylab.cdb.jdal.DALImpl.totalDALInvocationCounter, com.cosylab.cdb.jdal.DALImpl.USE_XSD_CACHE_PROPERTYNAME, and com.cosylab.cdb.jdal.DALImpl.useXsdCache.


Member Function Documentation

int com.cosylab.cdb.jdal.DALImpl.add_change_listener ( DALChangeListener  listener  ) 
void com.cosylab.cdb.jdal.DALImpl.cleanListenedCurls (  )  [protected]

Cleans listened curls from invalid listeners to avoid repeatedly calling invalid listeners

Referenced by com.cosylab.cdb.jdal.DALImpl.clear_cache().

String com.cosylab.cdb.jdal.DALImpl.configuration_name (  ) 
String com.cosylab.cdb.jdal.DALImpl.get_DAO ( String  curl  )  throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
synchronized DAO com.cosylab.cdb.jdal.DALImpl.get_DAO_Servant ( String  curl  )  throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
static void com.cosylab.cdb.jdal.DALImpl.getFiles ( String  filePath,
LinkedHashMap< String, String >  map 
) [static]

Adds all *.xsd files from filePath directory if file already exists in map it is skipped

Referenced by com.cosylab.cdb.jdal.DALImpl.getSchemas().

String com.cosylab.cdb.jdal.DALImpl.getRecordPath ( String  curl  ) 
SAXParser com.cosylab.cdb.jdal.DALImpl.getSaxParser (  ) 
static String com.cosylab.cdb.jdal.DALImpl.getSchemas ( String  root,
Logger  logger 
) [static]

returns string of URIs separated by ' ' for all schema files in root/schemas and directories list given by ACS.cdbpath environment variable

This method is public static to be used more easily in the HibernateDAL (com.cosylab.cdb.jdal.XSDElementTypeResolver.initializeParser())

References com.cosylab.cdb.jdal.DALImpl.getFiles().

File com.cosylab.cdb.jdal.DALImpl.getStorageFile (  )  [protected]

: For the TMCDB XML import it does not make sense to create a recovery file. Shouldn't we support a mode that skips this?

Returns:
File

Referenced by com.cosylab.cdb.jdal.DALImpl.loadListeners(), and com.cosylab.cdb.jdal.DALImpl.saveListeners().

synchronized String com.cosylab.cdb.jdal.DALImpl.internal_get_DAO ( String  curl,
boolean  precacheStage 
) throws CDBRecordDoesNotExistEx, CDBXMLErrorEx
boolean com.cosylab.cdb.jdal.DALImpl.isShutdown (  ) 
void com.cosylab.cdb.jdal.DALImpl.listen_for_changes ( String  curl,
int  listenerID 
)
void com.cosylab.cdb.jdal.DALImpl.loadListeners (  ) 
XMLHandler com.cosylab.cdb.jdal.DALImpl.loadRecords ( String  curl,
boolean  toString 
) throws AcsJCDBRecordDoesNotExistEx, AcsJCDBXMLErrorEx
void com.cosylab.cdb.jdal.DALImpl.object_changed ( String  curl  )  [protected]
Parameters:
curl 

Referenced by com.cosylab.cdb.jdal.DALImpl.clear_cache().

void com.cosylab.cdb.jdal.DALImpl.parseNode ( DALNode  node,
XMLHandler  xmlSolver,
String  path 
) throws SAXException, IOException, AcsJCDBXMLErrorEx
void com.cosylab.cdb.jdal.DALImpl.recoverClients (  ) 

Recovery related implementation. Load list of listeners from the recovery file and notifies them to clear cache. NOTICE: This method should be called when DAL POA is alrady initialized and active. NOTE: Method execution depends on recoveryRead variable.

Implements com.cosylab.cdb.jdal.Recoverer.

References com.cosylab.cdb.jdal.DALImpl.clear_cache_all(), and com.cosylab.cdb.jdal.DALImpl.loadListeners().

Referenced by com.cosylab.cdb.jdal.WDALBaseImpl.recoverClients().

void com.cosylab.cdb.jdal.DALImpl.remove_change_listener ( int  listenerID  ) 
void com.cosylab.cdb.jdal.DALImpl.shutdownEmbeddedDALImpl (  ) 
boolean com.cosylab.cdb.jdal.DALImpl.wasCacheLimitReached (  ) 

Member Data Documentation

final String com.cosylab.cdb.jdal.DALImpl.EXTERNAL_SCHEMA_LOCATION_PROPERTY_ID = "http://apache.org/xml/properties/schema/external-schemaLocation" [static]

Property for setting the mapping of URIs to XML schemas. See http://xerces.apache.org/xerces2-j/properties.html

Referenced by com.cosylab.cdb.jdal.DALImpl.loadFactory().

final String com.cosylab.cdb.jdal.DALImpl.SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema" [static]
final String com.cosylab.cdb.jdal.DALImpl.USE_XSD_CACHE_PROPERTYNAME = "cdb.useXsdCache" [static]

The XSD cache may have additional bad side effects (one was a failure with xinclude which has been fixed), so we only use it if this property is set to true to switch it off easily in case of problems.

Referenced by com.cosylab.cdb.jdal.DALImpl.DALImpl().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties