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

JohnnyTheHun do-not-reply at jboss.com
Thu Nov 27 07:34:33 EST 2008


I was looking for the same thing, luckily I found it via the JMX console:


  | InitialContext ctx = new InitialContext();
  |         org.jboss.portal.cms.impl.jcr.JCRCMS jack = (org.jboss.portal.cms.impl.jcr.JCRCMS)ctx.lookup("java:portal/CMS");
  |         
  |         Repository repository = jack.getRepository();
  |         
  |         Session session = repository.login();
  | 

My only problem is, that with the above mentioned login usage I always get a 
javax.jcr.AccessDeniedException: /default: not allowed to modify item
if I try to modify either the root or the "default" node.

Can anyone help me on that?

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

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



More information about the jboss-user mailing list