Try looking at the login_xsp.java file created by cocoon. It should be
located inside the working directory for your application server. For
tomcat, that would be somewhere inside $TOMCAT_HOME/work/localhost%2Fcocoon
(for stuff in the cocoon directory).  It's possible that the problem isn't
the connection pool code, but a nearby typo.


Karl Hallowell                 [EMAIL PROTECTED]

> -----Original Message-----
> From: Martin Benda [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 09, 2001 8:36 AM
> To: [EMAIL PROTECTED]
> Subject: C2: Connection Pool
> 
> 
> How to access the connection pool out of java? When I try to
> access my connection pool with the help of esql it works fine, but
> when I try to access the pool out of java I always get an exception.
> 
> <xsp:logic>
>   private DataSourceComponent datasource;
> 
>   public void compose(ComponentManager manager) {
>        ComponentSelector selector =
> (ComponentSelector)manager.lookup(Roles.DB_CONNECTION);
>        this.datasource =
> (DataSourceComponent)selector.select("[DBpoolName]");
>   }
> 
>   Connection con;
> 
>   try {
>     con = datasource.getConnection();
>   ...
> </xsp:logic>
> 
> I try to access the connection poll like discribed on the 
> website of C2, but
> I always get an
> expception
>     org.apache.cocoon.components.language.LanguageException: 
> Error compiling
> login_xsp:
>     Line 192, column 35:  '}' expected.
>     Line 194, column 4:  Statement expected.
>     Line 206, column 4:  Type expected.
> 
> How can I access the pool the right way?
> 
> I am using Cocoon2b2 and tomcat 3.2.3
> 
> thanks,
> Martin
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to