I added a property factory that allows property values to be fetched
from JNDI. Although general purpose in nature, the most obvious
application is to allow components to access J2EE resources.

For example, a component could write
public class MyComponent {
   @Property
   public DataSource myDB;
}

and then be injected with a DataSource with the SCDL:
  <component ...>
    <properties>
      <v:myDB
factory="org.apache.tuscany.core.loader.impl.JNDIPropertyFactory">java:comp/env/jdbc/MyDatabase</v:myDB>

The same setup can be used to access environment entries or the user
transaction.

I thought this might be useful in the samples that access a backend db.

Cheers
--
Jeremy

Reply via email to