Regarding Broker JMS provier

I want to know how we can create document type on broker?
I think we should write some java codes. can someone help me regarding that?:slight_smile:

Mohit,

I checked the Broker_Java_Client_API_Reference and IData API reference but could not find methods for the following.

  1. How to make IData publishable.
  2. doc synchronization which will sync doc to the broker.

If you want to publish any document available on broker using java service here is the code.

IDataCursor pipelineCursor = pipeline.getCursor();
try{
BrokerClient client = new BrokerClient(“localhost:6849”, “Broker #1”, null, “IntegrationServer”, “TestClient”,null );
BrokerEvent document = new BrokerEvent(client,“wm::is::Test::Practice::javaServices::pubdoc”);
document.setStringField(“name”, “A”);
document.setStringField(“age”, “25”);
client.publish(document);
}
catch(Exception e)
{
IDataUtil.put( pipelineCursor, “error”, e.toString() );
}
pipelineCursor.destroy();

Please import COM.activesw.API.client.* in shared tab.

Regards,
Amol.