You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "krishnadasan T S (JIRA)" <ji...@apache.org> on 2009/02/26 06:29:01 UTC

[jira] Created: (OPENJPA-943) How to configure cache synchronization in the case of multiple jvm in same machine

How to configure cache synchronization in the case of multiple jvm in same machine
----------------------------------------------------------------------------------

                 Key: OPENJPA-943
                 URL: https://issues.apache.org/jira/browse/OPENJPA-943
             Project: OpenJPA
          Issue Type: Question
          Components: datacache
         Environment: linux, weblogic 10.0
            Reporter: krishnadasan  T S


Hi,


      I am using two managed servers in a cluster in same machine.For Cache synchronization across multiple JVM  I tried to use the following settings in persistance.xml.

  <property name="kodo.RemoteCommitProvider" value="tcp(Addresses=192.168.39.23)">

But when i deploy this application into cluster in one of the manged server i am getting a socket connection error.I think it is because of the two manged server in cluster is in same mechine.Both server trying to listen on the same default port. I could able to make it work when i used two managers in to different machine.But from the documentation i can not figure out how i can configure TCP option for remote commit provider in the case of same machine with multiple jvm. I also tried with 

    <property name="kodo.RemoteCommitProvider" value="wls-cluster"/>

 this also work fine when they are in two different machine but not working when they are in same machine.


 I could not figure out the remote commit provider for multiple jvm and same machine.

can anyone please help me.....

thanks and regards
Krishnadasan T S

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (OPENJPA-943) How to configure cache synchronization in the case of multiple jvm in same machine

Posted by "krishnadas.ts" <kr...@geojit.com>.
hi Pinaki Poddar,

    I changed weblogic cluster messaging from Unicast to MultiCast. Now  It
is working fine with cluster option.Thanks a lot for your response.Anyway
for curiosity i am asking.Is there no option to work kodo with unicast
option.Where i can get a good documentation about tcp configuration for
clustering.i searched a lot of kod and openjpa configuration.only
information i can get is to give like this

      <property name="kodo.RemoteCommitProvider"
value="tcp(Addresses=192.168.39.23,Port=5454)"/>

But from this i think this is not enough for the case of multiple jvm in
same machine.As far as from my understanding i think in same machine for two
jvm it will try to create two listener in same port(5454).So one of them
will definitly fail.Is there any other parameter to be configured.Or can you
give link of information that says about these think.My application may work
with by setting it to cluster.But i just want to know the concept.i could
not see configuration details for sender and listener port in any
documentation.Only i can see from documentation is the following one.
-----------------------------------------------
 The TCP remote commit provider has several options that are defined as host
specifications containing a host name or IP address and an optional port
separated by a colon. For example, the host specification
saturn.bea.com:1234  represents an InetAddress retrieved by invoking
InetAddress.getByName ("saturn.bea.com")  and a port of 1234.

The TCP provider can be configured by setting the kodo.RemoteCommitProvider
plugin property to contain the appropriate configuration settings. The TCP
provider understands the following properties:

    *

      Port: The TCP port that the provider should listen on for commit
notifications. Defaults to 5636.
    *

      Addresses: A semicolon-separated list of IP addresses to which
notifications should be sent. No default value.
    *

      NumBroadcastThreads: The number of threads to create for the purpose
of transmitting events to peers. You sould increase this value as the number
of concurrent transactions increases. The maximum number of concurrent
transactions is a function of the size of the connection pool. See the the
MaxActive property of kodo.ConnectionFactoryProperties in Section 4.1,
“Using the Kodo DataSource”. Setting a value of 0 will result in behavior
where the thread invoking commit will perform the broadcast directly.
Defaults to 2.
    *

      RecoveryTimeMillis: Amount of time to wait in milliseconds before
attempting to reconnect to a peer of the cluster when connectivity to the
peer is lost. Defaults to 15000.
    *

      MaxIdle: The number of TCP sockets (channels) to keep open to each
peer in the cluster for the transmission of events. Defaults to 2.
    *

      MaxActive: The maximum allowed number of TCP sockets (channels) to
open simultaneously between each peer in the cluster. Defaults to 2. 

To configure a factory to use the TCP provider, your properties might look
like the following:

Example 11.10. TCP Remote Commit Provider Configuration

JPA XML format:

<property name="kodo.RemoteCommitProvider" 
    value="tcp(Addresses=10.0.1.10;10.0.1.11;10.0.1.12;10.0.1.13)"/>

JDO properties format:

kodo.RemoteCommitProvider:
tcp(Addresses=10.0.1.10;10.0.1.11;10.0.1.12;10.0.1.13)


---------------------------------


So please give me guidance


Thanks and regards
Krishnadasan T S

-- 
View this message in context: http://n2.nabble.com/-jira--Created%3A-%28OPENJPA-943%29-How-to-configure-cache-synchronization-in-the-case-of-multiple-jvm-in-same-machine-tp2387993p2394762.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: [jira] Created: (OPENJPA-943) How to configure cache synchronization in the case of multiple jvm in same machine

Posted by "krishnadas.ts" <kr...@geojit.com>.
Hi Pinaki Poddar,
 There is no error when i am using wls-cluster option.But cache
