+

Search Tips   |   Advanced Search

Establishing custom adapters for federated repositories


Out of the box adapters for federated repositories provide File, LDAP, and Database adapter for the use. These adapters implement the com.ibm.wsspi.wim.Repository software programming interface (SPI). Custom adapters for federated repositories need to implement the same SPI.

Refer to the Repository SPI implementation information in the related references for information about the custom adapters for federated repositories SPI. Refer to the sample custom adapter code that is available in the vmmsampleadapter.jar file. The JAR file contains the sample customer adapter code in the src/ directory. The vmmsampleadapter.jar can be downloaded at this location: http://www.ibm.com/developerworks/websphere/library/samples/vmmsampleadapter.html

Custom adapters for federated repositories must not depend on any WAS components, such as data sources and enterprise beans. These WAS components require that security is initialized and enabled prior to startup. If the implementation of the virtual member manager custom adapter needs to use data sources to connect to a database, we need to use Java database connectivity (JDBC) to make the connection during server startup. Then, at a later time, switch to using the data sources when the data source is available.

 

  1. Build the implementation.

    EMF JAR files contain version number in their names, such as v200607270021. Make sure to change the version number to reflect the installation. To compile the code, we need the following JAR files in the classpath:

    • APP_ROOT/plugins/com.ibm.ws.runtime_6.1.0.jar
    • APP_ROOT/plugins/org.eclipse.emf.commonj.sdo_2.1.0.v200607270021.jar
    • APP_ROOT/plugins/org.eclipse.emf.ecore_2.2.1.v200607270021.jar
    • APP_ROOT/plugins/org.eclipse.emf.common_2.2.1.v200607270021.jar
    • APP_ROOT/plugins/org.eclipse.emf.ecore.xmi_2.2.0.v200607270021.jar
    • APP_ROOT/plugins/org.eclipse.emf.ecore.sdo_2.2.0.v200607270021.jar

    Here is an example:

    APP_ROOT/java/bin/javac -classpath 
    
    APP_ROOT/plugins/com.ibm.ws.runtime_6.1.0.jar;
    APP_ROOT/plugins/org.eclipse.emf.commonj.sdo_2.1.0. v200607270021.jar;APP_ROOT /plugins/org.eclipse.emf.ecore_2.2.1.v200607270021.jar;
    APP_ROOT/plugins/org.eclipse.emf.common_2.2.1. v200607270021.jar;APP_ROOT/plugins/org. eclipse.emf.ecore.xmi_2.2.0.v200607270021.jar;
    APP_ROOT/plugins/org.eclipse.emf.ecore.sdo_2.2.0.v200607270021.jar my_implementation_file.java

  2. Copy the generated class files or the packaged JAR file to the product classpath. The preferred location is the APP_ROOT/lib/ext directory. This should be copied to the classpaths of all WAS processes (cell and all NodeAgents).

  3. Set the custom adapter by following the steps in Set custom adapters for federated repositories using wsadmin.

  4. Test the custom adapter by following the steps in Use custom adapters for federated repositories

 

Next steps

Set custom adapters for federated repositories using wsadmin provides details about configuring the custom adapter with wsadmin.

 

Related tasks


Set custom adapters for federated repositories using wsadmin
Use custom adapters for federated repositories

 

Related


Sample custom adapters for federated repositories examples

 

Related information


http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.javadoc.doc/vmm/com/ibm/wsspi/wim/Repository.html