https://issues.apache.org/bugzilla/show_bug.cgi?id=51264

             Bug #: 51264
           Summary: Context/Manager/Store configuration proposal
           Product: Tomcat 7
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: gjblaj...@gmail.com
    Classification: Unclassified


Why is it the Persistent Store Store element does not contain a means to
reference a database link defined in the globalnamingresources, for example:

This is what is required

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/App1" docbase=" App1" reloadable="false" crossContext="true"
debug="1">
    <Manager className="org.apache.catalina.session.PersistentManager"
distributable="true" maxIdleBackup="5">
      <Store className="org.apache.catalina.session.JDBCStore"
connectionURL="jdbc:oracle:thin:username/password@servername:port:schema"
        driverName="oracle.jdbc.OracleDriver" sessionAppCol="app_name"
sessionDataCol="session_data" 
        sessionIdCol="session_id" sessionLastAccessedCol="last_access"
sessionMaxInactiveCol="max_inactive"
        sessionTable="tomcat_sessions" sessionValidCol="valid_session" />
    </Manager>
    <ResourceLink global="jdbc/dbName" name="jdbc/dbName"
type="javax.sql.DataSource"/>
</Context>

BUT couldn’t the tomcat accept this?

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/App1" docbase=" App1" reloadable="false" crossContext="true"
debug="1">
    <Manager className="org.apache.catalina.session.PersistentManager"
distributable="true" maxIdleBackup="5">
      <Store className="org.apache.catalina.session.JDBCStore"
resourceLink="jdbc/dbName"
        resourceType="javax.sql.DataSource" sessionAppCol="app_name"
sessionDataCol="session_data" 
        sessionIdCol="session_id" sessionLastAccessedCol="last_access"
sessionMaxInactiveCol="max_inactive"
        sessionTable="tomcat_sessions" sessionValidCol="valid_session" />
    </Manager>
    <ResourceLink global="jdbc/dbName" name="jdbc/dbName"
type="javax.sql.DataSource"/>
</Context>

That way the application developer does not need to know the username and
password to the production database server nor does it need to be packaged in
his/her war file.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to