[jboss-user] [JBoss Cache: Core Edition] - Jboss cache communication between web application and java a

narayana_1481 do-not-reply at jboss.com
Mon Mar 24 18:46:13 EDT 2008


Hi All ,
I am new to Jboss cache.
please let me explain you my scenario first.
I just need to know how the communication between a java application and web application happens ?? what exactly i need to configure in my machine.

My java application is like:
=---------------------------=
channelMap = Fqn.fromString("/Channel");
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration expected = parser.parseFile("\\properties\\replAsync-service.xml");
CacheSPI cache = (CacheSPI) new DefaultCacheFactory().createCache(expected);
cache.put(channelMap, key, value);

i placed the configuration xml file(replyAsync-service.xml) in my local machine C:\\properties\\

My web application is like:
=---------------------------=
channelMap = Fqn.fromString("/Channel");
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration expected = parser.parseFile("\\properties\\replAsync-service.xml");
CacheSPI cache = (CacheSPI) new DefaultCacheFactory().createCache(expected);
cache.get(channelMap, key);
Please assume, the above snippet is inside a servlet

i placed the configuration xml file(replyAsync-service.xml) in my local machine C:\\properties\\

main attributes in the configuration xml are like below ::

 <!-- REPL_SYNC

            false
-->



 
         
   
   <!-- <TCPPING initial_hosts="127.0.0.1[7800]"  start_port="50255"  -->
            <TCPPING initial_hosts="127.0.0.1[7800]" 
			 port_range="1" 
             timeout="3500" 
             num_initial_members="2" 
             up_thread="true" 
             down_thread="true"/> 
    <MERGE2 min_interval="5000" max_interval="10000"/> 
    <FD shun="true" timeout="2500" max_tries="5" up_thread="true" down_thread="true" /> 
    <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" /> 
    <pbcast.NAKACK down_thread="true" up_thread="true" gc_lag="100" retransmit_timeout="300,600,1200,2400,4800,9600" /> 
    <pbcast.STABLE desired_avg_gossip="20000" down_thread="false" up_thread="false" stability_delay="1500"/> 
    <pbcast.GMS join_timeout="5000" 
                join_retry_timeout="2000"
                shun="true" 
                print_local_addr="true" 
                down_thread="true" 
                up_thread="true"/> 
                 <pbcast.STATE_TRANSFER up_thread="true" down_thread="true" /> 
         

.. And it is giving me exception like ..
Address is invalid on local machine, or port is not valid on remote machine

... Please correct me if i m doing anything wrong...
Or please let me know step by step implementaion how to do that ...

Big thanks in advance...

Regards,
V.Narayana. 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138601#4138601

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138601



More information about the jboss-user mailing list