
Originally Posted by
simonlee
My Symphony application is based on Symphony 3.1.
Resently, when I trying to deploy the client application onto a Jboss Server some JNDI questions bothered me.
In Jboss environment, applications use org.jnp.interfaces.NamingContextFactory as the JNDI server factory. This factory require that all the object on the JNDI server are serializable.
Jboss provide a NonSerializableFactory to store non-serializable objects, but these objects are valid only within the same JVM. So that, I can not use NonSerializableFactory .
My client application is a typical Symphony program that has the following code:
private SessionCreationAttributes attributes;
//...
try {
SoamFactory.initialize();
this.attributes = new SessionCreationAttributes();
DefaultSecurityCallback securityCB = new DefaultSecurityCallback(userName, passWord);
this.attributes.setSessionName(this.appName);
this.attributes.setSessionType(seesionType);
this.attributes.setSessionFlags(Session.PARTIAL_AS YNC);
this.attributes.setSessionCallback(myCallback);
this.connection = SoamFactory.connect(this.appName,securityCB);
} catch (SoamException e) {
e.printStackTrace();
System.exit(-1);
}
In order to put my object onto Jboss JNDI server, I have to make the client class serializable. But during uploading, an exception named java.io.NotSerializableException is catched because the class SessionCreationAttributes is not serializable.
Can you help me to solve these problem, or would you please give me some advice about this?
And please correct me if I'm wrong.
Thank you.
Sincerely.