[jboss-dev] How to bind object to JNDI from jmx-jboss-beans.xml
Scott Marlow
smarlow at redhat.com
Thu Mar 25 14:58:50 EDT 2010
Nothing HA, just trying to avoid weird RMI GC behaviour when trying to
let RMIConnectorServer do the bind (http://pastebin.com/JRDnUz3j).
Maybe I should update my jdk. :)
http://pastebin.com/YNBbHHFu is the jmx-jboss-beans.xml that gets the
"java.rmi.NoSuchObjectException: no such object in table".
Either binding the JMXServiceURL or JMXConnector (stub) would help
twiddle connect and also align with recommendations from the JSR-160
spec (section 6.2.1).
On Thu, 2010-03-25 at 13:26 -0500, Jason T. Greene wrote:
> Or you could just create a simple bean to represent the remote JMX
> service, and have it construct the remote JMX objects and jndi entries
> as part of start/stop.
>
> Although this makes me wonder what cases we have where you need to pull
> a remote jmx reference from jndi? If this is locally running code the
> current mbeanserver is all you need. So I am guessing there is some
> ha-jndi case you are trying to support?
>
> David M. Lloyd wrote:
> > Also maybe the @org.jboss.aop.microcontainer.aspects.jndi.JndiBinding
> > annotation might do this another way?
> >
> > Either way it would be nicer if you could do:
> >
> > <jndi-binding bean="TheBean" name="the/name/in/JNDI"/>
> >
> > or something like that.
> >
> > On 03/25/2010 01:12 PM, Ron Sigal wrote:
> >> jboss-as-testsuite/src/main/org/jboss/test/naming/restart/ObjectBinder.java
> >> binds a particular kind of object into jndi. See
> >> jboss-as-testsuite/src/resources/naming/restart/naming-restart-jboss-beans.xml:
> >>
> >>
> >> <bean name="RestartObjectBinder"
> >> class="org.jboss.test.naming.restart.ObjectBinder">
> >> <property name="namingService"><inject
> >> bean="RestartNamingService"/></property>
> >> </bean>
> >>
> >> It could be generalized.
> >>
> >> -Ron
> >>
> >> Scott Marlow wrote:
> >>> I'm working on adding a remote JMXConnector to AS trunk via a new
> >>> jmx-jboss-beans.xml (see http://pastebin.com/JjsiRrh9). I would like to
> >>> bind a string representation of the JMX service URL to JNDI. Any
> >>> pointers to doing the bind (from a jboss-beans.xml) are welcome.
> >>>
> >>> If not, I will hack through it but wanted to check first. :)
> >>>
> >>> Thanks,
> >>> Scott
> >>>
> >>> _______________________________________________
> >>> jboss-development mailing list
> >>> jboss-development at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/jboss-development
> >>>
> >> _______________________________________________
> >> jboss-development mailing list
> >> jboss-development at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/jboss-development
> >
>
>
More information about the jboss-development
mailing list