You also can package it up as an OSX .app bundle. This was done with the WO Webservices assistant. See /Developer/Applications/WebObjects/ WebServicesAssistant.app file layout. It's very similar to a .woa layout.

I suspect you can try programmatically creating your own EOModelGroup and adding the models that way.



On Jun 16, 2009, at 11:21 AM, Chuck Hill wrote:

Hi Darich,


On Jun 16, 2009, at 10:42 AM, Darich Runyan wrote:

Dave,

I had a legacy swing based Java application that was using a home- spun data access layer. The powers that be decided they wanted to quickly move to a web application. I did not/still do not have the time to re-write the entire app because it is huge so my team wrote a flash front end quickly and interfaced that with a bunch of the legacy objects and methods that had been wrapped up and deployed within Tomcat (I realize it is not the best method but money and time were short). We are still using the home spun ORM. I
want to move to a better ORM and I had worked with WO on a couple of
projects in the past and remember the power of EOF so I suggested to my lead developer to look into it. He created a model and reworked some of our code to use the EOF Java Objects but it is not working. I am pretty sure that it has something to do with loading the model, which brings up your second
question.  Yes, I think it can't find the model.

Yes, you can do what you want. There was an example somewhere called, I think, JavaTool. /System/Library/WebObjects/ JavaApplications/javaeoutil.woa on your hard drive is another example that this is possible.

There are two approaches to this: the easy way and the hard "fight the tool" way.

The easy way is to package your app as a .woa bundle with the models in App.woa/Contents/Resources and the working directory at launch of App.woa. This structure is what allows all the automatic loading behavior you are expecting.

The hard way (and I suspect it is not all that hard) is to create the default model group and then manually load the model(s). See the JavaDocs on EOModelGroup and EOModel for how to do this.

Chuck


On 6/16/09 1:25 PM, "David Avendasora" <[email protected]> wrote:

Hi Darich,

A couple questions because it is unclear what you are trying to do.

1) By Pure Java do you mean a Java Client application where the client
machines are using a Swing UI?

2) Do you have an EOModel file that it can't find, or are you trying
to create an EOF app without a model?

Dave

On Jun 16, 2009, at 1:08 PM, Darich Runyan wrote:

Hello,

I would like to use EOF in a pure Java application and not from
within WO.
I have searched and not found any good information on this topic.
It seems
that I should be possible but all of the code that I have written
keeps
tanking and if it cannot find the model.  Is there any information
on this
subject available?

Thanks


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora
.com

This email sent to [email protected]




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [email protected]


--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/dlee%40apple.com

This email sent to [email protected]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to