CALL FOR: 

NOTE 
==== 
This call will only be applied to MMBase if the call: "CALL: Moving to
Java 1.3" is accepted(i think, this is the case)

Abstract 
======== 
Most application-servers provide a JNDI InitialContext implementation 
instance to web applications running under it, in a manner that is 
compatible with those provided by a Java2 Enterprise Edition application
server. In this context it is possible to define resources like: 
*) JavaBean Resources 
*) JavaMail Sessions 
*) JDBC Data Sources 
*) User Transactions 

Since this provides a documented and standarized way to retrieve a JDBC 
Data Source (even pooled one's), i have looked how hard it is to make 
MMBase work with connections retrieved from the application server and i
think this could be used as an good alternative. 

Changes 
======= 
    - Create a protected constructor inside 
    org.mmbase.module.database.MultiConnection 
    - Add an 'Module-'class replacement (i used the file: 
    org.mmbase.module.database.Naming, but maybe someone has a better 
    name) 
    - Add the jdbc.jar to the lib directory. (We could also add the 
    j2ee.jar to the lib-directory, this way we only need j2ee.jar, 
    junit.jar and log4j.jar) 

Changes to use it on your system 
================================ 
    - Inside config/module/jdbc.xml we need -only- the following 
    information 
        - classname = "org.mmbase.module.database.Naming"; 
        - context = "java:comp/env" 
        - resource name = "jdbc/MMBase" 
    - Inside web.xml we need to tell the application server, that we 
    require the resource 
        ... 
        <resource-ref> 
          <res-ref-name>jdbc/MMBase</res-ref-name> 
          <res-type>javax.sql.DataSource</res-type> 
          <res-auth>Container</res-auth> 
        </resource-ref> 
        ... 
    - Inside the application-server configuration the resource has to be
    defined. This is application server specific. 


Files 
===== 
Look in email thread 

Remarks 
======= 
Not completely documented, this will be done if it can be checked-in 
For more information, please ask 
If anyone has an idea how to distribute different configurations, please
react. 
    
LINKS: 

previous email in this thread 

START OF CALL: 2002-10-1

END OF CALL:   2002-10-4 

[_] +1 (YEA) 

[_] +0 (ABSTAIN ) 

[_] -1 (NAY), because : 

[_] VETO, because: 

-- 
Eduard Witteveen Systeem Ontwikkelaar
Publieke Omroep,  Gateway C Kamer 101
+31(0)356772910 http://www.omroep.nl/
Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal
-- 
Eduard Witteveen Systeem Ontwikkelaar
Publieke Omroep,  Gateway C Kamer 101
+31(0)356772910 http://www.omroep.nl/
Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal

Reply via email to