Hi,

I'm searching for a way to access the Jackrabbit-Repository on
JBoss-Portal-Server. In recent coding-examples for the JCR-API and reading
the How-To-Articles on the Jackrabbit-Wiki it seems to get a repository
instance from JNDI like that:

Context ctx = new InitialContext();
Repository repo = (Repository) ctx.lookup("java:/jcr/local");

1) How to access jackrabbit on JBoss-Portal with the JCR API?

2) Do I have to install the RAR and creating the jcr-ds.xml description even
if Jackrabbit comes along with the portal from scratch (deployed as SAR with
a jboss-service.xml)?

3) What is the correct JNDI-Name to access Jackrabbit? Searching the
JNDI-Tree, it seems, that there is no JCR-Source bound.

4) Where to find and configure the workspace.xml and repository.xml which
are described at Jackrabbit home-site.


Currently I want to access the repository with no changes to the
configuration from a session-bean liek this...

@Resource(mappedName="java:jcr/local", 
                                type=javax.jcr.Repository.class, 
                        
authenticationType=javax.annotation.Resource.AuthenticationType.CONTAINER)
Repository repository;


... resulting in the following exception ....


Caused by: java.lang.NullPointerException
        at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:49)
        at
org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:87)
        at
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:112)
        at
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:107)
        at
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:65)

I'm using JBoss 2.7.0.B1 with JBoss 4.2.3 and MySQL 5.

Thanks in advance
Gamba 



-- 
View this message in context: 
http://www.nabble.com/Jackrabbit-access-on-Jboss-Portal-tp19450621p19450621.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to