-->
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.  [ 3 posts ] 
Author Message
 Post subject: Howto configure custom listeners an HibernateServiceMBean
PostPosted: Tue Nov 01, 2005 12:40 pm 
Newbie

Joined: Tue Nov 01, 2005 12:31 pm
Posts: 5
Hi folks,

I'm searching for the right place to add my custom event listeners to a the managed hibernate service mbean.

I've read the docs and wiki pages here and on the jboss site, but I didn't found something.

Actually I've build an ear with a jboss-service.xml which contains my MBean-Configuration. But there I can't add my custom listeners.

Does anybody knows the way on how I can configure this?

Regards
Steffen...

[b]Hibernate version:[/b]
Hibernate 3.1rc2 on jboss4.0.3


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 1:46 am 
Newbie

Joined: Tue Nov 01, 2005 12:31 pm
Posts: 5
Hi,

I've tracked down the necessary files HibernateServiceMBean, HibernateService which subclasses ExternalSessionFactoryConfig and Configuration.

I've found in ExternalSessionFactoryConfig a method called setCustomListenersAsString, which could be used for this. Only a new setter msut be added to the MBean interface.

But now I get an ArrayStoreException. The problem is, that ExternalSessionFactoryConfig receives the listener class name as String and passes it to the Configuration.setListener(String, Object).

But Configuration build's a Object[] of the real listener class as type and not as type String.

Is it a bug or do I'm something wrong?

If it'S a bug the solution seems to be update MBean-interface and update ExternalSessionFactoryConfig to create an instance of the, as String specified, listener class.

Is anybody interested in a patch against hibernate 3.1 rc 2?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 12:37 pm 
Newbie

Joined: Fri Oct 24, 2008 12:25 pm
Posts: 1
Time goes by... But the problem is still actual :)
Does anybody know any resolution?

JBoss4.0.5; hibernate3.2.3.


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