geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: petstore and cloudscape on geronimo
Date Mon, 30 Aug 2004 15:31:16 GMT
I'll try to make some brief comments now, but I won't be able to look  
at this carefully until at least wednesday.

On Aug 30, 2004, at 1:47 AM, Sai Arunachalam wrote:

> 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
>, built it to get the rar
> file. Opened the rar file, removed the axion jars, put the cloudscape
> jars there.
I thought of a simpler way to do this, but this should work fine.

>  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? ]

Look in ra.xml for the correct config property names.  Probably one of  
these is for the obsolete openejb wrapper.

As far as InventoryDB etc you should rename these in the  
openejb-jar.xml files to jdbc.EstoreDB unless you want to connect to  
different databases.
> 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?
I don't think so.  I think this is roughly the info in openejb-jar.xml  
and geronimo-ra.xml.
> There are two more things I wanna know related to this problem. When I
> looked up the 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?
Are you starting with fresh copies of geronimo?  these might be  
leftovers from earlier deployments.
> And then, how exactly do I deploy a stand-alone geronimo-ra.xml?

you can deploy it as an external plan with the tranql rar.  I think I'm  
doing this in the openejb itests: look in maven.xml for how to do this  
using the geronimo maven deployment plugin.  If I'm not doing this now  
I hope to update it shortly.

david jencks
> Thanks a lot for your help.
> Thanks and regards,
> Sai

View raw message