Adapters
Adapters provides a way to access resources that are going to be mapped into the virtual directory. Adapters configuration can be found in PENROSE_HOME/conf/server.xml.
<adapter> <adapter-name>JDBC</adapter-name> <adapter-class>org.safehaus.penrose.connection.JDBCAdapter</adapter-class> </adapter> <adapter> <adapter-name>JNDI</adapter-name> <adapter-class>org.safehaus.penrose.connection.JNDIAdapter</adapter-class> </adapter>
To define an adapter, you need to specify the following values:
- name
Specify the name of the adapter. This will be used in defining connections.
- Class
Specify the class name of the adapter.
Penrose provides two built-in adapters:
- JDBC Adapter
- JNDI Adapter
If you implement your own adapter, put the jar file containing your classes into PENROSE_HOME/lib, then add an adaptor definition like above.