You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marius Seiceanu <ma...@sec.co.ro> on 2003/10/24 16:48:12 UTC

DBCP:

Hello,

    On  http://jakarta.apache.org/struts/faqs/database.html  I found out 
how to use BasicDataSource.
    The problem is that in some classes of my application (under Tomcat 
context) which is using Struts i don't have access to request, so i 
can't use:
          dataSource = getDataSource(request);

    Is there any possibility to configure struts to put automaticaly the 
BasicDataSource instances on a JNDI context, so I can get them later, 
from classes under the same Tomcat context?

Thank you,
    Marius Seiceanu.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: DBCP:

Posted by Marius Seiceanu <ma...@sec.co.ro>.
The problem is I don't have access to server.xml to create my resource 
there.
I can modify only files under my context, nothing up :(

Marius Seiceanu.

David Graham wrote:

>You shouldn't configure a DataSource in Struts.  Instead set it up in
>Tomcat and look up the DataSource with JNDI.  Here's a howto for Tomcat:
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
>
>David
>
>
>--- Marius Seiceanu <ma...@sec.co.ro> wrote:
>  
>
>>Hello,
>>
>>    On  http://jakarta.apache.org/struts/faqs/database.html  I found out
>>
>>how to use BasicDataSource.
>>    The problem is that in some classes of my application (under Tomcat 
>>context) which is using Struts i don't have access to request, so i 
>>can't use:
>>          dataSource = getDataSource(request);
>>
>>    Is there any possibility to configure struts to put automaticaly the
>>
>>BasicDataSource instances on a JNDI context, so I can get them later, 
>>from classes under the same Tomcat context?
>>
>>Thank you,
>>    Marius Seiceanu.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search
>http://shopping.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: DBCP:

Posted by David Graham <gr...@yahoo.com>.
You shouldn't configure a DataSource in Struts.  Instead set it up in
Tomcat and look up the DataSource with JNDI.  Here's a howto for Tomcat:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

David


--- Marius Seiceanu <ma...@sec.co.ro> wrote:
> Hello,
> 
>     On  http://jakarta.apache.org/struts/faqs/database.html  I found out
> 
> how to use BasicDataSource.
>     The problem is that in some classes of my application (under Tomcat 
> context) which is using Struts i don't have access to request, so i 
> can't use:
>           dataSource = getDataSource(request);
> 
>     Is there any possibility to configure struts to put automaticaly the
> 
> BasicDataSource instances on a JNDI context, so I can get them later, 
> from classes under the same Tomcat context?
> 
> Thank you,
>     Marius Seiceanu.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org