jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilshan <nilshan.par...@indralok.com>
Subject Re: JackRabbit_Clustering
Date Tue, 31 Mar 2009 09:34:08 GMT

Hello Ian,


Thank You.

I agree to you.

My clustering configuration works absolutely fine with FileJournal. In the
Rule Creation Cluster, when I create a new rule I get that rule in the Rule
Execution Cluster (Cluster 2) and the execution works fine. But the problem
is that when i update the rule, this effect does not reflect at the
Execution Cluster.
 Ex:- When I set the rule status as InActive, it does not reflect at the
Execution cluster and that rule gets executed even when it is InActive at
the Rule Creation Cluster. I feel that Both the clusters should be
Synchronized at any instance of time even if any minor changes are
made.....(Please correct me if I am wrong.) 

Also, I have noticed that entries are made into the revision.log whenever I
create a new rule or update it.
But I fail to understand why this discrepancy in both the clusters even when
it is logged in the revision log.

Due to this problem, we tried to move to the DatabaseJournal, but
unfortunately we faced connection error as we discussed in the previous
message....

Please suggest a good way to get out of this trap.

Thanks........
Nilshan And Arpan







Ian Boston-3 wrote:
> 
> The setup looks Ok, the key things are
> 1: revision is a local file that stores the revision that the current  
> node is at, I have a feeling that this is a binary integer so you can  
> use od (octal dump) to look at it and see where a app server node is at.
> 2. In the DB journal the table is shared, in the File Journal the  
> location is shared and this is the communication mechanism between app  
> server nodes within the cluster.
> 
> In the log files you should see ClusterNode revisions flowing past  
> when each item is saved (or session.save() which does a  
> session.getRootNode().save()).
> You should also see those ClusterNode revisions being replayed on  
> other nodes. ( are you doing item.save(), session.save() etc.... dumb  
> question)
> 
> Things that you might try:
> FileJournal
> monitor the journal file on both nodes with tail (but be prepared to  
> see junk and a broken terminal), you should see it being appended to  
> on both nodes.
> 
> DBJournal
> do a select count(*) from the journal table on both nodes to see that  
> records are being appended on each node.
> 
> Also for the DB journal you could turn on sql logging or use the  
> log4jdbc driver to log statements.
> 
> HTH
> Ian
> 
> 
> 
> 
> On 31 Mar 2009, at 05:56, Nilshan wrote:
> 
>>
>> Hello Ian ,
>>
>> Thanks for your quick reply...
>>
>> May be there is some problem with the Text Editor of this forum.  
>> because
>> some tags are not displayed by it.
>>
>> I think It didn't consider param Tag.
>>
>> For Cluster 1
>> <Cluster id="Rule Creation">	
>>  	    <Journal class="org.apache.jackrabbit.core.journal.FileJournal">
>>    		param name="revision" value="c:/myjournal/revision.log" /
>>    		param name="directory" value="c:/myjournal" /
>>  		</Journal>
>> </Cluster>
>>
>> For Cluster 2
>> <Cluster id="Rule Execution.">
>> 	
>>  	    <Journal class="org.apache.jackrabbit.core.journal.FileJournal">
>>    		param name="revision" value="c:/myjournal/revision_New.log" /
>>    		param name="directory" value="c:/myjournal" /
>>  		</Journal>
>> </Cluster>
>>
>> I tried shared Journal (as it is must and clearly suggested on  
>> clustering
>> wiki) but it didn't work.
>>
>> I used DatabaseJournal, unfortunately It was giving me "Unable to  
>> create
>> Connection" error.
>>
>> Configuration using DatabaseJournal I used is as Below.
>>
>> <Cluster id="Rule Creation">
>> 	
>>  	    <Journal  
>> class="org.apache.jackrabbit.core.journal.DatabaseJournal">
>>    		param name="revision" value="${rep.home}/revision.log" /
>>    		param name="driver" value="com.ibm.db2.jcc.DB2Driver"/
>> 	 		param name="url" value="jdbc:db2://192.168.1.36:50000/Database" /
>> 			param name="user" value="username" /			
>>                                       param name="password"
>> value="password" /	 		                          param name="schema"
>> value="db2"/ 				
>> 	 		param name="schemaObjectPrefix" value="RuleMgmt_Ver_" /  		</ 
>> Journal>
>> </Cluster>
>>
>> Please look at the above confiugration and let me know If I have  
>> made any
>> mistake.
>>
>> The following is the Error log while using DatabaseJournal..
>>
>> **********************************************************
>> javax.jcr.RepositoryException: Unable to create connection.: Unable to
>> create connection.
>> at
>> org 
>> .apache 
>> .jackrabbit 
>> .core.RepositoryImpl.createClusterNode(RepositoryImpl.java:650)
>> at
>> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java: 
>> 288)
>> at
>> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java: 
>> 557)
>> at
>> org.apache.jackrabbit.core.TransientRepository 
>> $2.getRepository(TransientRepository.java:245)
>> at
>> org 
>> .apache 
>> .jackrabbit 
>> .core.TransientRepository.startRepository(TransientRepository.java: 
>> 265)
>> at
>> org 
>> .apache 
>> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
>> 333)
>> at
>> org 
>> .apache 
>> .jackrabbit.core.TransientRepository.login(TransientRepository.java: 
>> 363)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.initializeRepository(RuleAssetManager.java:555)
>> at
>> com 
>> .amicas 
>> .rulemanagement.RuleAssetManager.getSession(RuleAssetManager.java:517)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.getServiceImpl(RuleAssetManager.java:494)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.categoryExists(RuleAssetManager.java:420)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager 
>> .initializeRuleRepoAndMetaConfiguration(RuleAssetManager.java:1718)
>> at
>> com 
>> .amicas 
>> .rulemanagement 
>> .RuleAssetManager.getRuleAssetManager(RuleAssetManager.java:167)
>> at
>> com 
>> .amicas 
>> .gwt 
>> .rulemanagement 
>> .servlet 
>> .RuleServiceServlet.getAllRuleByCategory(RuleServiceServlet.java:256)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at  
>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 
>> 528)
>> at
>> com 
>> .google 
>> .gwt 
>> .user 
>> .server 
>> .rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>> at
>> com 
>> .google 
>> .gwt 
>> .user 
>> .server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>> at
>> org 
>> .apache 
>> .catalina 
>> .core 
>> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
>> 252)
>> at
>> org 
>> .apache 
>> .catalina 
>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org 
>> .springframework 
>> .orm 
>> .hibernate 
>> .support 
>> .OpenSessionInViewFilter 
>> .doFilterInternal(OpenSessionInViewFilter.java:172)
>> at
>> org 
>> .springframework 
>> .web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 
>> 76)
>> **********************************************************
>>
>> I found specific Database Journal for MySQl , Oracle. Do we have any  
>> Db2
>> specific Journal. ?
>>
>>
>> Thanks,
>> Nilshan and Arpan.
>>
>> *******************************************************
>>
>> Ian Boston-3 wrote:
>>>
>>> A few observations:
>>>
>>> You appear to be using the File Journal,
>>> but I cant see where the shared directory for the file journal is
>>> defined.
>>>
>>> I think, (please correct if wrong) it would be normal to use a DB
>>> Journal if using a DB persistence manager.
>>>
>>> Ian
>>>
>>> On 30 Mar 2009, at 16:04, Nilshan wrote:
>>>
>>>>
>>>> Hello All,
>>>>
>>>> I have implemented Jackrabbit Clustering approach to create Two
>>>> clustering
>>>> for two different processes.
>>>> One for creation of rules (Cluster 1) and another for execution
>>>> (Cluster 2).
>>>> Both these clusters have a shared database (DB2)
>>>> where rules are stored.
>>>>
>>>>
>>>> The problem I face during execution is that , the execution process
>>>> does not
>>>> get the latest updates from Rule creation process. I mean , If I
>>>> change Rule
>>>> status it doesn't reflect immediately to execution process.
>>>> But when redeployed (Restart Server) the system executes as
>>>> expected. (With
>>>> latest changes applied by
>>>> Cluster 1)
>>>>
>>>> My configuration are as below.
>>>> 1.Shared DB ( Persistance Manager is ) : IBM DB2.
>>>> 2. Drools Version : 5.x
>>>> 3. Jackrabbit Version : 1.4.x
>>>>
>>>> My clustering configuration for both the process are as below.
>>>>
>>>> Configuration for Cluster 1 -----------
>>>> START-------------------------------
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <Repository>
>>>>
>>>> 	<Cluster id="Rule Creation">
>>>> 	
>>>> 	    <Journal  
>>>> class="org.apache.jackrabbit.core.journal.FileJournal">
>>>>   		
>>>>   		
>>>> 		</Journal>
>>>> 	</Cluster>
>>>>
>>>> 	<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>   </FileSystem>
>>>>
>>>> 	<Security appName="Jackrabbit">
>>>> 		<AccessManager
>>>> class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
>>>> 			<LoginModule
>>>> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>>>> 				
>>>> 			</LoginModule>
>>>> 	</Security>
>>>> 	
>>>> 	<Workspaces rootPath="${rep.home}/workspaces"
>>>> defaultWorkspace="default" />	
>>>> 	<Workspace name="${wsp.name}">
>>>> 		<PersistenceManager
>>>> class
>>>> ="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>> 			
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>> 			
>>>> 		</PersistenceManager>
>>>> 		
>>>> 		<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>       </FileSystem>
>>>>
>>>>       <!--<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.db.DB2FileSystem">
>>>>
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>>       </FileSystem>-->
>>>>
>>>> 		<SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>
>>>>
>>>>
>>>>
>>>>   </SearchIndex>            	
>>>> 	</Workspace>
>>>> 	
>>>> 	<Versioning rootPath="${rep.home}/version">
>>>> 	
>>>> 		<PersistenceManager
>>>> class
>>>> ="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>> 			
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>> 						
>>>> 		</PersistenceManager>
>>>> 		
>>>> 		<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>       </FileSystem>
>>>>
>>>>       <!--<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.db.DB2FileSystem">
>>>>
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>>       </FileSystem>-->
>>>>
>>>> 		
>>>> 	</Versioning>
>>>> 	<SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>
>>>>
>>>>
>>>>
>>>>   </SearchIndex>
>>>>
>>>> </Repository>
>>>> Configuration for Cluster 1 -----------
>>>> END-------------------------------
>>>>
>>>> Configuration for Cluster 2 -----------
>>>> START-------------------------------
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <Repository>
>>>>
>>>> 	<Cluster id="Rule Execution">
>>>> 	
>>>> 	    <Journal  
>>>> class="org.apache.jackrabbit.core.journal.FileJournal">
>>>>   		
>>>>   		
>>>> 		</Journal>
>>>> 	</Cluster>
>>>>
>>>> 	<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>   </FileSystem>
>>>>
>>>> 	<Security appName="Jackrabbit">
>>>> 		<AccessManager
>>>> class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
>>>> 			<LoginModule
>>>> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>>>> 				
>>>> 			</LoginModule>
>>>> 	</Security>
>>>> 	
>>>> 	<Workspaces rootPath="${rep.home}/workspaces"
>>>> defaultWorkspace="default" />	
>>>> 	<Workspace name="${wsp.name}">
>>>> 		<PersistenceManager
>>>> class
>>>> ="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>> 			
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>> 			
>>>> 		</PersistenceManager>
>>>> 		
>>>> 		<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>       </FileSystem>
>>>>
>>>>       <!--<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.db.DB2FileSystem">
>>>>
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>>       </FileSystem>-->
>>>>
>>>> 		<SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>
>>>>
>>>>
>>>>
>>>>   </SearchIndex>            	
>>>> 	</Workspace>
>>>> 	
>>>> 	<Versioning rootPath="${rep.home}/version">
>>>> 	
>>>> 		<PersistenceManager
>>>> class
>>>> ="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>>>> 			
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>> 						
>>>> 		</PersistenceManager>
>>>> 		
>>>> 		<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>>>
>>>>       </FileSystem>
>>>>
>>>>       <!--<FileSystem
>>>> class="org.apache.jackrabbit.core.fs.db.DB2FileSystem">
>>>>
>>>> 	 		
>>>> 			
>>>> 			
>>>> 	 		 				
>>>> 	 		
>>>>       </FileSystem>-->
>>>>
>>>> 		
>>>> 	</Versioning>
>>>> 	<SearchIndex
>>>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>>>
>>>>
>>>>
>>>>
>>>>   </SearchIndex>
>>>>
>>>> </Repository>
>>>> Configuration for  Cluster 2 -----------
>>>> END-------------------------------
>>>>
>>>> Both the process are running on same machine under different JVM.
>>>>
>>>> Do we have any specific Journal for DB2 database as we have one for
>>>> Oracle.?
>>>>
>>>> Please suggest me  a feasible solution for the above problem.
>>>>
>>>> Your Help for this would highly appreciated.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Nilshan and Arpan.
>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/JackRabbit_Clustering-tp22785285p22785285.html
>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>> http://www.nabble.com/file/p22798352/Cluster_1.xml Cluster_1.xml
>> http://www.nabble.com/file/p22798352/Cluster_1.xml Cluster_1.xml
>> -- 
>> View this message in context:
>> http://www.nabble.com/JackRabbit_Clustering-tp22785285p22798352.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/JackRabbit_Clustering-tp22785285p22801520.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message