-->
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: no prepared statements: WebLogic-10.3 and Oracle
PostPosted: Tue Nov 11, 2008 6:52 am 
Beginner
Beginner

Joined: Tue Sep 16, 2003 11:26 am
Posts: 25
Location: Berlin - Germany
Hibernate version:2.1.8
Database: Oracle 10g
Application Server: WebLogic 10.3

My application is using Hibernate-2.1.8 to access an Oracle 10g database. Application is running in WebLogic-10.3. Hibernate uses a WebLogic datasource. The datasource uses the Oracle JDBC driver from Oracle which is part of WebLogic-10.3 distribution.

In this environment Hibernate does not use prepared statements. The JDBC performance is bad.

I tested the same application in JBoss-4.2 with the same database, In JBoss prepared statements are used. Both server uses the same JDBC driver form Oracle. I added two SQL statements which Hibernate generated from the same HQL source in WebLogic and JBoss in the end of this posting.

Why Hibernate generates different SQL statements depending on the underlying application server?

How do i activate prepared statements generation in WebLogic?

SQL Log:

WebLogic-10.3:
Code:
SELECT DISTINCT
REIFENFELG0_.EOL_REIFEN_ID AS X0_0_, REIFENFELG0_.GROESSE AS X1_0_, REIFENFELG0_.NOTLAUF_X AS X2_0_, REIFENFELG0_.SOMMER_WINTER AS X3_0_, REIFENFELG0_.GUELTIG_VON AS X4_0_, REIFENFELG0_.GUELTIG_BIS AS X5_0_, REIFENFELG0_.TYP_JATO_ID AS X6_0_
FROM
EOL_REIFEN REIFENFELG0_
WHERE (((((((REIFENFELG0_.GROESSE LIKE '225/55R16%' ))
OR((REIFENFELG0_.GROESSE IS NULL )))
AND((REIFENFELG0_.NOTLAUF_X IS NULL )))
AND(((REIFENFELG0_.SOMMER_WINTER= 'S' ))
OR((REIFENFELG0_.SOMMER_WINTER IS NULL ))))
AND((((REIFENFELG0_.GUELTIG_BIS>= {TS '2008-11-11 10:39:56.003' } ))
OR((REIFENFELG0_.GUELTIG_BIS IS NULL )))
AND(((REIFENFELG0_.GUELTIG_VON<= {TS '2008-11-11 10:39:56.003' } ))
OR((REIFENFELG0_.GUELTIG_VON IS NULL )))))
AND(((REIFENFELG0_.TYP_JATO_ID= 720 ))
OR((REIFENFELG0_.TYP_JATO_ID IS NULL ))))


JBoss-4.2
Code:
SELECT DISTINCT
REIFENFELG0_.EOL_REIFEN_ID AS X0_0_, REIFENFELG0_.GROESSE AS X1_0_, REIFENFELG0_.NOTLAUF_X AS X2_0_, REIFENFELG0_.SOMMER_WINTER AS X3_0_, REIFENFELG0_.GUELTIG_VON AS X4_0_, REIFENFELG0_.GUELTIG_BIS AS X5_0_, REIFENFELG0_.TYP_JATO_ID AS X6_0_
FROM
EOL_REIFEN REIFENFELG0_
WHERE (((((((REIFENFELG0_.GROESSE LIKE '205/55R16%' ))
OR((REIFENFELG0_.GROESSE IS NULL )))
AND((REIFENFELG0_.NOTLAUF_X IS NULL )))
AND(((REIFENFELG0_.SOMMER_WINTER= 'S' ))
OR((REIFENFELG0_.SOMMER_WINTER IS NULL ))))
AND((((REIFENFELG0_.GUELTIG_BIS>= ? ))
OR((REIFENFELG0_.GUELTIG_BIS IS NULL )))
AND(((REIFENFELG0_.GUELTIG_VON<= ? ))
OR((REIFENFELG0_.GUELTIG_VON IS NULL )))))
AND(((REIFENFELG0_.TYP_JATO_ID= ? ))
OR((REIFENFELG0_.TYP_JATO_ID IS NULL ))))


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2008 12:36 pm 
Beginner
Beginner

Joined: Tue Sep 16, 2003 11:26 am
Posts: 25
Location: Berlin - Germany
Problem is solved.

Reason was neither Hibernate nor WebLogic. Reason was a parameter of the application.


Top
 Profile  
 
 Post subject: Hibernate with Weblogic 10.3
PostPosted: Sat Mar 07, 2009 5:28 am 
Newbie

Joined: Sat Mar 07, 2009 5:20 am
Posts: 7
Hi,

I am New to both hibernate and Weblogic. I have installed Weblogic 10.3 . Developers want to use Hibernate in their application. Is there any configuration need to be done at weblogic server level for hibernate.

And how to deploy in weblogic server. Please help me out.

Thaks in advance

Sridhar.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 3:41 am 
Beginner
Beginner

Joined: Tue Sep 16, 2003 11:26 am
Posts: 25
Location: Berlin - Germany
Hi Sridhar,

you dont need any special configuration in WebLogic for Hibernate. Of course you have to configure a datasource in WebLogic if you want to use them in Hibernate. You deploy hibernate as one of the applications library jars.

Good luck, Daniel.


Top
 Profile  
 
 Post subject: Hibernate with Weblogic
PostPosted: Tue Mar 10, 2009 4:54 am 
Newbie

Joined: Sat Mar 07, 2009 5:20 am
Posts: 7
Hi Daniel,

Thank you very much for your reply. I have copied some jars Ex. antlr...etc to lib folder of my domain for hibernate purpose. This thing i have seen in some website. So i did it. But i am not getting what is the classpath is? Which path i have to set as class path. Because while running our developers hibernate workspace in Myeclipse it is giving errors. From that i understood it is classpath error. Because it is showing these class files not found in classpath. But the class file were there only.
But if i use simple jsp page it is working fine.
Can you help me on this.

Thanks in advance

Sridhar


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 6:04 am 
Beginner
Beginner

Joined: Tue Sep 16, 2003 11:26 am
Posts: 25
Location: Berlin - Germany
Hi Sridhar,
put all Hibernate related jars in your war (folder: WEB-INF/lib) or ear file (folder: lib). If you get ClassNotFoundExceptions try to find out which jar is missing and add it the lib folder.
Daniel


Top
 Profile  
 
 Post subject: Hibernate with Weblogic
PostPosted: Tue Mar 10, 2009 6:24 am 
Newbie

Joined: Sat Mar 07, 2009 5:20 am
Posts: 7
Hi Daniel,

Thank you very much. I will check this.


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.