Hi,

If we use TCPRemoteCommitProvider to notify other instances then
then the hostnames for ourselves are ignored.
In our case we have multiple tomcat instances running on a single host
on different ports. So caches can not notify each other. I looked at the
source of TCPRemoteCommitProvider.java and it is single line fix
to accept the same hostnames on different ports.

So the fix would be in Line 250 (OpenJPA 2.0.0):
if (localhostName.equals(hostname)) 
should be 
if (localhostName.equals(hostname) && this._port == tmpPort) 
this takes into account the port as well.

As the TCPRemoteCommitProvider does not allow to dynamically add new
instances which is a requirement in our app, I have implemented a 
RemoteCommitProvider using jgroups. I can also share the configuration
for jgroups running on amazon ec2 using s3 to join the cluster as
broadcasting
on ec2 is not allowed.
Someone interested?


Thanks,
Oliver



-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/Cache-Notification-TCP-fix-suggestion-tp5362949p5362949.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to