You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Stephen More (JIRA)" <ji...@apache.org> on 2007/08/01 21:55:53 UTC
[jira] Created: (JCR-1048) JNDIDatabaseFileSystem was not woring in
tomcat webapp
JNDIDatabaseFileSystem was not woring in tomcat webapp
------------------------------------------------------
Key: JCR-1048
URL: https://issues.apache.org/jira/browse/JCR-1048
Project: Jackrabbit
Issue Type: Bug
Components: core
Affects Versions: 1.3
Reporter: Stephen More
The new method should look like this:
protected Connection getConnection() throws NamingException, SQLException {
InitialContext ic = new InitialContext();
DataSource dataSource = null;
try
{
dataSource = (DataSource) ic.lookup(dataSourceLocation);
}
catch( javax.naming.NameNotFoundException e )
{
// Now lets try it this way
javax.naming.Context envCtx = (javax.naming.Context)ic.lookup( "java:comp/env" );
dataSource = (DataSource) envCtx.lookup(dataSourceLocation);
}
return dataSource.getConnection();
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1048) JNDIDatabaseFileSystem was not woring
in tomcat webapp
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518425 ]
Jukka Zitting commented on JCR-1048:
------------------------------------
Wouldn't a more appropriate fix be to simply change your repository configuration to include the "java:comp/env" prefix?
> JNDIDatabaseFileSystem was not woring in tomcat webapp
> ------------------------------------------------------
>
> Key: JCR-1048
> URL: https://issues.apache.org/jira/browse/JCR-1048
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.3
> Reporter: Stephen More
>
> The new method should look like this:
> protected Connection getConnection() throws NamingException, SQLException {
> InitialContext ic = new InitialContext();
> DataSource dataSource = null;
> try
> {
> dataSource = (DataSource) ic.lookup(dataSourceLocation);
> }
> catch( javax.naming.NameNotFoundException e )
> {
> // Now lets try it this way
> javax.naming.Context envCtx = (javax.naming.Context)ic.lookup( "java:comp/env" );
> dataSource = (DataSource) envCtx.lookup(dataSourceLocation);
> }
> return dataSource.getConnection();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-1048) JNDIDatabaseFileSystem was not woring
in tomcat webapp
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved JCR-1048.
--------------------------------
Resolution: Won't Fix
Assignee: Jukka Zitting
Resolving as Won't Fix based on the above rationale.
> JNDIDatabaseFileSystem was not woring in tomcat webapp
> ------------------------------------------------------
>
> Key: JCR-1048
> URL: https://issues.apache.org/jira/browse/JCR-1048
> Project: Jackrabbit
> Issue Type: Bug
> Components: core
> Affects Versions: 1.3
> Reporter: Stephen More
> Assignee: Jukka Zitting
>
> The new method should look like this:
> protected Connection getConnection() throws NamingException, SQLException {
> InitialContext ic = new InitialContext();
> DataSource dataSource = null;
> try
> {
> dataSource = (DataSource) ic.lookup(dataSourceLocation);
> }
> catch( javax.naming.NameNotFoundException e )
> {
> // Now lets try it this way
> javax.naming.Context envCtx = (javax.naming.Context)ic.lookup( "java:comp/env" );
> dataSource = (DataSource) envCtx.lookup(dataSourceLocation);
> }
> return dataSource.getConnection();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.