-->
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.  [ 11 posts ] 
Author Message
 Post subject: hibernate.properties vs hibernate JBOSS service
PostPosted: Mon Apr 05, 2004 2:54 am 
Newbie

Joined: Mon Apr 05, 2004 2:50 am
Posts: 17
Hello,

I have few questions ans I am not able to found any clear responses somewhere on internet.

1) Can we use hibernate.properties and Hibernate JBOSS service together ?

2) Can you give me a clear example on where I have to copy the hibernate.properties ? How I know that the hibernate.properties is well loaded.

3) If I want also to use hibernate-cfg-hmb.xml. Where must I copy it ?


Thanks for your help.


Top
 Profile  
 
 Post subject: Re: hibernate.properties vs hibernate JBOSS service
PostPosted: Mon Apr 05, 2004 6:34 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
JBRIANCH wrote:
1) Can we use hibernate.properties and Hibernate JBOSS service together ?


No. Why would you not use the MBean under JBoss?


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 6:54 pm 
Newbie

Joined: Sun Feb 08, 2004 9:30 am
Posts: 8
Location: Europe
Hi,

I started stand-alone with the hibernate.properties-solution and then used the JMX-Service. It's so much of an advantage and if you want to add whip to the top, use XDoclet to genrate that service and everything else that's needed.
Look here for more: http://www.hibernate.org/72.html
If you want some more ant-snippets, just ask :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 7:48 pm 
Newbie

Joined: Mon Apr 05, 2004 2:50 am
Posts: 17
Hello,


In fact I am using an MBean with JBOSS. So I understand that it is not possible to use an hibernate.properties and an MBean together.

1) I have to do a choice. Is that right ?

In fact I want to use PC30 as a connection tool, it is why I want to configure it an hibernate.properties.

2) Can I do that in an MBean ?


Yes I can use Xdoclet, but I want to understand before why I heve got these problems with Hibernate.

The problem could be my understanding also :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 8:02 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
If you are using JBoss, why do you want to use C3PO? The JBoss connection pooling works fine.


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 06, 2004 3:14 am 
Newbie

Joined: Sun Feb 08, 2004 9:30 am
Posts: 8
Location: Europe
JBRIANCH wrote:
Hello,


In fact I am using an MBean with JBOSS. So I understand that it is not possible to use an hibernate.properties and an MBean together.

1) I have to do a choice. Is that right ?

In fact I want to use PC30 as a connection tool, it is why I want to configure it an hibernate.properties.

2) Can I do that in an MBean ?


Yes I can use Xdoclet, but I want to understand before why I heve got these problems with Hibernate.

The problem could be my understanding also :)


Ok, I got your point :) The MBean only works with Datasources, so if you want to use C3P0, you'll have to firsz configure a user-service for that in the app-server. There are some exapmles in the jboss-forum on how to plugin another pool-manager. Good luck! :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 07, 2004 10:25 pm 
Newbie

Joined: Mon Apr 05, 2004 2:50 am
Posts: 17
Thanks you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 7:51 am 
Beginner
Beginner

Joined: Wed Feb 18, 2004 1:28 pm
Posts: 20
Location: Rovereto - Italy
> 1) Can we use hibernate.properties and Hibernate JBOSS
> service together ?
>
> No. Why would you not use the MBean under JBoss?
>
I use hibernate.properties and Hibernate JBOSS service together because I have to set hibernate.cglib.use_reflection_optimizer=false (for debugging) and It's work fine


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 6:53 pm 
Newbie

Joined: Mon Apr 05, 2004 2:50 am
Posts: 17
Hello,


Can you just explain a little bit more how you do that, because I have tried to have some information about that but I was not able to have any clear answer.

Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2004 7:28 am 
Newbie

Joined: Fri Apr 16, 2004 7:04 am
Posts: 6
Location: Brazil
lorenzo wrote:
I use hibernate.properties and Hibernate JBOSS service together because I have to set hibernate.cglib.use_reflection_optimizer=false (for debugging) and It's work fine

Can you explain us how to do use jboss service with hibernate.properties??????????????

_________________
Carlos Barretto


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 3:25 am 
Beginner
Beginner

Joined: Wed Feb 18, 2004 1:28 pm
Posts: 20
Location: Rovereto - Italy
I deploy in %JBOSS_HOME%/server/myapp/deploy my ear file.
My ear file contains the jar, war, sar files and META-INF/jboss-app.xml.
In sar file there is META-INF/jboss.service.xml (see http://www.hibernate.org/66.html).

In jboss.service.xml I configured:
CacheProvider
MapResources
JndiName
Datasource
Dialect
UseOuterJoin
ShowSql
UserTransactionName
TransactionStrategy
TransactionManagerLookupStrategy

but for others parameter (for example hibernate.cglib.use_reflection_optimizer=false) I use hibernate.properties (see http://www.hibernate.org/hib_docs/refer ... uration-s5).
Hibernate require hibernate.properties in classpath (for example %JBOSS_HOME%/server/myapp/conf/)


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