Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

How to unmarshall using castor into an existing Bean without duplicates.

Thread view: 
adam.corsaw@gmail.com - 15 Nov 2005 21:06 GMT
Here's the problem.

I have a program which takes an EAR file as input and generates an
install script.

I populate a bunch of JavaBeans based on information extracted from the
EAR file.

The user can change some mutable fields during the process and I have
off any settings they might have changed using Castor into an XML file.

When the user comes back in I want to read their changes in so they
don't have to setup the application again.  They could have new EJBs or
a new role in their application so I can't just wipe out what I have
prepopulated with the saved settings.

The only thing I've come up with so far is to take the ArrayList of
beans and do a manual sync between the two lists of beans.  I think
that's too ugly and there should be a better way than that.

I could write a custom .equals method for the beans and if it's the
same take the new version but I don't see where Castor is calling my
setMyProperty(ArrayList list) method.

Any suggestions or past experience with something like this would be
REALLY appreciated.

Thanks
Robert M. Gary - 15 Nov 2005 21:36 GMT
> I have a program which takes an EAR file as input and generates an
> install script.

Its funny how many of us do that. I'm sure Sun is not happy about it.
They invisioned a world where customers would buy a J2EE container and
guys like us would release ear files. That doesn't seem to have ever
caught on. No customer I've seen know what a J2EE container is or cares
what it is. They don't want ear files, they want InstallAnywhere CDs.
As a result we end up shipping J2EE containers like JBoss with hacked
up configuration so customers don't know a J2EE container is running. I
think the original marketing idea from Sun was that they could go into
production environments and sell their J2EE container without upsetting
the apps running on it. They thought end customers would administer the
J2EE containers themselves.

-Robert


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.