You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by okrohne <ok...@yahoo.de> on 2010/08/02 08:12:45 UTC

Cache Notification (TCP) fix suggestion

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.

Re: Cache Notification (TCP) fix suggestion

Posted by Pinaki Poddar <pp...@apache.org>.
Hi Oliver,
  Thank you for your interest and contributions.

  > Someone interested? 

   Yes. The process of contributions of a module such as this is under
discussion [1]. 
To begin with, 
1) a JIRA issue should be created 
2) the module can be submitted as a patch to the issue for others' to review
3) the compile-time/runtime dependencies to be clarified in terms of maven
builds
4) the open-source test environment for OpenJPA is primarily focused  on JSE
environments (that does not imply the significant and rigorous test effort
OpenJPA undergoes when it is packaged for commercial  products). It will be
helpful if you can share some ideas of testability of this module. 
5) OpenJPA's configuration framework augmented with ProductDerivation can
reduce compile-time dependency and push certain dependencies to run-time for
such module. If this has not been already done for this module, it may be
useful to introduce that aspect.


   
  

[1] https://issues.apache.org/jira/browse/OPENJPA-979

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