net.toften.jlips.persist.db
Class DBJNDIProperties

java.lang.Object
  extended by net.toften.jlips.persist.db.DBAbstractProperties
      extended by net.toften.jlips.persist.db.DBJNDIProperties
All Implemented Interfaces:
DBProperties

public class DBJNDIProperties
extends DBAbstractProperties
implements DBProperties

This is the database connection properties for using a JNDI connection The application must provide the JNDI URI to jLips. This is done when jLips is initialised.

 Properties dbProbs = new Properties();
 dbProbs.put(EntityFactory.EF_DB_CON_HAND, "net.toften.jlips.persist.db.DBJNDIConnection");
 dbProbs.put(EntityFactory.EF_DB_PROP_HAND, "net.toften.jlips.persist.db.DBJNDIProperties");
 dbProbs.put(DBJNDIProperties.DB_JNDI_URI, "java:comp/env/jdbc/jlipsDB");
 
In the above example the database properties has one extra entry: The JNDI URI. The key for the JNDI URI property is defined in here

Author:
thomas
See Also:
DBJNDIConnection, EntityFactory.init(Properties, Map)

Field Summary
static String DB_JNDI_URI
          String used to specify the JNDI URI in the database properties passed by the application to jLips
 
Fields inherited from class net.toften.jlips.persist.db.DBAbstractProperties
DB_DRIVER, DB_PASSWORD, DB_SCHEMA, DB_URL, DB_USERNAME, dbInitProb, dbProp
 
Constructor Summary
DBJNDIProperties()
           
 
Method Summary
 String getURL()
          This is overridden to return the JNDI URI instead of the database URL
 void setDBInitProperties(Map dbInitProbs)
          This method stores a reference to the initialisation properties given to jLips when it was initialised by the application.
 
Methods inherited from class net.toften.jlips.persist.db.DBAbstractProperties
getDriver, getPassword, getSchema, getUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.toften.jlips.persist.db.DBProperties
getDriver, getPassword, getSchema, getUserName
 

Field Detail

DB_JNDI_URI

public static final String DB_JNDI_URI
String used to specify the JNDI URI in the database properties passed by the application to jLips

See Also:
Constant Field Values
Constructor Detail

DBJNDIProperties

public DBJNDIProperties()
Method Detail

getURL

public String getURL()
This is overridden to return the JNDI URI instead of the database URL

Specified by:
getURL in interface DBProperties
Overrides:
getURL in class DBAbstractProperties
Returns:
JNDI URI
See Also:
DBAbstractProperties.getURL()

setDBInitProperties

public void setDBInitProperties(Map dbInitProbs)
Description copied from class: DBAbstractProperties
This method stores a reference to the initialisation properties given to jLips when it was initialised by the application. This method will be invoked by the DBConnectionFactory.init(Map) method

Specified by:
setDBInitProperties in interface DBProperties
Overrides:
setDBInitProperties in class DBAbstractProperties
Parameters:
dbInitProbs - The database properties provided by the application
See Also:
DBProperties.setDBInitProperties(Map)