Well the jetty in ServiceMix/Karaf does work quite differently compared to
a standalone.
So this doesn't necessarily work. But since you are using a OSGi container,
why don't you reference your Connection pool via services?
If JNDI is required you still can use Aries to provide it as a JNDI
service.

Regards, Achim


2013/1/2 Vincenzo Laudizio <[email protected]>

> Hi,
>
> I'm trying to configure the servicemix 4.4.2 embedded Jetty in order to
> register a Datasource as a JNDI Resource.
> If I add the following statement:
>
>         <New id="DSTest" class="org.eclipse.jetty.plus.**jndi.Resource">
>              <Arg/>
>              <Arg>jdbc/DSTest</Arg>
>              <Arg>
>                 <New
>    class="com.mysql.jdbc.jdbc2.**optional.**MysqlConnectionPoolDataSource"
> **>
>                    <Set
>    name="Url">jdbc:mysql://**localhost:3306/sessions</Set>
>                    <Set name="User">root</Set>
>                    <Set name="Password">root</Set>
>                 </New>
>               </Arg>
>         </New>
>
>
> in <ServiceMix_Home>/etc/jetty.**xml file and i run servicemix, i get the
> following error:
>
>    org.eclipse.jetty.util - 7.4.5.v20110725 | Config error at <New
>    id="DSTest" class="org.eclipse.jetty.plus.**jndi.Resource"> ...
>
> This is very odd since the same configuration works well on a standalone
> Jetty (version 7.4.5.v20110725).
>
> Where am I wrong?
>
> Vincenzo
>
>
>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Reply via email to