-
1. Re: 2 questions concerning CMS
theute Feb 2, 2007 5:40 AM (in response to tbeuleke)The CMS Service is a MBean service, it is also registered in JNDI under the name "java:portal/CMS"
You can access it like this:Context ctx = new InitialContext(); CMS cmsService = (CMS)ctx.lookup("java:portal/CMS");
This code should work for 2.6, the interface and JNDI name may be different in 2.2 though. -
2. Re: 2 questions concerning CMS
tbeuleke Feb 2, 2007 6:09 AM (in response to tbeuleke)Thanks for your fast answer.
The interface name is correct for 2.2 but it looks like the JNDI name is not.javax.naming.NameNotFoundException: CMS not bound
Well, i have no idea how to find out under what name it is registered, if it is at all... -
3. Re: 2 questions concerning CMS
antoine_h Feb 2, 2007 8:57 AM (in response to tbeuleke)Hello,
the cms service, as an mbean, is named : name="portal:service=CMS"
the descriptor of this service is in :
deploy/jboss-portal.sar/portal-cms.sar/META-INF/jboss-service.xml
with jbp 2.4, I can't see the jndi declaration.
so I guess there was not for 2.2 either.
may be you can add it to your CMS Service of 2.2 ?
may be with the example of the code and descriptor of 2.6 ?
(which is a good idea to have it...)
or look at how to get a jmx service from your web app, without jndi.
There's some wiki about this...
with MBeanServer
see :
http://wiki.jboss.org/wiki/Wiki.jsp?page=MBeanServer
and
http://wiki.jboss.org/wiki/Wiki.jsp?page=FindMBeanServer