Problem with GridServer client launching within JBOSS

Problem with GridServer client launching within JBOSS

book

Article ID: KB0090156

calendar_today

Updated On:

Products Versions
TIBCO DataSynapse GridServer -
Not Applicable -

Description

Resolution:
The problem with the Driver in JBoss is related to the PropertyEditorManager class. Both JBoss and the Driver use this class to find PropertyEditors in order to serialize information for communications.

The first problem encountered is because GridServer expects that there is no editor for the InetAddr class, so the default class is used. JBoss however defines one, so when running in JBoss, the call to PropertyEditorManager to get a editor returns a JBoss specific editor, which formats the address in a way that the Broker cannot parse, resulting in an XML exception.

Developers can work around this problem by manipulating the search path used by the property editor. However, this may cause other issues, since the JBoss application server is using this same class to build its own internal messages. The root issue is that the search path in the PropertyEditorManager is a static variable; changing it in a web app will result in the change being reflected across the entire app server. If the editors are cached (for example, if the call to findEditor is only made once per class being serialized), then resetting the path before the DSDriver logs in to GridServer will work. If findEditor gets called for each message, then the only workaround would be to use SOAP.

There are also two workarounds to make GridServer work within JBoss:

    * Force driver.properties directory:

      DriverBoot.setConfigDir(new File("./GridServerSDK-win32/config"));

    * Prevent InetAddr reformatting:

      PropertyEditorManager.setEditorSearchPath(null);

Issue/Introduction

Problem with GridServer client launching within JBOSS