Topic
1 reply Latest Post - ‏2013-07-31T07:22:28Z by Mentus
Mentus
Mentus
2 Posts
ACCEPTED ANSWER

Pinned topic How to configure Map Plugin collection

‏2013-07-26T08:55:51Z |

Hello,

I used serializer sample as an example (SerializerProto.zip) to implement my own key/value serializers. It's clear how to implement this interfaces, however I don't know how to configure objectGrid on the server side. Please notice that I'm a beginner with the eXtreme Scale :)

Running container

./startXsServer.sh co1 -objectGridFile objectGridFile.xml -catalogServiceEndPoints localhost:2809 

having objectGridFile.xml

<?xml version="1.0" encoding="UTF-8"?>

<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"
                                xmlns="http://ibm.com/ws/objectgrid/config">
  <objectGrids>
      <objectGrid name="myGrid">
        <backingMap name="gos" copyMode="COPY_TO_BYTES" lockStrategy="NONE" nullValuesSupported="false" pluginCollectionRef="gos_plugin"/>
      </objectGrid>
  </objectGrids>
  <backingMapPluginCollections>
      <backingMapPluginCollection id="gos_plugin">
<bean id="myMapSerializer" className="my.package.MyMapSerializer">
</bean>
      </backingMapPluginCollection>
  </backingMapPluginCollections>
</objectGridConfig>

 

public class MyMapSerializer extends BasicMapSerializerPlugin {
 
public SorMapSerializer() {
        super();
        setKeySerializerPlugin(new MyKeySerializer());
        setValueSerializerPlugin(new MyValueSerializer());
    }
}

I'm getting 

[25/07/13 15:07:20:485 BST] 00000001 Initializatio W   CWOBJ0006W: An exception occurred: com.ibm.websphere.objectgrid.ObjectGridException: Invalid ObjectGrid XML file: file:/home/thomas/IBM/WebSphere/AppServer/bin/objectGridFile.xml
[25/07/13 15:07:21:892 BST] 0000001a ProcessLaunch E   CWOBJ2500E: Failed to start ObjectGrid server co1.

I added jar file which contains my plugins implementation to ws_home/lib, also I added classpath to this jar in Environment>Shared Libraries.

Can anyone explain me what I'm doing wrong?

  • Mentus
    Mentus
    2 Posts
    ACCEPTED ANSWER

    Re: How to configure Map Plugin collection

    ‏2013-07-31T07:22:28Z  in response to Mentus

    Solved. Used maven plugin doesn't work as expected, I had incorrectly built the jar file. It works pretty well at the moment, however I'm wondering that my methods implementation using DataDescriptor are correct. Please, can anyone demonstrate me a sample implementation of DataDescriptor inicjalization & inflateDataObjectAttributes(*) method for simple class listed below?

    public class MyClass {

    private String idNumber;

    private Long idVersion;

    }