Re: [C2.0b2] - ComponentManager

2001-10-04 Thread Adrian Geissel

Hi,

Getting considerably further now with integrating my database access
library - however, next hurdle.

It appears that the pool is not initialized - what need I do to make this
happen? According to the log-file, the
dataasource ComponentHandler has been initialized and added to the
ComponentManager, but there is no mention
of the actual connection pool.

Again, any help is welcomed.
Thanks
Adrian

== cocoon.xconf extract ==


  

false

org.postgresql.driver.JDBCDriver
jdbc:postgesql://193.120.120.11/zdam_test
sql
garfield
  

== cocoon.xconf extract ==

== log-file extract ==

DEBUG   10022   [cocoon  ] (main): ComponentFactory creating new instance of
org.apache.avalon.excalibur.datasource.JdbcDataSource.
DEBUG   10022   [cocoon  ] (main): ComponentHandler initialized for:
org.apache.avalon.excalibur.datasource.JdbcDataSource
DEBUG   10022   [cocoon  ] (main): Adding
org.apache.avalon.excalibur.datasource.JdbcDataSource for zdam
DEBUG   10022   [cocoon  ] (main): ComponentHandler initialized for:
org.apache.avalon.excalibur.component.ExcaliburComponentSelector



ERROR   10022   [cocoon  ] (Thread-35): Could not return Connection
java.lang.IllegalStateException: You cannot get a Poolable before the pool
is initialized
 at org.apache.avalon.excalibur.pool.DefaultPool.get(DefaultPool.java:107)
 at
org.apache.avalon.excalibur.datasource.JdbcConnectionPool.get(JdbcConnection
Pool.java:70)
 at
org.apache.avalon.excalibur.datasource.JdbcDataSource.getConnection(JdbcData
Source.java:112)
 at
com.zenark.zsql.ConnectionFactory.getConnection(ConnectionFactory.java:69)
 at
com.zenark.zdam.db.ZsqlTableProxy_user_data.load(ZsqlTableProxy_user_data.ja
va:67)
 at
com.zenark.zdam.cocoon.action.DoUserLoginAction.act(DoUserLoginAction.java:8
3)
 at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN177(sitemap_xmap.java:1272)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1007)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:953)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:423)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:489)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)
== log-file extract ==



-
Please check that your question has not already been answered in the
FAQ before posting. 

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




Re: [C2.0b2] - ComponentManager

2001-10-04 Thread Adrian Geissel


- Original Message -
From: Berin Loritsch <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 3:57 PM
Subject: Re: [C2.0b2] - ComponentManager


> 
>   
> 
> false
> 
> org.postgresql.driver.JDBCDriver
> jdbc:postgesql://193.120.120.11/zdam_test
> sql
> garfield
>   
> 
>

That worked - now the connection seems to be available through the
ComponentManager
Thanks for your help,
Adrian




-
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]>




Re: [C2.0b2] - ComponentManager

2001-10-04 Thread Berin Loritsch

Adrian Geissel wrote:
> 
> Hi,
> 
> We looking at migrating our application from C1.8.2 over to C2.
> 
> In C1.x, we used Turbine for connection pooling, and we need to move over to
> the Avalon CoponentManager framework.
> 
> There was one real advantage in using Turbine, where there is a
> singleton-access to the connection-pool, thereby allowing it to be easily
> integrated with external code. Basically, we have a tried-and-tested
> database access library that takes utilises an internal ConnectionFactory
> that calls into Turbine for its connections.
> 
> I have not found a similar factory method for accessing either the Cocoon
> object, its ComponentManager, or any managed components. Have I missed
> something, or is there a preferred approach? A non-singleton access to the
> connection pool will require a potentially reasonable coding change.
> 
> Also, having a little difficulty in configuring a pooled connection to
> PostgreSQL - I've followed the instructions in the 'datasources' document,
> but the ComponentManager complains that the named component cannot be found.
> I've included the relevant bits from both cocoon.xconf, the calling code
> (from within an Action) and log-file extract.
> 
> Any and all help will be greatly appreciated,
> Many thanks
> Adrian
> 
> == cocoon.xconf extract ==
>   
> 
>   


  

false

org.postgresql.driver.JDBCDriver
jdbc:postgesql://193.120.120.11/zdam_test
sql
garfield
  


