-->
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.  [ 7 posts ] 
Author Message
 Post subject: Standalone Java Application
PostPosted: Wed Mar 24, 2004 7:02 pm 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
I'm trying to create a simple standalone Java app that uses Hibernate.

There is an FAQ that says to use a Datastore and the Hibernate.properties file. Fine.

What package is the Datastore class located in?

I can only find reference to cirrus.hibernate.Datastore which I believe was version 1.0 of Hibernate?

BTW, is there an example of what I'm trying to do online anywhere?

Thanks,

Drew


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 7:15 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Look at the eg/ subdirectory, it's trivial.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 11:32 am 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
OK, I've created this java command line utility that parses some information from an incoming email and inserts it into a database via hibernate. This program launches each time an email is received from a specific sender.

Thing is, with the JVM startup and all the Hibernate mapping/config, it's really slow.

I suppose I could post the data to a servlet or start some kind of "service" but that seems like a long way around.

Is there a better way that I'm not thinking of?

Drew


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 12:18 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Perl is designed for this use case, fast startup, DBI, native RE support for text processing.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 1:02 pm 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
I think you are probably right but I don't know Perl for beans.

Trying to fit a round peg in a square socket.

Drew


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 2:37 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
drewlane wrote:
I think you are probably right but I don't know Perl for beans.

Trying to fit a round peg in a square socket.

Drew


I am not sure, but I think apache James can help http://james.apache.org/ as I understand Mailet life cycle is analogy for HttpServlet.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 10:47 am 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
baliukas wrote:
I am not sure, but I think apache James can help http://james.apache.org/ as I understand Mailet life cycle is analogy for HttpServlet.


Wow. That's pretty cool. I didn't even know that existed.

I would probably try it but I've already got sendmail configured and working well, so I'm gonna leave it be.

BTW, for this little script I ended up removing Hibernate and just using a prepared statement. Performance is now acceptable using Java.

I guess you have to use the right tool for the job but I wanted to get my feet wet with Hibernate anyway.

It kinda makes me think about having some kind of standalone Hibernate server, however. Does this make any sense?

Drew


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.