[jboss-user] [JBoss Portal] - How to get access to javax.jcr.Repository

bgiddins do-not-reply at jboss.com
Sun Nov 23 04:35:33 EST 2008


I've been writing some portlets using the CMS interface to access Jackrabbit. I've been using the following to date to get access to the CMS:

         MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
  | 
  |          cms = (CMS) MBeanProxy.get(CMS.class, new ObjectName("portal:service=CMS"), mbeanServer);

This works fine, and I can retrieve content etc using code like:

      Command getContentCMD = cms.getCommandFactory().createContentGetCommand(dirPath, version, locale);
  | 
  |       ContentImpl contentImpl = (ContentImpl) cms.execute(getContentCMD);

I've run into some limitations of what I can achieve through the CMS interface - I would like to start using the JCRCMS implementation, or even get avax.jcr.Repository - which looks like it can be done from JCRCMS. Has anyone got some code to show me how to get either of these objects?

I'm using JBoss Portal 2.7.0.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191530#4191530

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191530



More information about the jboss-user mailing list