Date: 2004-01-18T13:24:02
   Editor: JacekLaskowski <[EMAIL PROTECTED]>
   Wiki: Apache Geronimo Wiki
   Page: PetStore
   URL: http://wiki.apache.org/geronimo/PetStore

   More details on resource-ref and its jndi-name subelement

Change Log:

------------------------------------------------------------------------------
@@ -12,7 +12,7 @@
 
  * Install [wiki:OpenEJBNova OpenEJB Nova Service]
 
- * Install J2EECA JDBC implementation (more about it later)
+ * Install J2EECA JDBC implementation (or ask for openejb-jca-DEV.jar on 
geronimo-dev mailing list)
 
  * Download 
[http://java.sun.com/blueprints/code/index.html#java_pet_store_demo Java Pet 
Store Demo 1.3.2]
 
@@ -64,7 +64,30 @@
 
    i. Add <module-name>petstore</module-name> after <web-app> tag
 
-   i. Find url/CatalogDAOSQLURL <resource-ref> and add 
<jndi-name>http://localhost:8080/petstore/CatalogDAOSQL.xml</jndi-name> between 
<resource-ref> tags.
+   i. Change '''<res-ref-name>jdbc/CatalogDB</res-ref-name>''' stanza to:
+
+    {{{
+  <resource-ref>
+    <description>Allow the Fast Lane Reader Pattern to Read Catalog Data 
Directly via JDBC in the Web Tier</description>
+    <res-ref-name>jdbc/CatalogDB</res-ref-name>
+    <res-type>javax.sql.DataSource</res-type>
+    <res-auth>Container</res-auth>
+    
<jndi-name>geronimo.management:j2eeType=JCAManagedConnectionFactory,name=petstoredb</jndi-name>
+  </resource-ref>
+}}}
+
+ Note the <jndi-name> tag which is Geronimo approach to define what the 
resource-ref points to.
+
+   i. Change '''<res-ref-name>url/CatalogDAOSQLURL</res-ref-name>''' stanza to:
+
+    {{{
+  <resource-ref>
+    <res-ref-name>url/CatalogDAOSQLURL</res-ref-name>
+    <res-type>java.net.URL</res-type>
+    <res-auth>Container</res-auth>
+    <jndi-name>http://localhost:8080/petstore/CatalogDAOSQL.xml</jndi-name>
+  </resource-ref>
+}}}
 
   * Creating META-INF/geronimo-ejb-jar.xml
 

Reply via email to