18 Jul 17:47
[magnolia-dev] [JIRA] Created: (MAGNOLIA-2278) Accssing the magnolia Repositroy
From: JIRA (on behalf of Krishna LVR <dev-list@...>
Subject: [magnolia-dev] [JIRA] Created: (MAGNOLIA-2278) Accssing the magnolia Repositroy
Newsgroups: gmane.comp.cms.magnolia.devel
Date: 2008-07-18 15:51:13 GMT
Subject: [magnolia-dev] [JIRA] Created: (MAGNOLIA-2278) Accssing the magnolia Repositroy
Newsgroups: gmane.comp.cms.magnolia.devel
Date: 2008-07-18 15:51:13 GMT
Accssing the magnolia Repositroy
--------------------------------
Key: MAGNOLIA-2278
URL: http://jira.magnolia.info/browse/MAGNOLIA-2278
Project: Magnolia
Issue Type: Task
Affects Versions: 3.5.6
Reporter: Krishna LVR
Assignee: Boris Kraft
Hi
i am facing the problem to access the repository of magnoliawhile integrating the magnolia with other web
application the following is the code which i have written to acess the repository can please suggest the
right way to access the repositroy to other web application
String configFile = "/home/opt/java/apache-tomcat-5.5.26/webapps/magnolia/WEB-INF/config/repo-conf/jackrabbit-derby-search.xml";
//modified repHomeDir in repository.xml & magnolia.properties
String repHomeDir = "/home/msr/opt/repositories/magnolia";
//modified ProviderURL in repository.xml
env.put(Context.PROVIDER_URL, "http://localhost:8080/magnolia/jcr");
Context ctx = new InitialContext(env);
RegistryHelper.registerRepository(ctx, "magnolia",
configFile,
repHomeDir,
true);
Repository r = (Repository) ctx.lookup("magnolia");
SimpleCredentials credentials = new SimpleCredentials(
"superuser", "superuser".toCharArray());
Session session = r.login(credentials);
(Continue reading)
RSS Feed