Hi all,

I'm developing a cluster environment in JBoss 4.0.2 and I'm getting the 
ClassCastException in my Servlet while doing the lookup and the code used for 
the lookup process is given below.


  | Properties p = new Properties();
  | 
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | p.put(Context.PROVIDER_URL, "jnp://localhost:1099"); 
  | Context context = new InitialContext(p);
  | ExampleSLHome exampleSLHome = (ExampleSLHome) 
context.lookup("ExampleSLHome");
  | System.out.println("ExampleSLHome ::: " + exampleSLHome);
  | System.out.println("ExampleSLHome Class ::: " + exampleSLHome.getClass());
the debug statement above is printing as 
ExampleSLHome ::: ExampleSLHomeHome
ExampleSLHome Class ::: $Proxy12

For your information I have modified these file to setup a cluster environment
        1) Database Configuration
                a) login-config.xml 
                b) standardjaws.xml 
                c) standardjbosscmp-jdbc.xml 
                d) oracle-ds.xml 

        2) Cluster Configuration
                a) cluster-examples-service.xml
                b) server.xml 
                c) farm-service.xml

        3) application specific properties
                a) jboss.xml

  | <session>
  |     <ejb-name>ExampleSLBean</ejb-name>
  |     <jndi-name>ExampleSLHome</jndi-name>
  |     <clustered>true</clustered>
  | </session>
  |     

And the same code is woking is a non clustered environment.
Do I need to make any other configuration for  JBoss  Clustering.

I'm not able to find the root cause of the problem.

Please help me.

Thank you

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

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


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to