Hi,

with some few code you should be able to do so,

do a bean with as property (setters at least) all the info needed

and define several openejb services/resources and it should do the trick:

typically it can be in pseudo code:

MyMBeanStarter {
name
realMbeanClass
someOtherAttribute

// setters

create() {
 // create and register the mbean
}
}

it can push the objectname to a singleton which will observes (cdi) the
beforeshutdown event to unregister mbeans

to start it:
<Service class-name="MyBean">
name = ...
...
</Service>

here the idea ;)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/22 Gabriel Ozeas <[email protected]>

> This is a config xml file used to register a MBean TreeCache instance.
>
> <mbean code="org.jboss.cache.TreeCache"
> name="application-x.configuration:service=ConfigurationsCache">
>     <attribute
>
> name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
>
>     <!--
>             Node locking scheme : PESSIMISTIC (default),OPTIMISTIC
>     -->
>     <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
>     ....
> </mbean>
>
> Romain, do you think that is possible to create MBeans via config file like
> this way?
> Really thanks.
>
>
>
>
> 2012/10/22 Romain Manni-Bucau <[email protected]>
>
> > Hi gabriel,
> >
> > can you share (at least the idea of) the conf you want OpenEJB handle
> > please (i'm not so familiar with JBoss)?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> >
> > 2012/10/22 Gabriel Ozeas <[email protected]>
> >
> > > Hello guys,
> > >
> > > Can anyone help me? In production, my applications runs in JBoss. But
> we
> > > are trying to include OpenEJB in development process.
> > > It is something difficult here, because the application uses some jboss
> > > resources, and not from the JEE specification.
> > > But what i'm in trouble now, is that i need to integrate JBoss Cache
> with
> > > OpenEJB.
> > >
> > > In JBoss, the JBoss Cache is configured using MBeans. How can i declare
> > > MBeans in OpenEJB configuration file?
> > >
> > > Thanks a lot.
> > >
> >
>

Reply via email to