#1. The example asks you to create a DB named InventoryDB and then run
some sql commands to create tables.

#2. Your web.xml has a resource ref to jdbc/InventoryDS. This is a
part of the jndi name of the datasource (not database).

#3. The geronimo-web.xml links your jdbc/InventoryDS with the
datasource's name called InventoryPool.

#4. Then the InventoryPool.xml which is the alt-DD for the RA links
the InventoryPool datasource with the InventoryDB you created in #1.
http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/inventory/inventory-ear/src/main/resources/InventoryPool.xml?view=markup

For further reading, check out this link
http://localhost:8080/console/portal//Services/Database%20Pools/__pm0x3system-database0x2DBWizard!1134683811%7C0_view/__rp0x3system-database0x2DBWizard!1134683811%7C0_name/InventoryPool/__rp0x3system-database0x2DBWizard!1134683811%7C0_mode/usage/__rp0x3system-database0x2DBWizard!1134683811%7C0_abstractName/org0x2apache0x2geronimo0x2samples0x3inventory-ear0x320x20-SNAPSHOT0x3ear0xaJ2EEApplication=org0x2apache0x2geronimo0x2samples0x3inventory-ear0x320x20-SNAPSHOT0x3ear,JCAConnectionFactory=InventoryPool,JCAResource=tranql-connector-ra-10x230x2rar,ResourceAdapter=tranql-connector-ra-10x230x2rar,ResourceAdapterModule=tranql-connector-ra-10x230x2rar,j2eeType=JCAManagedConnectionFactory,name=InventoryPool

This is the usage link for the InventoryPool under "Database Pools"
navigational link. If you have deployed the Inventory app, you will
see this link too.

Hope this helps

Cheers
Prasad

On 10/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi , we are working on the geronimo one project. We were looking at a
> sample application that connects to the database in geronimo . Upone
> studying it we stumbled upon a syntax that has a little confused
>
> In your DBManager.java for the inventory application we found this line of
> code.
>
> DataSource ds =
>  (DataSource)context.lookup("java:comp/env/jdbc/InventoryDS");
>
> We know what the function does . We just don't know what the parameter
> represents. Which part of the parameter represents the database we are
> connecting to? We need to know the nature of the parameter so that we can
> use it in our own application.
>
>
>

Reply via email to