[jboss-user] [JNDI/Naming/Network] - Re: The JNDI problem when deploying the JPetStore with jboss

jaikiran do-not-reply at jboss.com
Tue Nov 7 03:30:01 EST 2006


anonymous wrote : There are two Item.xml one is under %JPESTORE_HOME%\build\webapp\WEB-INF\classes\com\ibatis\jpetstore\persistence\sqlmapdao\sql 

Both the files are the same. One is in the deployed application and one is a part of the source. If you are aware of how to build the JPetStore then do the below mentioned changes to 
anonymous wrote : The other one is under %JPETSTORE_HOME%\src\com\ibatis\jpetstore\persistence\sqlmapdao\sql 

Else do it under the other one.

Here's the change that you can try:

Try changing the queries to:

 <select id="getItemListByProduct" resultClass="item" parameterClass="string" cacheModel="itemCache">
  |     SELECT
  |       I.ITEMID,
  |       LISTPRICE,
  |       UNITCOST,
  |       SUPPLIER AS supplierId,
  |       I.PRODUCTID AS "product.productId",
  |       NAME AS "product.name",
  |       DESCN AS "product.description",
  |       CATEGORY AS "product.categoryId",
  |       STATUS,
  |       ATTR1 AS attribute1,
  |       ATTR2 AS attribute2,
  |       ATTR3 AS attribute3,
  |       ATTR4 AS attribute4,
  |       ATTR5 AS attribute5
  |     FROM ITEM I, PRODUCT P
  |     WHERE P.PRODUCTID = I.PRODUCTID
  |     AND I.PRODUCTID = #value#
  |   </select>
  | 
  |   <select id="getItem" resultClass="item" parameterClass="string" cacheModel="quantityCache">
  |     select
  |       I.ITEMID,
  |       LISTPRICE,
  |       UNITCOST,
  |       SUPPLIER AS supplierId,
  |       I.PRODUCTID AS "product.productId",
  |       NAME AS "product.name",
  |       DESCN AS "product.description",
  |       CATEGORY AS "product.categoryId",
  |       STATUS,
  |       ATTR1 AS attribute1,
  |       ATTR2 AS attribute2,
  |       ATTR3 AS attribute3,
  |       ATTR4 AS attribute4,
  |       ATTR5 AS attribute5,
  |       QTY AS quantity
  |     from ITEM I, INVENTORY V, PRODUCT P
  |     where P.PRODUCTID = I.PRODUCTID
  |       and I.ITEMID = V.ITEMID
  |       and I.ITEMID = #value#
  |   </select>




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983658#3983658

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983658



More information about the jboss-user mailing list