[Concern-users] jmx integration
Brought to you by:
hengels,
leonchiver
|
From: Holger E. <he...@me...> - 2004-08-16 08:03:40
|
Hi,
I did the jmx integration this weekend. Controllers can now be deployed as
MBeans. All controller methods are exposed and can thus be called from within a
jmx console. For JBoss, there is a RMI proxy available. It is currently used by
the (command line) client.
For JBoss create a sar with the following layout:
- engagement.sar
|-- META-INF
| |-- concern-process.xml
| `-- jboss-service.xml
`-- org
`-- concern
`-- test
`-- engagement
`-- engagement
|-- AdvertisedExternally.class
|-- AdvertisedInternally.class
|-- AllApplicationsDestroyed.class
|-- Close.class
|-- Closed.class
|-- DestroyApplicationIn.class
|-- DestroyApplicationOut.class
|-- EngagementLoader.class
|-- ExternalAdvertising.class
|-- InternalAdvertising.class
`-- TakeUpJobApplication.class
The jboss-service.xml might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.concern.controller.jmx.ControllerService"
name="jboss.concern:name=EngagementController">
<depends>jboss:service=TransactionManager</depends>
<depends>jboss.jca:service=LocalTxCM,name=DefaultDS</depends>
<attribute name="JndiName">java:controller/Engagement</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute
name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="Datasource">java:DefaultDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute>
<attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute>
<attribute name="ShowSql">true</attribute>
<attribute name="HbmToDdlAuto">create</attribute>
</mbean>
</server>
This is:
o a dependency on the TransactionManager and the DataSource
o a JNDI name
o hibernate configuration
I will add jmx deployment on jboss (and maybe tomcat) by option for the
j2ee-demo build scripts.
Holger Engels
(Dipl Inf Med)
--
Consultant, Architect, Developer
Mobile: +49 176 20119752
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
|