> 
> 
>name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
>class="org.apache.cocoon.CocoonComponentSelector">
> 
>  class="org.apache.avalon.util.datasource.JdbcDataSource">
>   
>   false
>   jdbc:postgresql://193.120.120.11/zdam_test
>   sql
>   garfield
> 
>   
> 
> 
> 
> == cocoon.xconf extract ==
> 
> == calling code extract ==
> 
> ComponentSelector selector = (ComponentSelector)
> manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
> ConnectionFactory.dataSource = (DataSourceComponent)
> selector.select("zdam");
> 
> == calling code extract ==
> 
> == log-file extract ==
> org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
> ComponentSelector could not find the component for hint: zdam
>  at
> org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
> liburComponentSelector.java:239)
>  at
> com.zenark.zdam.cocoon.action.DoUserLoginAction.compose(DoUserLoginAction.ja
> va:102)
>  at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
> faultComponentFactory.java:98)
>  at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
> ThreadSafeComponentHandler.java:81)
>  at
> org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponen
> t(ExcaliburComponentSelector.java:383)
>  at
> org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.jav
> a:231)
>  at
> org.apache.cocoon.www.sitemap_xmap$Configurer.configActions(sitemap_xmap.jav
> a:929)
>  at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:276)
>  at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
> faultComponentFactory.java:108)
>  at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
> ThreadSafeComponentHandler.java:81)
>  at
> org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
> or(GeneratorSelector.java:118)
>  at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addComp
> iledComponent(ProgramGeneratorImpl.java:292)
>  at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
> eResource(ProgramGeneratorImpl.java:273)
>  at
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
> ogramGeneratorImpl.java:179)
>  at org.apache.cocoon.sitemap.Handler.run(Handler.java:204)
>  at java.lang.Thread.run(Thread.java:484)
> 
> == log-file extract ==
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

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




[C2.0b2] - ComponentManager

2001-10-04 Thread Adrian Geissel

Hi,

We looking at migrating our application from C1.8.2 over to C2.

In C1.x, we used Turbine for connection pooling, and we need to move over to
the Avalon CoponentManager framework.

There was one real advantage in using Turbine, where there is a
singleton-access to the connection-pool, thereby allowing it to be easily
integrated with external code. Basically, we have a tried-and-tested
database access library that takes utilises an internal ConnectionFactory
that calls into Turbine for its connections.

I have not found a similar factory method for accessing either the Cocoon
object, its ComponentManager, or any managed components. Have I missed
something, or is there a preferred approach? A non-singleton access to the
connection pool will require a potentially reasonable coding change.

Also, having a little difficulty in configuring a pooled connection to
PostgreSQL - I've followed the instructions in the 'datasources' document,
but the ComponentManager complains that the named component cannot be found.
I've included the relevant bits from both cocoon.xconf, the calling code
(from within an Action) and log-file extract.

Any and all help will be greatly appreciated,
Many thanks
Adrian


== cocoon.xconf extract ==
  

  


  


  
  false
  jdbc:postgresql://193.120.120.11/zdam_test
  sql
  garfield

  



== cocoon.xconf extract ==

== calling code extract ==

ComponentSelector selector = (ComponentSelector)
manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
ConnectionFactory.dataSource = (DataSourceComponent)
selector.select("zdam");

== calling code extract ==

== log-file extract ==
org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector could not find the component for hint: zdam
 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
liburComponentSelector.java:239)
 at
com.zenark.zdam.cocoon.action.DoUserLoginAction.compose(DoUserLoginAction.ja
va:102)
 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:98)
 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
ThreadSafeComponentHandler.java:81)
 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponen
t(ExcaliburComponentSelector.java:383)
 at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.jav
a:231)
 at
org.apache.cocoon.www.sitemap_xmap$Configurer.configActions(sitemap_xmap.jav
a:929)
 at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:276)
 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:108)
 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
ThreadSafeComponentHandler.java:81)
 at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
or(GeneratorSelector.java:118)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addComp
iledComponent(ProgramGeneratorImpl.java:292)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:273)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:179)
 at org.apache.cocoon.sitemap.Handler.run(Handler.java:204)
 at java.lang.Thread.run(Thread.java:484)

== log-file extract ==



-
Please check that your question has not already been answered in the
FAQ before posting. 

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