-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Use Hibernate for XML marshalling or something else?
PostPosted: Thu Mar 25, 2010 12:47 pm 
Newbie

Joined: Tue Feb 02, 2010 6:22 pm
Posts: 4
Use Hibernate for XML marshalling or something else like Castor?

I have simple producer/consumer programs using JMS and sending POJOs. It was prototype. It is doing a simple XML marshalling and then posting JMS TextMessage to JMS topic for communication between producer/consumer. Objects are small like worst case 2-3kb and transfer rate will be about 7-10msg/sec. Now I have to do real thing and that means many more object types that need to be marshalled to XML before they can be send via JMS.

But I also have to persist data to DB. I am thinking of using Hibernate for this part. Many, but not all of object that will travel via JMS must also be persisted to DB using Hibernate. Since I have to map most of java classes to persist using Hibernate, then maybe I can map all of them and ask Hibermate to give me the marshalled XML so I can send via JMS?

Here is example of 2 classes simplified for post. Both have to be send via JMS, so they have to be XML marshall. ThermalReading class doesn't need persistance to DB, but Patient class needs tthat. Can/should I use Hinernate to get marshalled XML for both or use Hibernate only for Patient and something like Castor for ThermalReading :

class Patient {
public Collection<int> getConditions();
public void setConditions(Collection<int> newConditions);
};
class ThermalReading {
public void setR18(double);
public double getR18();
};

Thanks for help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.