-->
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.  [ 2 posts ] 
Author Message
 Post subject: Using Hibernate for new enhancements with Existing JDBC Code
PostPosted: Thu Mar 18, 2010 10:22 pm 
Newbie

Joined: Sun Dec 02, 2007 7:28 pm
Posts: 5
Hi Everyone,

We have an application which is using JDBC and which uses an existing DataSource in websphere application server.
We are getting new enhancements in our application and we are trying to use Hibernate for new enhancements.

As our old code is still in JDBC and if we try to migrate new enhancements using hibernate and both will be using the
same datasource,will it create any impact on the performance of the application by any chance.And can I use the same
datasource for existing JDBC code and the new code which we are trying to build using hibernate.

We will not be able to create a new datasource specifically for hibernate.

Can anyone please clarify me.

Regards,
Rakesh.


Top
 Profile  
 
 Post subject: Re: Using Hibernate for new enhancements with Existing JDBC Code
PostPosted: Fri Mar 19, 2010 7:23 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
can I use the same datasource for existing JDBC code and the new code which we are trying to build using hibernate.

In my opinion there should be no problem.
In order to gain the datasource in hibernate you must let register it with JNDI.
You may to have adjust the pool-size of your datasource configuration,
if there in future are coming connection requests over hibernate too.
Further thing to consider is to avoid lock-situations between the objects you access
with hibernate as well as with JDBC directly.
On the other hand if you choose for optimistic locking (and versioning) in hibernate,
then you must also check for version attribute manuall when you modify them with JDBC directly.
Best would be that the objects you access with Hibernate are not correlated to the objects you access with JDBC directly.

Quote:
We will not be able to create a new datasource specifically for hibernate.


Why not?
In most application servers there is possible to configure more than one datasource.
I think that should also be possible in websphere application server, is'nt it?


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