felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Madhavan <mattmadha...@gmail.com>
Subject Re: PaxExam - How to look up an OSGi Service with jndi name based Filter String
Date Thu, 17 Mar 2011 18:12:38 GMT
Hello,
I tried filter string to "*osgi.jndi.service.name=jdbc/blogdbnojta*" and it
worked just fine.

Sorry must have tried this before [posting!

Thanks
Matt

On Thu, Mar 17, 2011 at 12:47 PM, Matt Madhavan <mattmadhavan@gmail.com>wrote:

> Hello,
> I'm Extending Apache Aries Blog Example to use the application devlopment
> guidelines I'm creating based on Pax Construct+Pax Runner+Pax Exam.
>
> Aries Blog sample has two datasources - simple and JTA as follows.
>
>   <service id="xaDataSource" ref="derbyXADataSource"
> interface="javax.sql.XADataSource">
>   <service-properties>
>     <entry key="osgi.jndi.service.name" value="jdbc/blogdb"/>
>    </service-properties>
>   </service>
>
>
>   <service ref="derbyDataSource" interface="javax.sql.DataSource">
>    <service-properties>
>      <entry key="osgi.jndi.service.name" value="jdbc/blogdbnojta"/>
>    </service-properties>
>   </service>
>
> Inside my ITest (PaxExam based) Test class -  I would like to use the
> method   *protected <T> T getOsgiService(Class<T> type, String filter,
> long timeout)* to look up the datasource.
>
> So basically how do I construct a jndi name based filter String?
>
> Thanks in advance!
>
> Matt
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message