[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] session object erased????

Eduardo Catarino wrote:

Hello to all,

I’ve developed an applet using the xmlblaster lib for applets I’m now facing a problem. When the applet is integrated in the real environment that uses the session object to store application data the applet seems to create a new session object and erases all the data that was previously stored. I have been searching in the requirements and tried to use the following code:

session.putValue("xmlBlaster.invalidate", "false");

session.putValue("xmlBlaster.loginName", "eduardo");

session.putValue("xmlBlaster.passwd", "secret");

in order to prevent this from happening. However this didn’t solve the problem.

Can someone give me a tip how to solve this?

Merry Christmas and a Happy new year for all the xmlblaster team.

You can extend our xmlBlaster/demo/http/applet/HelloWorld3.java example
to have full control over your login session:

try {
xb = new XmlBlasterAccessRaw(applet);
String connectQos =
"<qos>" +
" <securityService type='htpasswd' version='1.0'>" +
" <user>eduardo</user>" +
" <passwd>secret</passwd>" +
" </securityService>" +
" <session name='eduardo/1' timeout='-1'/>" +
" <persistent>true</persistent>" +
xb.connect(connectQos, applet); // registers applet.update() callback method

Now the session remains even on xmlBlaster server restart and all queued messages for the applet 'eduardo'
will never be lost.