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

dkrieger do-not-reply at jboss.com
Thu Nov 27 12:05:59 EST 2008


trouble is your login() statement is more than likely logging in with anonymous access (read-only only).  You'll need to pass credentials to the login statement:


  | Repository repository = jack.getRepository();        
  | //Anonymous login        
  | //Session session = repository.login();
  | 
  | //User authenticated login
  | Session session = repository.login(new SimpleCredentials("username", "password".toCharArray()));
  | 

I'm not familiar with the Jackrabbit configuration for JBoss Portal CMS so I'm not sure what the username and password should be for you to get write access on the repository.  But this should at least get you closer.

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

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



More information about the jboss-user mailing list