Re: newbie - Cayenne, Ant, JBoss?

From: Craig Ziesman (cziesma..ac.com)
Date: Tue Sep 30 2003 - 13:40:14 EDT


I built a simple JBoss HelloWorld app and managed to integrate with minor difficulties. I would be willing to share this if anyone is interested.

Now I am trying to integrate Cayenne into an existing J2EE application. I created a DataObject to replace one of my entity beans. The DataObject gets referenced from a GUI using an applet/servlet combo, which works great. However, the DataObject also gets referenced from an existing session bean. This fails with a Class Not Found exception when I try to reference the Dataobject.

What is the required structure of the EAR file to get this to work? I have tried every combination I can think of, and nothing helps.

On Wednesday, September 24, 2003, at 03:19PM, Andrus Adamchik <andru..bjectstyle.org> wrote:

>Hi Craig,
>
>
>On Wednesday, September 24, 2003, at 02:13 PM, Craig Ziesman wrote:
>> 1) Where could I find an example/tutorial on how to integrate Cayenne
>> into Ant scripts for a JBoss application, both build and deployment? I
>> use Netbeans for my IDE.
>
>There is nothing special about building a Cayenne-enabled application.
>Just make sure you copy all the XML project files (cayenne.xml,
>*.map.xml, *.driver.xml) into WEB-INF directory of the web application
>or to a CLASSPATH location if this is not a webapp. Also you may find
>it useful to run class generation every time before compiling (it is
>"lazy" and "safe" in that it won't overwrite any of your custom code).
>For more details see this:
>
> http://objectstyle.org/cayenne/userguide/javagen.html
>
>
>> 2) If I currently have an app that uses EJBs (both entity and
>> session), what is a good approach for redesign to use DataObjects?
>
>Can't tell without looking at your current EJB design. In general I
>would start by reverse engineering the database, generating Java
>classes, and then seeing what business methods can be salvaged from
>entity beans (and sometimes even session beans). Those would go into
>the empty generated subclasses of your DataObjects.
>
>Some high level discussion of different approaches is provided here:
>
>
>http://objectstyle.org/cayenne/modelerguide/object-relational-modeling/
>index.html
>
>
>> 3) Do I need to unlearn anything from past experiences with EOModeler?
>
>Probably not... There are underlying differences of course, so if
>something doesn't work like EOF would, this is not necessarily a bug :-)
>
>Andrus
>
>
>



This archive was generated by hypermail 2.0.0 : Tue Sep 30 2003 - 13:39:57 EDT