Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo Kernel turns off MBeanServer creation
Virgo Kernel turns off MBeanServer creation [message #688776] Sat, 25 June 2011 17:34 Go to next message
Ming Qin is currently offline Ming QinFriend
Messages: 22
Registered: July 2009
Junior Member
Settings:
virgo-kernel-3.0.0.M05, activemq-5.5.0, window 7 professional 64-bit
Commands to fire up virgo: startup.bat -clean -jmxport 1099

Problem:
I created a bundle imgs-bootstrap-1.0.0 to embed activemq inside virgo-kernel.
it appeared that embedded activemq's jmx connector was not completed, because ActiveMQ.Advisory.Topic is missed
However, Jconsole can access embedded activemq instance through JMX URL as service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

Solution:
I would like to turn off Virgo's creating Mbeanserver, so let Activemq take over task of creation of MBeanserver so that I could find the root cause of lacking of advisory support in activemq embedded in osgi container

Below screenshot showed in Jconsole under org.apache.activemq.localhost.Topic, ActiveMQ.Advisory.Topic is missed.
http://members.cox.net/jbuilder/virgo-jconsole.jpg

Following is log of virgo kernel console complained about java.rmi.AccessException: Cannot modify this registry


...............
..............
[2011-06-25 08:18:08.351] region-dm-4 <> Load-time weaving not enabled for bundle 'multi-artifact.plan-1-imgs-bootstrap_1.0.0 [76]',

[2011-06-25 08:18:08.354] region-dm-4 <> MBean exporting not enabled for bundle 'multi-artifact.plan-1-imgs-bootstrap_1.0.0 [76]',
[2011-06-25 08:18:08.377] region-dm-4 <> No outstanding OSGi service dependencies, completing initialization for OsgiBundleXmlApplica
tionContext(bundle=multi-artifact.plan-1-imgs-bootstrap, config=osgibundle:/META-INF/spring/*.xml)
[2011-06-25 08:18:08.384] region-dm-5 <> Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBea
nFactory@445aa997: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.apache.activemq.xbean.XBeanBrokerServi
ce#0,activemqConnectionFactory,pooledConnectionFactory,resourceManager,DlbOutDestination,specialListener,specialLogger,DlbOutContainer]; root of facto
ry hierarchy
[2011-06-25 08:18:08.494] region-dm-5 <> PListStore:C:\activemq\localhost\localhost\tmp_storage started
[2011-06-25 08:18:08.712] region-dm-5 <> Using Persistence Adapter: KahaDBPersistenceAdapter[C:\activemq\localhost\kahadb]
[2011-06-25 08:18:08.768] JMX connector <> Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.namin
g.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Cannot modify this registry]

[2011-06-25 08:18:09.148] region-dm-5 <> KahaDB is version 3
[2011-06-25 08:18:09.178] region-dm-5 <> Recovering from the journal ...
[2011-06-25 08:18:09.182] region-dm-5 <> Recovery replayed 4 operations from the journal in 0.019 seconds.
[2011-06-25 08:18:09.193] region-dm-5 <> ActiveMQ 5.5.0 JMS Message Broker (localhost) is starting
[2011-06-25 08:18:09.195] region-dm-5 <> For help or more information please see: http://activemq.apache.org/
[2011-06-25 08:18:09.491] JMX connector <> Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.namin
g.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Cannot modify this registry]

[2011-06-25 08:18:09.532] region-dm-5 <> Listening for connections at: tcp://Squilchuck:61616
[2011-06-25 08:18:09.535] region-dm-5 <> Connector openwire Started
[2011-06-25 08:18:09.540] region-dm-5 <> ActiveMQ JMS Message Broker (localhost, ID:Squilchuck-55156-1309015089220-0:1) started
[2011-06-25 08:18:09.562] region-dm-5 <> Resource manager is unrecoverable due to missing classes: java.lang.NoClassDefFoundError: or
g/apache/geronimo/transaction/manager/NamedXAResource
[2011-06-25 08:18:09.595] region-dm-5 <> Starting beans in phase 2147483647
[2011-06-25 08:18:09.712] region-dm-5 <> Publishing application context as OSGi service with properties {org.springframework.context.
service.name=multi-artifact.plan-1-imgs-bootstrap, Bundle-SymbolicName=multi-artifact.plan-1-imgs-bootstrap, Bundle-Version=1.0.0}
[2011-06-25 08:18:09.717] region-dm-5 <> Sending event to topic 'org/osgi/service/blueprint/container/CREATED' with properties '{bund
le.version=1.0.0, bundle=multi-artifact.plan-1-imgs-bootstrap_1.0.0 [76], bundle.symbolicName=multi-artifact.plan-1-imgs-bootstrap, type=1, timestamp=
1309015089717, bundle.id=76}'
[2011-06-25 08:18:09.723] region-dm-5 <> Handling event 'org.osgi.service.event.Event [topic=org/osgi/service/blueprint/container/CRE
ATED]'
[2011-06-25 08:18:09.726] region-dm-5 <> Recording created application context for bundle 'multi-artifact.plan-1-imgs-bootstrap_1.0.0
[76]'
[2011-06-25 08:18:09.730] region-dm-5 <> Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=multi-art
ifact.plan-1-imgs-bootstrap, config=osgibundle:/META-INF/spring/*.xml))
[2011-06-25 08:18:09.730] start-signalling-2 <> Driving signal 'org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$S
tateMonitorSignal@771c7eb2'
[2011-06-25 08:18:09.738] start-signalling-2 <> Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.osgi.io_1.
2.1]' pushed and set to 'KernelBundleClassLoader: [bundle=multi-artifact.plan-1-imgs-bootstrap_1.0.0]'
[2011-06-25 08:18:09.742] start-signalling-2 <DE0005I> Started bundle 'multi-artifact.plan-1-imgs-bootstrap' version '1.0.0'.

[Updated on: Sat, 25 June 2011 19:51]

Report message to a moderator

Re: Virgo Kernel turns off MBeanServer creation [message #689267 is a reply to message #688776] Mon, 27 June 2011 09:51 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
I'm not sure how you could do that without making extensive changes to Virgo since Virgo calls java.lang.management.ManagementFactory.getPlatformMBeanServer in multiple places (see these hits on OpenGrok) and any of these could create the factory if it does not already exist.

Re: Virgo Kernel turns off MBeanServer creation [message #690073 is a reply to message #689267] Tue, 28 June 2011 22:57 Go to previous messageGo to next message
Ming Qin is currently offline Ming QinFriend
Messages: 22
Registered: July 2009
Junior Member
Glyn:
thanks for your reply.
I made a few changes on my bundle's configuration on activemq, ActiveMQ.Advisory.Topic appears on my Jconsole and activemq web console get started in another JVM also works fine, though my bundle which embedded activemq broker started with error messages
Quote:

[2011-06-28 15:26:42.632] JMX connector <> Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.
NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Cannot modify this registry]


My experiment approved that virgo kernel could be a versatile microkernel for applications employing transport protocol like activemq.

Should Virgo has a release as "Virgo Message Broker" based on activemq?

[Updated on: Tue, 28 June 2011 23:52]

Report message to a moderator

Re: Virgo Kernel turns off MBeanServer creation [message #690218 is a reply to message #690073] Wed, 29 June 2011 07:47 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Ming Qin wrote on Tue, 28 June 2011 23:57
Glyn:
thanks for your reply.
I made a few changes on my bundle's configuration on activemq, ActiveMQ.Advisory.Topic appears on my Jconsole and activemq web console get started in another JVM also works fine, though my bundle which embedded activemq broker started with error messages
Quote:

[2011-06-28 15:26:42.632] JMX connector <> Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.
NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Cannot modify this registry]


I don't think Virgo is doing anything to provoke this exception.
Quote:

My experiment approved that virgo kernel could be a versatile microkernel for applications employing transport protocol like activemq.

Should Virgo has a release as "Virgo Message Broker" based on activemq?

Potentially, but the current set of committers have no particular ActiveMQ skills and there are other queue managers that others might want to run under Virgo (IBM MQ Series, RabbitMQ, ...), so unless someone steps forward with the skills and drive to construct such a release, it probably won't happen.

A step in that direction would be for you to write up your experience for the benefit of others, perhaps in one or more blog posts.
Previous Topic:Logging in Virgo 3.0.0.M05
Next Topic:Logging the bundle name
Goto Forum:
  


Current Time: Fri Apr 19 18:28:52 GMT 2024

Powered by FUDForum. Page generated in 0.03359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top