[jboss-user] [Management, JMX/JBoss] - ClassCastException on remote Mbean invocation
viniciuscarvalho
do-not-reply at jboss.com
Wed Jul 23 10:32:15 EDT 2008
Hello there! Our app is running inside JBoss portal and we have scoped deployment (we use a more up-to-date version of hibernate) So we set our loader-repository on the jboss-app.xml
Well, in a certain moment we need to use the portal sessionfactory and we gain access to it through:
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName name = new ObjectName("portal:service=Hibernate");
Object o = server.invoke(name, "getSessionFactory", new Object[]{}, new String[]{});
When casting "o" we are getting a classcastexception.
We have CallByValue set to true. So I can't figure out what else should we do.
Any ideas?
Best regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166165#4166165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166165
More information about the jboss-user
mailing list