geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xh <xhsaymyn...@yahoo.co.uk>
Subject application wide db pool
Date Wed, 25 Jul 2007 09:03:15 GMT
Hi All,

I'm trying to create application wide pool, I did all the necessary modifications in:
application.xml and geronimo-application.xml files.
(see: http://www.chariotsolutions.com/geronimo/geronimo-1.0/database-manual.html#database-manual-deploy-application)

for example in geronimo-application.xml I wrote:
    <module>
        <connector>tranql-connector-derby-client-xa-1.1.rar</connector>
        <alt-dd>DataWeaverDispatcherDerby.xml</alt-dd>
    </module>

But now I have a question how to map deployed pool to JNDI resource-ref?

In my DataWeaverDispatcherDerby.xml db pool deployment plan I have:

<dep:moduleId>
            <dep:groupId>dataweaver.dbpool</dep:groupId>
            <dep:artifactId>DataWeaverDispatcherDerby</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
</dep:moduleId>

but the resource "dataweaver.dbpool" is unknown during deployment, and below fragment of geronimo-web.xml
throws an exception:

    <resource-ref>
        <ref-name>jdbc/DataWeaverDS</ref-name>
        <pattern>
            <groupId>dataweaver.dbpool</groupId>
            <artifactId>DataWeaverDispatcherDerby</artifactId>
            <name>DataWeaverDispatcherDerby</name>
        </pattern>
    </resource-ref>


the exception is:

 
                          

// toggle the display state of an element
function Pluto_apps_all_row1_col1_p1_toggleDisplay(id) {
  var element = document.getElementById("Pluto_apps_all_row1_col1_p1_"+id);
  if (element.style.display == 'inline') {
      element.style.display='none';
  } else {
      element.style.display='inline';
  }
}

							







    
     Deployment failed:
Unable
to resolve resource reference 'jdbc/DataWeaverDS' (Could not find the
resource specified in your Geronimo deployment plan:


How to define an application-scope db pool and bind it to JNDI name jdbc/XYZ?

second question, I have application-scope Realm, that use server-wide db pool, how to configure
it to work with my application-scope pool?

<g-bean> fragment of geronimo-application.xml:

<log:login-module control-flag="REQUIRED"
                    server-side="true" wrap-principals="false">
                    <log:login-domain-name>
                        DataWeaverSecurity
                    </log:login-domain-name>
                    <log:login-module-class>
                        org.apache.geronimo.security.realm.providers.SQLLoginModule
                    </log:login-module-class>
                    <log:option name="userSelect">
                        SELECT username, passwd FROM dw_users WHERE
                        username = ?
                    </log:option>
                    <log:option name="dataSourceApplication">
                        null
                    </log:option>
                    <log:option name="groupSelect">
                        SELECT u.username, r.role FROM dw_users u,
                        dw_roles r, dw_users_roles_assoc ur WHERE
                        ur.idUser = u.idUser AND ur.idRole = r.idRole
                        AND u.username = ?
                    </log:option>

<!-- 
I use the artifactId, It worked with server-wide pool,
right now my deployment fails much earlier, I'm not reaching this point at the moment ;( 
-->

                    <log:option name="dataSourceName">
                        DataWeaverDispatcherDerby
                    </log:option>
                </log:login-module>

thanks in advance
best regards
Lukasz




	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Mime
View raw message