synchronization is not happening.When i update a column from one manged
server i am not getting that updated value from other managed server.is 
there anything missed to configure.I think my cluster is working
fine.Messaging type used in the cluster is Unicasting.Did i need to change
to Multicast.When i start the managed server it is showing the following
message

Joining cluster Flip-Cluster-1 on 239.192.0.0:7001

And i can see two servers in cluster from sdmin console of weblogic.So i
asume weblogic cluster configuration is ok.But wls-cluster option just not
working.is there anything i missed.

thanks and regards
Krishnadasan T S

-- 
View this message in context: http://n2.nabble.com/-jira--Created%3A-%28OPENJPA-943%29-How-to-configure-cache-synchronization-in-the-case-of-multiple-jvm-in-same-machine-tp2387993p2394663.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: [jira] Created: (OPENJPA-943) How to configure cache synchronization in the case of multiple jvm in same machine

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  <property name="kodo.RemoteCommitProvider" value="wls-cluster"/>
L2 Cache synchronization with "wls-cluster" is a BEA proprietary feature and
not part of OpenJPA per se.
So official support channels are the right place to get correct information.
I will share few data points because of my earlier association with
developing "wls-cluster".
"wls-cluster" uses the same multicast transport that the cluster of Weblogic
instances use to communicate between themselves. As two nodes of the cluster
can run in the same machine, so *should* "wls-cluster". It had been tested
with nodes running in the same machine. What error are you seeing with
"wls-cluster" for multiple jvm in the same machine? 

  Other common OpenJPA protocols such as TCP also runs on the same machine
between multiple jvms. Please look at the manual on how to configure the
sender and listener ports properly for such communication to work. When
using TCP, it is upto the developer/deployer to configure separate
sender/listener ports for each L2 cache RCP correctly and separately -- a
problem that wls-cluster eliminates completely. Your TCP configuration does
not appear to be sufficient. 

  
 

JIRA jira@apache.org wrote:
> 
> How to configure cache synchronization in the case of multiple jvm in same
> machine
> ----------------------------------------------------------------------------------
> 
>                  Key: OPENJPA-943
>                  URL: https://issues.apache.org/jira/browse/OPENJPA-943
>              Project: OpenJPA
>           Issue Type: Question
>           Components: datacache
>          Environment: linux, weblogic 10.0
>             Reporter: krishnadasan  T S
> 
> 
> Hi,
> 
> 
>       I am using two managed servers in a cluster in same machine.For
> Cache synchronization across multiple JVM  I tried to use the following
> settings in persistance.xml.
> 
>   <property name="kodo.RemoteCommitProvider"
> value="tcp(Addresses=192.168.39.23)">
> 
> But when i deploy this application into cluster in one of the manged
> server i am getting a socket connection error.I think it is because of the
> two manged server in cluster is in same mechine.Both server trying to
> listen on the same default port. I could able to make it work when i used
> two managers in to different machine.But from the documentation i can not
> figure out how i can configure TCP option for remote commit provider in
> the case of same machine with multiple jvm. I also tried with 
> 
>     <property name="kodo.RemoteCommitProvider" value="wls-cluster"/>
> 
>  this also work fine when they are in two different machine but not
> working when they are in same machine.
> 
> 
>  I could not figure out the remote commit provider for multiple jvm and
> same machine.
> 
> can anyone please help me.....
> 
> thanks and regards
> Krishnadasan T S
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/-jira--Created%3A-%28OPENJPA-943%29-How-to-configure-cache-synchronization-in-the-case-of-multiple-jvm-in-same-machine-tp2387993p2389063.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


[jira] Closed: (OPENJPA-943) How to configure cache synchronization in the case of multiple jvm in same machine

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis closed OPENJPA-943.
-------------------------------

    Resolution: Duplicate

Closing as this is a duplicate of OPENJPA-945.

> How to configure cache synchronization in the case of multiple jvm in same machine
> ----------------------------------------------------------------------------------
>
>                 Key: OPENJPA-943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-943
>             Project: OpenJPA
>          Issue Type: Question
>          Components: datacache
>         Environment: linux, weblogic 10.0
>            Reporter: krishnadasan  T S
>
> Hi,
>       I am using two managed servers in a cluster in same machine.For Cache synchronization across multiple JVM  I tried to use the following settings in persistance.xml.
>   <property name="kodo.RemoteCommitProvider" value="tcp(Addresses=192.168.39.23)">
> But when i deploy this application into cluster in one of the manged server i am getting a socket connection error.I think it is because of the two manged server in cluster is in same mechine.Both server trying to listen on the same default port. I could able to make it work when i used two managers in to different machine.But from the documentation i can not figure out how i can configure TCP option for remote commit provider in the case of same machine with multiple jvm. I also tried with 
>     <property name="kodo.RemoteCommitProvider" value="wls-cluster"/>
>  this also work fine when they are in two different machine but not working when they are in same machine.
>  I could not figure out the remote commit provider for multiple jvm and same machine.
> can anyone please help me.....
> thanks and regards
> Krishnadasan T S

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.