geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sai Arunachalam <sai.arunacha...@gmail.com>
Subject petstore and cloudscape on geronimo
Date Mon, 30 Aug 2004 08:47:44 GMT
Hi,
     I am having a problem in making cloudscape work. I think it's
rather my configuration with geronimo-ra.xml that is playing the
mischief. (Recap: I am trying to port the PetStore that was there on
WebLogic6.1 to Geronimo. WebLogic6.1 has it's own config.xml that has
a few tags and attributes that I have to communicate using the
geronimo-ra.xml). The scenario is as follows:

The weblogic petstore app has a number of ejbs with each one having a
weblogic-ejb-jar.xml like the following (this one corresponds to
openejb-jar.xml on Geronimo).
...
<reference-descriptor>
     <reference-description>
            <res-ref-name>jdbc/EstoreDataSource</res-ref-name>
                  <jndi-name>jdbc.EstoreDB</jndi-name>
     </reference-description>
</reference-descriptor>
....
That is the case for a number of EJBs there.

Then there is a config.xml file that has the following properties:
...
<JDBCConnectionPool CapacityIncrement="1"
DriverName="COM.cloudscape.core.JDBCDriver" InitialCapacity="1"
MaxCapacity="1" Name="petstorepool" Properties="user=none;
password=none;server=none" Targets="petStoreServer"
URL="jdbc:cloudscape:petStore"/>
...
<JDBCDataSource JNDIName="jdbc.SignOnDB" Name="SignOnDB"
PoolName="petStorePool" Targets="petStoreServer"/>
<Realm FileRealm="myFileRealm" Name="myRealm"/>
<JDBCDataSource JNDIName="jdbc.InventoryDB" Name="InventoryDB"
PoolName="petStorePool" Targets="petStoreServer"/>
<JDBCDataSource JNDIName="jdbc.EstoreDB" Name="EstoreDB"
PoolName="petStorePool" Targets="petStoreServer"/>
...

Now I wanted to make this app run with Cloudscape. So I did the following:
I took the cloudscape jars (cloudscape.jar, tools.jar, client.jar and
four more...)
I checked out the latest version of TranQL from
http://cvs.tranql.codehaus.org/connector, built it to get the rar
file. Opened the rar file, removed the axion jars, put the cloudscape
jars there. Then I made the following changes to
META-INF/geronimo-ra.xml

1. configId="org/tranql/connector/axion" ->
configId="org/tranql/connector/cloudscape"
2. Then I changed the following:
    <connectiondefinition-instance>
              <name>DefaultDatasource</name>
     ....

to
    <connectiondefinition-instance>
              <name>jdbc.EstoreDB</name>
     ....
3.  <config-property-setting
name="JdbcDriver">org.axiondb.jdbc.AxionDriver</config-setting-name>
to
   <config-property-setting
name="JdbcDriver">COM.cloudscape.core.JDBCDriver</config-property-setting>

4. <config-property-setting
name="JdbcUrl">jdbc:axiondb:DefaultDatabase</config-property-setting>
to
  <config-property-setting
name="JdbcUrl">jdbc:cloudscape:EstoreDB</config-property-setting>

  [In some of the geronimo-ra.xml's that I saw, the attribute name
inside here was ConnectionURL instead of JdbcUrl. Does this matter?
Besides, how do I specify the other two DBs namely InventoryDB and
SignOnDB? Should I simply replicate the tags in the same fle or is
there a different way to do it? ]

Rest of the properties, I left as they were in geronimo-ra.xml.

Now I tried deploying this rar file on geronimo and it got deployed
without any errors. When I ran petstore this time alongwith the
configId of both the things (petstore and tranql rar), it gave me a
long error. So I put the rar file inside the petstore.ear file and
redployed it and ran it this time. This time I gave only petstore's
configId on starting the server. It got started and I saw the first
page (index.html that has a link saying "enter the store"). When I
tried going to the next page by pressing the link, it says "Unable to
connect to database. Connection not open. Make sure the connection is
open").

I don't know where the error is... Just then I found the following
file in weblogic's petstore directory called estore_runtimeejb.xml
that has portions like the following for each of the ejbs..

<j2ee-ri-specific-information>
 <server-name></server-name>
 <rolemapping />

 <enterprise-beans>
   <ejb>
     <ejb-name>TheOrder</ejb-name>
     <jndi-name>estore/order</jndi-name>
     <resource-ref>
       <res-ref-name>jdbc/EstoreDataSource</res-ref-name>
       <jndi-name>jdbc/Cloudscape</jndi-name>
       <default-resource-principal>
         <name>estoreuser</name>
         <password>estore</password>
       </default-resource-principal>
     </resource-ref>
     <ejb-ref>
       <ejb-ref-name>ejb/account/Account</ejb-ref-name>
       <jndi-name>estore/account</jndi-name>
     </ejb-ref>
   </ejb>

.....

Does this have something to do with the problem?

There are two more things I wanna know related to this problem. When I
looked up the index.properties inside config-store for the already
deployed axion database, the configId is given as
org/apache/geronimo/DefaultDatabase whereas the geronimo-ra.xml gives
the configId as org/openejb/connector/axion. How is this?

And then, how exactly do I deploy a stand-alone geronimo-ra.xml?

Thanks a lot for your help.

Thanks and regards,
Sai

Mime
View raw message