geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: To get Petstore 1.1.2 work on geronimo
Date Fri, 24 Sep 2004 19:41:06 GMT
Thanks for such a detailed post!  Maybe we should throw this into the
wiki and invite others to try it out and update it with their own
comments.

We need more people like you, Rajesh.  Great job.

-David


On Fri, Sep 24, 2004 at 08:50:42PM +0530, Rajesh Ravindran wrote:
> Hi all,
> 
> I had a chat with David Blevins & he asked me to share my experiences
> on making petstore work in geronimo with everyone.
> 
> First of all I would like to state that I did not work on the latest
> version of petstore i.e. 1.3.2 . I used the petstore that comes with
> Weblogic 6.1. (which i believe is 1.1.2)  I got that working on
> geronimo. In doing this I got a lot of help from Gianny & a lot of
> guys on the mailing lists & friends who worked with me on this:
> Sai,Prem & Vandana. I hope this would be of some help. Please respond
> with any queries and feedbacks. This is not a detailed list of
> changes, but just an overview. So you can push me for details.
> 
> I had to make the following changes to get petstore running.
> 
> 1. Had to provide the ejb-link at all places wherever extenal ejb's
> were being referenced. It seems it doesnt work at least in
> geronimo-jetty.xml if we just give the ejb-ref & give the target-name.
> Faced problems there.
> 
> for instance, in the web.xml
> 
> <ejb-ref>
>     <ejb-ref-name>ejb/catalog/Catalog</ejb-ref-name>
>     <ejb-ref-type>Session</ejb-ref-type>
>     <home>com.sun.j2ee.blueprints.shoppingcart.catalog.ejb.CatalogHome</home>
>     <remote>com.sun.j2ee.blueprints.shoppingcart.catalog.ejb.Catalog</remote>
> <!---------------------------------------------------------------->
>     <ejb-link>TheCatalog</ejb-link>
> 
>     <!--This had to be added as geronimo requires the links to be available-->
> <!----------------------------------------------------------------->
> </ejb-ref>
> 
> 2. Another factor was that the japanese screen definitions were not
> working due to the use of unicode encoding & I guess the app server
> could not identify it. So removed those screendefinitions from
> requestmappings.xml
> i.e remove the following line from requestmapping.xml
> 
> <screen-definition url="/WEB-INF/xml/ja/screendefinitions.xml"
> language="ja_JP"/>
> 
> 3. Two setters & getters in the petstore code were giving me errors.
> These were the setNumItems & setStartIndex. This was due to the fact
> that the setter accepted String & the getter was returning an int. Had
> to change the setter to accept int.
> 
>  public void setNumItems(String numItemsStr) {
>     numItems = Integer.parseInt(numItemsStr);
>   }
> 
>   public void setStartIndex(String startIndexStr) {
>     startIndex = Integer.parseInt(startIndexStr);
>   }
> 
> 
>   had to be changed to
> 
>   public void setNumItems(int numItems) {
>     this.numItems = numItems;
>   }
> 
>   public void setStartIndex(int startIndex) {
>     this.startIndex = startIndex;
>   }
> 
> This has to be done in the following files:
>  ListTag.java,ProductListTag.java,CartListTag.java,SearchListTag.java,ProductItemListTag.java,
>  MyListTag.java
> 
> 4. Had to use an adapter (tranql generic adapter) & had to write the
> corresponding geronimo-jetty.xml to use the oracle database (or
> cloudscape if you are using that) from where to access the inventory
> and other databases used by petstore. The adapter jar had to be packed
> along with the ra.xml, geronimo-ra.xml & the required drivers.
> 
> Pack it up in a *.rar archive.
> 
> 5. To get the petstoreAdmin.ear working:
> 
> Had to create the petstore realm (this was for getting the
> petstoreAdmin working)
> 
> the following user & group properties files had to be created
> 
> # groups.properties
> gold=
> cust=j2ee
> admin=jps_admin
> 
> 
> # users.properties
> j2ee=j2ee
> jps_admin=admin
> 
> A petstore-plan.xml to be created for security
> 
> The petstore security plan had to be added to maven.xml, & then build it.
> 
> In web.xml changed the realm from default to petstore-realm
> 
> <login-config>
>     <auth-method>FORM</auth-method>
>     <realm-name>petstore-realm</realm-name> <!--changed from default
> to petstore-realm-->
>     <form-login-config>
>       <form-login-page>/login.jsp</form-login-page>
>       <form-error-page>/error.jsp</form-error-page>
>     </form-login-config>
> </login-config>
> 
> In the ejb-jar.xml had to make the following change:
> 
> <env-entry>
>       <env-entry-name>user/AdminId</env-entry-name>
>       <env-entry-type>java.lang.String</env-entry-type>     
> <env-entry-value>petstore-realm:[org.apache.geronimo.security.realm.providers.PropertiesFileGroupPrincipal:admin]</env-entry-value>
>       <!-changed the value from jsp_admin to the whole nested name of
> the principal-->
> 
> This is the list, in case I ve forgotten something, I ll post it soon.
> 
> Thanks
> Rajesh Ravindran

Mime
View raw message