users
[Top] [All Lists]

Re: [cinjug-users] Hibernate in JBoss vs Tomcat

To: Wei Zhang <wei.zhang@xxxxxxxxxxxxxxxxx>
Subject: Re: [cinjug-users] Hibernate in JBoss vs Tomcat
From: Greg Nieman <gnieman@xxxxxxxx>
Date: Fri, 21 Apr 2006 21:04:19 -0400
Cc: users@xxxxxxxxxx
Delivered-to: mailing list users@cinjug.org
In-reply-to: <800CC263DA01FF468F7321C62025B6A40384D7@intelligmail.intelligrated.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <800CC263DA01FF468F7321C62025B6A40384D7@intelligmail.intelligrated.com>
User-agent: Thunderbird 1.5 (Windows/20051201)
Wei,

This isn't definitive, but I can think of a few questions I'd have to ask before I even took a stab at dealing with it.

What services are running in JBoss?
Asked before, but worth repeating, what versions of Hibernate and any other libraries are actually hitting the classloader. JBoss' default (everything shared) and Tomcat's webapp first models are pretty polar.
Asked before, how much memory is the server getting on startup?
Related: Is this a Tomcat local instance, and if so, is the JBoss server a standalone local instance as well. Or are either network deploys with other people hitting them?
Related: Have you profiled the garbage collection behavior of both?
Asked, but worth repeating: How are you obtaining connections in each? DBCP? JNDI? Other? Is pool performance a possible issue?
Are the configured connection properties the same?
Have you eliminated the network as an issue: are they on the same networks, and where do these networks sit in relation to the database?
Depending on the database, are the same drivers/version being used?
Is any logging/diagnostics enabled for either the JBoss instance or the database drivers installed?


These are just things that come off the top of my head. They may or may not be applicable, but I think you always need to start with trying to eliminate the all the obvious suspects before you start to drill down. If nothing else, if you are looking for hints, the more info you post the better chance I think you have of someone being able to suggest something.

gn

Wei Zhang wrote:
I am using Hibernate3.0, Jboss 4.0.1 and Tomcat 5.5.12. It is ok with
Tomcat. The problem is Jboss. What I studied is the same method call in
a while loop.


        try {
            String sql = "from table where id = :id order by property1";
            Query query = getSession().createQuery(sql).setString("id",
id);
            parts = query.list();
        } catch (Exception e) {
            e.printStackTrace();
        }

Below is the time for each call with the loop in milli-seconds for Jboss
and Tomcat. You can see that somehow Jboss just takes longer. The total
difference is at the end.

Jboss   Tomcat
21      10
20      0
260     0
10      0
10      10
10      0
20      10
50      10
10      10
10      0
10      10
20      10
10      10
20      10
21      0
20      0
20      10
20      10
30      10
20      0
10      10
20      0
20      10
20      10
20      10
20      10
20      0
20      10
20      10
10      0
10      10
30      10
10      10
20      0
20      10
20      10
10      10
10      0
20      10
10      10
21      10
20      10
50      10
30      10
20      10
20      10
20      10
20      10
20      10
40      10
20      0
20      10
20      10
30      10
20      10
20      20
20      10
20      10
20      0
20      10
20      10
20      10
30      10
30      10
20      10
20      0
30      10
20      10
20      10
20      10
20      10
20      10
20      0
30      10
40      10
20      10
30      0
30      0
20      10
421     90
161     40
60      20
80      20
60      10
50      10
61      20
50      10
70      20
50      20
460     101
490     100
301     70
100     30
100     430
100     31
110     30
100     30
101     30
90      30
90      20
100     30
90      20
90      30
100     20
101     30
100     20
90      30
90      20
90      20
100     30
90      30
101     30
90      30
100     20
100     30
100     30
100     30
111     31
90      20
110     20
140     40
100     30
111     30
100     30
100     20
100     831
100     30
7682    3304 (total)

-----Original Message-----
From: Broyles, Eric [mailto:ebroyles@xxxxxxx] Sent: Friday, April 21, 2006 11:42 AM
To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] Hibernate in JBoss vs Tomcat


Ironic that you didn't find any Jboss/Hibernate documentation since
Jboss provides professional support for it.


I use Hibernate in Tomcat and it's been great.  I haven't tried running
the application in Jboss.

What versions are you using?

-----Original Message-----
From: Wei Zhang [mailto:wei.zhang@xxxxxxxxxxxxxxxxx] Sent: Friday, April 21, 2006 11:16 AM
To: users@xxxxxxxxxx
Subject: [cinjug-users] Hibernate in JBoss vs Tomcat


Hi,

I hava an application with Hibernate classes and mapping file bundled
along with. I have Tomcat as my dev and test environment. Recently we
decide to switch to Jboss. However, when I setup everything in Jboss and
deployed the same application to Jboss, it becomes very slow. Each
database fetch takes 3 or 4 times longer for Hibernate. I searched Jboss
and hibernate document and forum and did not find a solution.


Any help will be appreciated.
Thanks in advance for your time and comments, Zhang, Wei
(513)701-7324
Wei.zhang@xxxxxxxxxxxxxxxxx



---------
You may unsubscribe from this mailing list by sending a blank email
addressed to:
users-unsubscribe@xxxxxxxxxx

--
Find additional help by sending a blank email addressed to:
users-help@xxxxxxxxxx


--------- You may unsubscribe from this mailing list by sending a blank email addressed to: users-unsubscribe@xxxxxxxxxx

--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx





---------
You may unsubscribe from this mailing list
by sending a blank email addressed to:
users-unsubscribe@xxxxxxxxxx

--
Find additional help by sending a blank email
addressed to:
users-help@xxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>