[Microcontainer] - JMX Decorator for POJOs - suggestion
by dward@redhat.com
In regard to this JIRA issue:
http://jira.jboss.com/jira/browse/JBMICROCONT-71
... I have a suggestion:
I think that exposing a microcontainer POJO as an MBean, and optionally also making it available in JNDI, would be a farily common thing to do. Thus, I think an ultra-easy way of configuring a POJO to expose itself as so should be available. May I suggest adding 2 new optional attributes to the <bean ...> element? jmx-name and jndi-name? Simply adding them to the bean tag will go ahead and dynamically expose it as an mbean or add it to JNDI, respectively? Example:
<bean
name="Bar"
jmx-name="jboss.foo:service=Bar"
jndi-name="java:/foo/Bar"
class="com.foo.Bar"/>
I think this would be easier for people than a sub <annotation ...> element (I remember seeing something like this somewhere for jndi binding in the microcontainer). For JMX, I like it better than a @JMX annotation on the bean also (I saw that someplace too). However, I understand that is more of a matter of opinion/taste...
If this has already been suggested then shame on me. :)
Thoughts?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991442#3991442
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991442
18 years, 1 month
[EJB/JBoss] - Can't download the ejb home stub using iiop instead of jnp
by wong94538@yahoo.com
I successfully deployed a session bean with both iiop and jnp invoker. In the client, with using jnp, everythings work fine but when using iiop, PortableRemoteObject.narrow() return a null object. Once I put the stub class in the client class path, it works fine. Seems the dynamic downloading of the stub isn't working for iiop.
Here's the client code:
env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(InitialContext.PROVIDER_URL, "corbaloc::lap-ww:3528/JBoss/Naming/root");
InitialContext context = new InitialContext(env);
Object staHomeObj = context.lookup ("myTest/Status");
StatusHome staHome = (StatusHome)javax.rmi.PortableRemoteObject.narrow( (org.omg.CORBA.Object)staHomeObj, StatusHome.class);
I have the following jar included in the client class path:
$JBOSS_HOMEclient/logkit.jar"
"$JBOSSLIB/jacorb.jar"
"$JBOSSLIB/commons-logging.jar"
"$JBOSSLIB/avalon-framework.jar"
With the following client.policy:
grant {
permission java.security.AllPermission;
};
I also inspected the staHomeObject ior string using jacorb's dior, which is matched to the one when jboss startup with the following java code base:
http://lap-ww:8083/WebCL[myTest/Status]/
Is anything I have been missed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991441#3991441
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991441
18 years, 1 month