-->
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.  [ 3 posts ] 
Author Message
 Post subject: DB-storage of XML datastream: is Hibernate for me?
PostPosted: Mon Mar 03, 2008 3:05 pm 
Newbie

Joined: Mon Mar 03, 2008 2:58 pm
Posts: 2
Hey there Hibernate people.

I have an XML-over-JMS datastream (multiple topics/schemas) which I am about to write a "store everything that comes over these topics to a database" application, for extended analasys and possible playback.

It has been suggested to me that Hibernate would be perfect for my needs (and also that Spring should be considered to go along with it), so I read the hibernate website and wikipedia entry, and I'm not sure I see the perfect fit that was mentioned.

I believe that the suggestion was to use XMLBeans to generate XML schema-based classes, then use Hibernate to store them after they are parsed.

So, I wanted to ask the people who really know Hibernate well: is this an intended use of Hibernate? Is it a *good* use of Hibernate? Is it a *simple* use of Hibernate? Would Hibernate actually help me with this, or hinder me?

One of the goals is also to set up the system so we can update the database and/or XML schemas and update the "store everything..." application through properties only: no programming. Is this within the bounds of Hibernate as well?

Thanks in advance.

-nray


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 04, 2008 1:31 pm 
Newbie

Joined: Mon Mar 03, 2008 2:58 pm
Posts: 2
So, nobody on the forums can help me get a better grasp of how Hibernate fits into my situation? :/

-nray


Top
 Profile  
 
 Post subject: maybe another question should be asked
PostPosted: Wed Mar 05, 2008 2:14 am 
Newbie

Joined: Tue Mar 04, 2008 12:18 am
Posts: 2
It's by no means obvious that you should or even need to store the XML in object-form.

The real question is, first, what is the tradeoff between

    the costs (speed, etc.), amount of effort breaking the XML down into objects and then storing the objects
and
    storing the XML as CLOB or something instead.


If there's a need to query the stored XML with field-criteria filtering etc, then yes - XML-object-Hib-DB might be the way to go (avoid substring-SQL horrors)

If the main need is to "replay" the JMS-messaging through existing processes, there's less need for objects-on-demand.

If there's no need for granular after-the-fact field-level access to what was originally XML over JMS, why go to the trouble?

Consider the tradeoff above first. Then you can see how Hibernate helps you. Frankly, I'd use Hibernate either way - the ORM would be a lot simpler in one case vs. the other, but I see no reason not to use Hibernate either way.

You could consider JIT XML-object conversion - read the XML, run it through a JAXB, Commons-Digester etc. XML-object conversion.

Many choices, none of them obvious. It all depends on needs - actual and anticipated.


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

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.