cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Benda" <Martin.Be...@utanet.at>
Subject C2: Connection Pool
Date Thu, 09 Aug 2001 15:35:56 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message