Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 42942 invoked from network); 4 Jan 2006 17:04:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jan 2006 17:04:22 -0000 Received: (qmail 1960 invoked by uid 500); 4 Jan 2006 17:04:21 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 1949 invoked by uid 99); 4 Jan 2006 17:04:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 09:04:21 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.96.176.5] (HELO email.ams-engineering.com) (194.96.176.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2006 09:04:19 -0800 content-class: urn:content-classes:message Subject: EJB-Access to Repository MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Date: Wed, 4 Jan 2006 18:04:06 +0100 Content-Transfer-Encoding: quoted-printable Message-ID: X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: EJB-Access to Repository Thread-Index: AcYRUN8wBQV8EEhhSomD5dgAajr8+w== From: =?iso-8859-1?Q?Humer_G=FCnther?= To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! I want to use the JCR-Repository from a Session Bean.=20 How do I access it? What is the best way to deploy the Repository? I tried to deploy the rar (contrib/jca) which failed.=20 So I moved on to deploy the WAR. The Repository is bound [1] but the lookup fails with a = NameNotFoundException.=20 How do I lookup the Repository? I tried with [2] the preferred lookup = and with a simple InitialContext() without any additional properties. = The two Methods fail with a NameNotFoundException.=20 I am using Jboss 4.0.3 SP1 G=FCnther Humer [1] 17:51:17,367 INFO [STDOUT] 04.01.2006 17:51:17 *INFO * = RepositoryStartupServlet: adding property to JNDI environment: = java.naming.provider.url=3Dhttp://www.apache.org/jackrabbit = (RepositoryStartupServlet.java, line 300) 17:51:17,367 INFO [STDOUT] 04.01.2006 17:51:17 *INFO * = RepositoryStartupServlet: adding property to JNDI environment: = java.naming.factory.initial=3Dorg.apache.jackrabbit.core.jndi.provider.Du= mmyInitialContextFactory (RepositoryStartupServlet.java, line 300) 17:51:17,457 INFO [STDOUT] 04.01.2006 17:51:17 *INFO * = RepositoryStartupServlet: Repository bound to JNDI with name: = jackrabbit.repository (RepositoryStartupServlet.java, line 307) 17:51:17,457 INFO [STDOUT] 04.01.2006 17:51:17 *INFO * = RepositoryStartupServlet: RepositoryStartupServlet initialized. = (RepositoryStartupServlet.java, line 186) [2] Hashtable env =3D new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, = "org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory"); env.put(Context.PROVIDER_URL, "localhost"); InitialContext ctx =3D new InitialContext(env); Repository r =3D (Repository)ctx.lookup("repo");