• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOF in Java Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF in Java Application


  • Subject: Re: EOF in Java Application
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 16 Jun 2009 11:21:42 -0700

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@hidden> 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@hidden) Help/Unsubscribe/Update your Subscription: .com

This email sent to email@hidden




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


-- 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: EOF in Java Application
      • From: Daryl Lee <email@hidden>
References: 
 >Re: EOF in Java Application (From: Darich Runyan <email@hidden>)

  • Prev by Date: Re: EOF in Java Application
  • Next by Date: Re: EOF in Java Application
  • Previous by thread: Re: EOF in Java Application
  • Next by thread: Re: EOF in Java Application
  • Index(es):
    • Date
    • Thread