You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by umashanker <um...@rics.co.jp> on 2001/08/22 05:14:02 UTC

how to set configration data for DataSource?

I'm writing demo for DataSource block, which will get me JdbcConnection from
the pool.
I'm using
"org.apache.avalon.cornerstone.services.datasource.DataSourceSelector" to
get the DataSourceComponent from the excalibur package.

But i'm finding it difficult to set the configration data for this block.
Phoenix is throws exception at "DefaultSarDeployer".

I have gone through "Developing with Avalon" developer guide and Phoenix
assemblers guide. still i'm not getting how this has to be done.Can any one
please give me the sample configration data for the DataSource block. And
explain how it will work?

regards,

---------------
"Eung-ju Park" wrote:-

> See org.apache.avalon.cornerstone.services.datasource.DataSourceSelector
and
> org.apache.avalon.cornerstone.blocks.datasource.DefaultDataSourceSelector.
> DataSourceSelector is ComponentSelector for
> org.apache.avalon.excalibur.datasource.DataSourceComponent.

----------
"umashanker"  wrote:
> > I am new to Avalon,  and going through excalibur components and
> cornerstone
> > blocks.
> >
> > The demos which are given for phoenix container is working fine.
> >
> > All the service/blocks are using the ComponentManager-  to load the
> > components.
> >
> > Is there any demo service/block which uses ComponentSelector?( for the
> > DataSource block)
> >
> > if NO , how to create it?
> >
> > regards,
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>




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


Re: how to set configration data for DataSource?

Posted by Peter Donald <do...@apache.org>.
On Wed, 22 Aug 2001 13:14, umashanker wrote:
> I'm writing demo for DataSource block, which will get me JdbcConnection
> from the pool.
> I'm using
> "org.apache.avalon.cornerstone.services.datasource.DataSourceSelector" to
> get the DataSourceComponent from the excalibur package.
>
> But i'm finding it difficult to set the configration data for this block.
> Phoenix is throws exception at "DefaultSarDeployer".

Could you tell us what the exception is? It would be easier to diagnose the 
problem that way.

> I have gone through "Developing with Avalon" developer guide and Phoenix
> assemblers guide. still i'm not getting how this has to be done.Can any one
> please give me the sample configration data for the DataSource block. And
> explain how it will work?

I don't actually use it at this stage. Eung-ju could you describe it ... or 
even better javadoc it ? ;)

-- 
Cheers,

Pete

*-----------------------------------------------------*
* "Faced with the choice between changing one's mind, *
* and proving that there is no need to do so - almost *
* everyone gets busy on the proof."                   *
*              - John Kenneth Galbraith               *
*-----------------------------------------------------*

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


Re: how to set configration data for DataSource?

Posted by Eung-ju Park <co...@isoft.co.kr>.
Try like this:

assembly.xml
--------------
...
<block
class="org.apache.avalon.cornerstone.blocks.DefaultDataSourceSelector"
  name="datasources" />

config.xml
----------
<datasources>
  <data-sources>
    <data-source name="default1"
class="org.apache.avalon.excalibur.datasource.JdbcDataSource">
       <!-- configuration for JdbcDataSource -->
    </data-source>
    <data-source name="default2"
class="org.apache.avalon.excalibur.datasource.J2EEDataSource">
       <!-- configuration for J2EEDataSource -->
    </data-source>
    ...
  </data-sources>
</datasources>


----- Original Message -----
From: "umashanker" <um...@rics.co.jp>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Wednesday, August 22, 2001 12:14 PM
Subject: how to set configration data for DataSource?


> I'm writing demo for DataSource block, which will get me JdbcConnection
from
> the pool.
> I'm using
> "org.apache.avalon.cornerstone.services.datasource.DataSourceSelector" to
> get the DataSourceComponent from the excalibur package.
>
> But i'm finding it difficult to set the configration data for this block.
> Phoenix is throws exception at "DefaultSarDeployer".
>
> I have gone through "Developing with Avalon" developer guide and Phoenix
> assemblers guide. still i'm not getting how this has to be done.Can any
one
> please give me the sample configration data for the DataSource block. And
> explain how it will work?
>
> regards,
>
> ---------------
> "Eung-ju Park" wrote:-
>
> > See org.apache.avalon.cornerstone.services.datasource.DataSourceSelector
> and
> >
org.apache.avalon.cornerstone.blocks.datasource.DefaultDataSourceSelector.
> > DataSourceSelector is ComponentSelector for
> > org.apache.avalon.excalibur.datasource.DataSourceComponent.
>
> ----------
> "umashanker"  wrote:
> > > I am new to Avalon,  and going through excalibur components and
> > cornerstone
> > > blocks.
> > >
> > > The demos which are given for phoenix container is working fine.
> > >
> > > All the service/blocks are using the ComponentManager-  to load the
> > > components.
> > >
> > > Is there any demo service/block which uses ComponentSelector?( for the
> > > DataSource block)
> > >
> > > if NO , how to create it?
> > >
> > > regards,
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>


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