Re: [xmlblaster] xmlBlaster with HTTP

2008-03-10 Thread Zied ABID
Thanks you for your answer , It seems that my university's firewall bloc 
the connection .



Marcel Ruff a écrit :

Zied ABID wrote:

Hi,
I begin to work with xmlBlaster for my degree's Project, it will be  
deployed in a server under a firewall so 80 port with HTTP is open 
(or even HTTPS ) .

well, I have some quetions :
1) can I work with XmlRpc protocol already  in xmlBlaster ? will I 
work with xmlBlaster servelet ?
If i understand you correctly: On 80 a web server (like apache,tomcat) 
is running.
You can't use our XmlRpc for this as in this case the XMLRPC server 
must be xmlBlaster itself (running on port 80 or 8080 ...).


If you want to use a servlet approach there are currently only two 
options a.f.a.i.k:


1) Using an applet
   xmlBlaster/src/java/org/xmlBlaster/protocol/http/appletproxy/README 
(servlet setup)
   
xmlBlaster/src/java/org/xmlBlaster/client/protocol/http/applet/README 
(applet setup)

   xmlBlaster/demo/http/applet (applet example)

2) Using a javascript client in a browser 
(xmlBlaster/src/java/org/xmlBlaster/protocol/http/ajax/AjaxServlet.java)

 Here you have the complete Ajax based xmlBlaster access.

In case you need a stand-alone java client with bi-directional 
communication you
need to code some lines yourself, probably the applet code is a good 
point to start.


About you questions below:
This works fine here:
 java -Dcom.sun.management.jmxremote org.xmlBlaster.Main
 java HelloWorld3 -protocol XMLRPC
your configuration looks ok but i think the server names are somehow 
invalid,


best regards
Marcel



2) using Socket protocol, I could change properties for clients like 
HelloWorld6 and the server in command line , but I don' work for 
xmlrpc :

for client :

// Change hard-coded the protocol and server lookup:
String[] args = { -protocol, XMLRPC,
  
-dispatch/connection/plugin/xmlrpc/hostname, server.xxx.zz,
  -dispatch/connection/plugin/xmlrpc/port, 
8080,  // I try with 8080 to not use root access
  
-dispatch/connection/plugin/xmlrpc/localHostname, client.xxx.zz,
  
-dispatch/connection/plugin/xmlrpc/localPort, 8080

};

for server : the command line :
java -jar lib/xmlBlaster.jar -plugin/xmlrpc/port 8080


I had for client :

2008-03-06 15:31:08.909  INFO   10-main 
org.xmlBlaster.client.protocol.xmlrpc.XmlRpcConnection init: Created 
'XMLRPC' protocol plugin to connect to xmlBlaster server
2008-03-06 15:31:09.32  INFO   10-main 
org.xmlBlaster.client.protocol.xmlrpc.XmlRpcConnection 
connectLowlevel: Created XmlRpc client to http://server.xxx.zz:8080/
2008-03-06 15:31:09.70  INFO   10-main 
org.xmlBlaster.util.dispatch.DispatchConnection handleTransition: 
Connection 'XMLRPC' transition UNDEF - ALIVE: Success, 
DispatchConnection-connection:client/abid_zie1204813867398  connected.
2008-03-06 15:31:09.192  INFO   10-main 
org.xmlBlaster.util.dispatch.DispatchManager switchToSyncMode: 
connection:client/abid_zie1204813867398: Switched to synchronous 
message delivery
2008-03-06 15:31:09.317 SEVERE  10-main 
javaclients.HelloWorld6 init: Houston, we have a problem: 
errorCode=user.configuration message=#exported Local host IP 
'server.xxx.zz' for XMLRPC callback server is invalid: 
java.io.IOException: Cannot assign requested address

Success, hit a key to exit

( I can ping server.xxx.zz and client.xxx.zz )


So wan't wrong here ?

3) if, I want to add this properties in xmlBlaster.properties , how 
can I do it?  I'll try to put lines like :


# after the line 87  : 
CbProtocolPlugin[XMLRPC][1.0]=org.xmlBlaster.protocol.xmlrpc.CallbackXmlRpcDriver 



#test if proprities work for XmlRpc:
plugin/xmlrpc/port=8080
plugin/xmlrpc/hostname=server.xxx.zz
plugin/xmlrpc/localport=8080


I hope that isn't too much questions ...
thanks for your time and your answers








Re: [xmlblaster] Client connection not being restored properly?

2008-03-10 Thread Marcel Ruff

Hi David,

fail safe mode should also set a positive session id,
like this the client queue is found again on restart and
you don't need another queue to store the entries.

Something like

java -Dcom.sun.management.jmxremote javaclients.HelloWorldSubscribe 
-session.name subscriber/1 -dispatch/callback/retries -1 
-connect/qos/persistent true -persistentSubscribe true


The persistent settings are only needed to recover from server restart 
and to not

loose a message if a publisher reconnects and publishes earlier,
before our subscriber reconnects and re-subscribes.

best regards,
Marcel

David Kerry wrote:

On Wed, Feb 27, 2008 at 06:28:59PM +0100, Marcel Ruff wrote:
snip
  

My way of working around this for now is to create yet another queue,
in my application that keeps a copy of the saved messages until a
connection is re-established after which it puts them back in the
xmlblaster queue for publishing.

This works, but it's, well, ugly.  Is this the intended client behaviour
in this situation?  Keep in mind that I'm not concerned about subscriptions
and incoming messages to this client, if that makes a difference.
 
  

Hi David,

what about starting the client in fail safe mode?

Like this the client retries to establish a connection and sends the 
queued messages on reconnect,


regards,
Marcel



Hi Marcel,

I think I was mistaken.  I think I am connecting in fail-safe mode, if
'fail-safe' mode means setting up the connection reconnect/ping/retry
values.  I am not specifying an explicit session id, however (I get a
negative id back upon connect).

For reference, here are the connect properties I'm using:

protocol=SOCKET
dispatch/connection/pingInterval=3
dispatch/connection/retries=-1
dispatch/connection/delay=5000
dispatch/connection/plugin/socket/port=7607
dispatch/connection/plugin/socket/hostname=
queue/connection/defaultPlugin=RAM,1.0

The rest are whatever defaults that xmlblaster client provides.

From reading the reference docs, I think this actually does enable failsafe
mode, correct?

  



--
Marcel Ruff
http://www.xmlBlaster.org
http://watchee.net
Phone: +49 7551 309371