JBoss Clustering problem

I am not sure if this issue belongs to this forum. If not, please let me know and I will post it in the appropriate forum.
My application has clustered remote SLSBs with "FirstAvaliable" policy.
The BMP Entity Beans are set for cache invalidation as they exist at local level only. They is no clustering of entity beans.
I am using Commit Option A.
I want cache to invalidate bean on all nodes except the node it was accessed from.
Here the cache is being cleared even on the node it was last accessed from.
I executed a business method on the same node (due to FirstAvailable) and here is the list of methods encountered.
setEntityContext
ejbFindByPrimaryKey
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
My expectation is that second and third time, in addition to my business method, only ejbLoad and ejbStore should be executed.
After info from guides and forum topics, I have configured as under :
cluster-service.xml
============
I am using the default behaviour of JBoss-Cluster based bridge
jboss.cache:service=InvalidationManager
${jboss.partition.name:DefaultPartition}
DefaultJGBridge
jboss:service=${jboss.partition.name:DefaultPartition}
jboss.cache:service=InvalidationManager
standardjboss.xml
============
Container Configuration is defined as under : (Commit Option is A)
<container-configuration>
<container-name>Standard BMP 2.x EntityBean with cache invalidation</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>false</insert-after-ejb-post-create>
<container-interceptors>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
org.jboss.ejb.plugins.LogInterceptor
org.jboss.ejb.plugins.SecurityInterceptor
org.jboss.ejb.plugins.TxInterceptorCMT
org.jboss.ejb.plugins.EntityCreationInterceptor
org.jboss.ejb.plugins.EntityLockInterceptor
org.jboss.ejb.plugins.EntityInstanceInterceptor
org.jboss.ejb.plugins.EntityReentranceInterceptor
org.jboss.resource.connectionmanager.CachedConnectionInterceptor
org.jboss.ejb.plugins.EntitySynchronizationInterceptor
org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
<instance-cache>org.jboss.ejb.plugins.InvalidableEntityInstanceCache</instance-cache>
<persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000000</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
100
</container-pool-conf>
<commit-option>A</commit-option>
</container-configuration>
jboss.xml
======
<?xml version="1.0"?>
<security-domain>java:/jaas/defaultLdap</security-domain>
<enterprise-beans>
<ejb-name>ejb/ApplicationService</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
True
<cluster-config>
<home-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</home-load-balance-policy>
<bean-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</bean-load-balance-policy>
</cluster-config>
<ejb-name>ejb/ApplicationEntity</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
<configuration-name>Standard BMP 2.x EntityBean with cache invalidation</configuration-name>
<cache-invalidation>True</cache-invalidation>
cache-invalidation.xml (No Change)
==============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- $Id: cache-invalidation-service.xml,v 1.4 2003/08/27 04:31:54 patriot1burke Exp $ -->
<!-- ===================================================================== -->
<!-- -->
<!-- Cache Invalidation Service -->
<!-- -->
<!-- ===================================================================== -->
<!--
Uncomment if you want to activate the cache invalidation mechanism accross
nodes using the JMS bridge
PropagationMode can be : IN_OUT = 1, IN_ONLY = 2, OUT_ONLY = 3
You can also set the ProviderUrl attribute to another IP:port setting if you
must lookup your JMS information in other JMS trees i.e.
MyOtherNode:1099
-->
<!--
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
jboss.cache:service=InvalidationManager
jboss.mq.destination:service=Topic,name=JMSCacheInvalidationBridge
jboss.cache:service=InvalidationManager
java:/ConnectionFactory
topic/JMSCacheInvalidationBridge
1
-->
Thanks.

hi ,
In this scenario u can use the load balancer instead of fail over clustering .
I would suggest u to create apache proxy for redirect the request for many jboss instance.
Rgds
kathir

Similar Messages

  • Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )

    Hi,
         We are running our flex application in jboss clustering environment with the help of Apache mod_jk(Apache Web server as front end with mod_ssl enabled). We are using the SecureAMFChannel as we deploy the application in SSL. We use the RemoteObject for communicating with Java.
    The Application is running fine when we have only one node of JBoss. But once we add one more node to the cluster the application throws the following exception .
    Duplicate HTTP-based FlexSession error: A request for FlexClient 'FDCA49A7-9317-4D8A-881F-9248B1136E7A' arrived over a new FlexSession 'C9C563B8266A03C2207C00796CD7DFF1', but FlexClient is already associated with  FlexSession '8A328320F5C530D55E94568996A1B552', therefore it cannot be associated with the new session.
    As I am maintaing the session in the server, I need to use the JBoss cluster for session replication. I heard that flex clustering is not needed as we have mod_jk and it will do all the stuff for us.
    I checked with simple application without any session data also then too I faced the same problem.
    After the very first login, I can see 2 session created simultaneously and destroyed. I checked the application whether it calls twice before the session is created, but it is calling only once.
    Also when application connects with server2 and if I down the server2 my flex application throws the error that the server is not found, It is not detecting the other server.But it works once I refresh the browser.
    Application Environment Details
    JBoss 6
    Blaze Ds 4.5
    Apache Web server 2.2.21
    Mod_JK   1.2.32
    Mod_SSL 2.8.31
    Thanks,
    Suresh T
    I enabled the sticky session in Mod_jk .
    It is working when the connection is not secure(http) in both apache web server and jboss web server ). But when the connection is https the above problem is happening .
    Message was edited by: suresh.thirumurugan

    Hi,
     Thanks for your info.
      It worked for me as well.
    Thanks,
    Prasad
    On 6/26/08,
    Matthieu Labour <
    [email protected]> wrote:
    A new message was posted by Matthieu Labour in
    Configuration and Getting Started Discussion --
      Problem with configuring BlazeDS with JBOSS
    You might want to download the following tutorial
    http://sebastien-arbogast.com/2008/04/10/flex-spring-and-blazeds-the-full-stack/
    it works on jboss
    Best
    Matt
    View/reply at
    Problem with configuring BlazeDS with JBOSS
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.

  • Using Microsoft Network Load Balancing for Livecycle ES 2/2.5 with JBoss clustering?

    Hi,
    Has anyone tried using Microsoft NLB for Livecycle with JBoss clustering and get it working? Able to login to livecycle's admin ui page with the NLB IP
    My enviroment:
    - 2 jboss application server (different IP address)
    - Horizontal clustered
    - LC ES2 installed on both servers
    For those who setup successfully, hope you can share your experience.
    Thank you.

    Thanks!
    Just a few more questions...hehehe
    In the document: Configuring LiveCycle ES2 Application Server Clusters Using JBoss.
    Page 35 item 3.4. Have you had to configure the Caching Locators? If yes, where did you put them, in only one machine or in all of the nodes?
    On page 29, iten 2.7 (Testing the JBoss Application Server cluster) says that for testing we can run the command specifying the server, in my case is:
    run.bat -c lc_sqlserver_cl -b <ipAddress>
    But in the Appendix C: Configuring JBoss as a Windows Service, it says: call run.bat -c all -b <ipAddress>
    So when should I start JBoss with "lc_sqlserver_cl" or "all" ?

  • Looking for an expert in Jboss Clustering

    Hello,
    If you are an expert in Jboss Clustering and are looking for a well
    paid consulting gig, please contact me via email:
    [email protected] . tks.

    A big thank you

  • Need urgent help regarding Adobe LC ES2 JBOSS Clustering

    Hi,
    Am trying to setup a Horizontal Cluster setup(with two nodes) for Adobe LiveCycle ES2 with Adobe preconfigured JBOSS 4.2.1 and MSSQL 2008(single instance running on one of the nodes).
    I have successfully completed till Installing LC ES2 Modules in both the nodes according to the "Configuring LiveCycle® ES2 Application Server Clusters Using JBoss" document.
    But now the problem is about the next step, which is "Configuring LiveCycle ES2 for Deployment". The steps in this section do not clearly talk about where to run the configuration manager tool, i mean on which node of the cluster as two nodes are different machines in my case as it is a horizontal cluster. But at step 20 of configuring LC ES2(page 45 of the above mentioned document) there's note which says "Note: You need to initialize the database against only one server of the cluster. Subsequent steps need to be performed on only this server as well."
    Now,
    i) Does it mean that till step 19 i will have to parallely run configuration manager tool on both the nodes of the cluster and at step 20 i will have to completely exit the configuration manager tool on one node(Say node A) and continue the rest of all the steps(till 46) only in the other node( node B ) ?
                                                                                    OR
    I will have to keep the configuration manager window open in both the machines and perform some steps say for example 20 to 25 only in one node(say node B ) and skip these steps in node A and resume from 26 in node A and complete till the end in both the machines ?
    ii) At step 16 of the same section theres a note which says "Note: The paths for pop3.jar and the JDK must be same on all nodes in the cluster.". Where will the pop3.jar be ? I cudn't find it anywhere in the installation media or in the server folders ?
    Please help me asap as am stuck with it for two days !!! Please let me know if you need any other details.

    Hi,
    Am trying to setup a Horizontal Cluster setup(with two nodes) for Adobe LiveCycle ES2 with Adobe preconfigured JBOSS 4.2.1 and MSSQL 2008(single instance running on one of the nodes).
    I have successfully completed till Installing LC ES2 Modules in both the nodes according to the "Configuring LiveCycle® ES2 Application Server Clusters Using JBoss" document.
    But now the problem is about the next step, which is "Configuring LiveCycle ES2 for Deployment". The steps in this section do not clearly talk about where to run the configuration manager tool, i mean on which node of the cluster as two nodes are different machines in my case as it is a horizontal cluster. But at step 20 of configuring LC ES2(page 45 of the above mentioned document) there's note which says "Note: You need to initialize the database against only one server of the cluster. Subsequent steps need to be performed on only this server as well."
    Now,
    i) Does it mean that till step 19 i will have to parallely run configuration manager tool on both the nodes of the cluster and at step 20 i will have to completely exit the configuration manager tool on one node(Say node A) and continue the rest of all the steps(till 46) only in the other node( node B ) ?
                                                                                    OR
    I will have to keep the configuration manager window open in both the machines and perform some steps say for example 20 to 25 only in one node(say node B ) and skip these steps in node A and resume from 26 in node A and complete till the end in both the machines ?
    ii) At step 16 of the same section theres a note which says "Note: The paths for pop3.jar and the JDK must be same on all nodes in the cluster.". Where will the pop3.jar be ? I cudn't find it anywhere in the installation media or in the server folders ?
    Please help me asap as am stuck with it for two days !!! Please let me know if you need any other details.

  • Clustering Problem

              Hi Guys ,
              How should scaling of Weblogic applications being accessed by t3 protocol to be
              done .
              Consider the following scenario :
              Weblogic server A hosts an application which in turn uses t3 protocol to contact
              applications hosting in Weblogic Server B. Web Client talks to Weblogic Server
              A using IIS Proxy dll. While scaling this set up we can Cluster applications running
              on Weblogic Server A .IIS Proxy dll is able to route the requests to Weblogic
              Server A clusters.
              How should the Weblogic Server B cluster setup to be done ?
              Any thoughts on this is welcome.
              Thanks & Regards,
              Kumar
              

              Actually architecture is such that we need to have Server B separately as it may
              host some common functionalities used by multiple applications . So we cannot
              merge those two. I am using iisproxy.dll to point to my cluster address for Server
              A (Comma separated address) and it is working fine.
              Now my Server B is being used by Server A (it is a configuration XML file) where
              we specify server B's IP and port number , use t3 protocol to contact Server B.
              I am not having a DNS Server to resolve the DNS Name to multiple IP addresses
              of cluster. So I am not sure as to how to specify the cluster address for Server
              B.
              Note: As we have an option of specifying comma separated IP address values in
              iisproxy.ini file . Is there any way to specify the cluster address for Server
              B.
              "Wenjin Zhang" <[email protected]> wrote:
              >
              >My suggestion is, add your server A to your cluster B. Your IIS proxy
              >plugin will
              >point to your cluster and you configure iisproxy.ini with your cluster
              >address.
              >You shouldn't have problem to use comma seperated address.
              >
              >
              >
              >"Kumar" <[email protected]> wrote:
              >>
              >>Thanks a lot.
              >>Firstly I may be having JSP/Servlets also in Server B.
              >>
              >>Secondly If I don't have an DNS Server to resolve the Cluster Address
              >>to multiple
              >>IP should I be using comma separated IP address as Cluster Address.
              >>
              >>Let me try further and get back to you.
              >>
              >>
              >>
              >>
              >>"Wenjin Zhang" <[email protected]> wrote:
              >>>
              >>>Simply speaking, if cluster B is used to host applications like your
              >>>EJB and JMS,
              >>>no special configuration on cluster B is required. The only thing you
              >>>need take
              >>>care is, cluster A should use cluster address of cluster B to contact
              >>>cluster
              >>>B. I am not sure if you also use B to host servlets/JSPs.
              >>>
              >>>
              >>>"Kumar" <[email protected]> wrote:
              >>>>
              >>>>Hi Guys ,
              >>>>
              >>>>How should scaling of Weblogic applications being accessed by t3 protocol
              >>>>to be
              >>>>done .
              >>>>
              >>>>Consider the following scenario :
              >>>>Weblogic server A hosts an application which in turn uses t3 protocol
              >>>>to contact
              >>>>applications hosting in Weblogic Server B. Web Client talks to Weblogic
              >>>>Server
              >>>>A using IIS Proxy dll. While scaling this set up we can Cluster applications
              >>>>running
              >>>>on Weblogic Server A .IIS Proxy dll is able to route the requests
              >to
              >>>>Weblogic
              >>>>Server A clusters.
              >>>>
              >>>>How should the Weblogic Server B cluster setup to be done ?
              >>>>
              >>>>Any thoughts on this is welcome.
              >>>>
              >>>>Thanks & Regards,
              >>>>Kumar
              >>>>
              >>>
              >>
              >
              

  • Mysql, Jboss connecting problem

    Hello,
    I am having problem with mysql database. I am trying to run AccountEJB application from SUN with mysql as my backend.
    PLEASE DO NOT FORGET I AM NOT EXPERT IN JBOSS OR EJB BUT I AM TRYING TO LEAN WITH A EXAMPLE.
    HERE IS MY SETUP UP TO THIS POINT.
    I am running jboss-3.03.0_tomcat-4.0.3
    I am including
    1. AccountBean
    2. ejb-jar.xml
    3. web.xml
    4. jboss.xml
    6. mysql-service.xml ( I add my database name, username, password and i copy it to ..server/default/deploy dir.)
    I only modified mysql-service.xml. Do i have to modify any other jboss files. Some people are saying i have to modify "standardjaws.xml, standardjbosscmp.xml"
    My AccountBean code is
    Please take a look at "setEntityContext" and "makeConnection" that is where problem comes.
    Here is the error
    10:43:19,950 INFO [Engine] AccountServlet: init
    10:43:19,950 INFO [STDOUT] AccountServlet: init()
    10:43:20,101 INFO [STDOUT] Got context
    10:43:20,311 INFO [STDOUT] Got referance
    10:43:20,371 INFO [STDOUT] Got referance to home object
    10:43:20,501 INFO [STDOUT] setEntityContext call....
    10:43:20,501 INFO [STDOUT] makeConnection call...
    10:43:20,501 INFO [STDOUT] Something went wrong within makeConnction call ....
    javax.naming.NameNotFoundException: MySqlDS not bound
    10:43:20,501 INFO [STDOUT] Came back from makeConnction call ...
    10:43:20,501 INFO [STDOUT] ejbCreate call
    10:43:20,501 INFO [STDOUT] insertRow call...
    10:43:20,511 ERROR [STDERR] Caught an exception.
    10:43:20,511 ERROR [STDERR] java.rmi.ServerException: ejbCreate: null; nested ex
    ception is:
    javax.ejb.EJBException: ejbCreate: null
    package com.ps.impl;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import java.sql.*;
    import javax.sql.*;
    import javax.ejb.*;
    import javax.naming.*;
    import java.util.*;
    import java.rmi.*;
    public class AccountBean implements EntityBean
    private EntityContext context;
    private String id;
    private String firstName;
    private String lastName;
    private double balance;
    private Connection con;
    //private String dbName = "java:/MySqlDS";
    public void debit (double amount)
    if (balance - amount < 0)
    else
    balance = balance - amount;
    public void credit (double amount)
    balance = balance + amount;
    public String getFirstName()
    return firstName;
    public String getLastName()
    return lastName;
    public double getBalance()
    return balance;
    public String ejbCreate(String id, String firstName, String lastName, double balance)
    throws CreateException
    System.out.println("ejbCreate call");
    if (balance < 0.00) {
    throw new CreateException
    ("A negative initial balance is not allowed.");
    try {
    insertRow(id, firstName, lastName, balance);
    } catch (Exception ex) {
    throw new EJBException("ejbCreate: " +
    ex.getMessage());
    this.id = id;
    this.firstName = firstName;
    this.lastName = lastName;
    this.balance = balance;
    return id;
    public void ejbPostCreate(String id, String firstname, String lastname, double blance)
    public String ejbFindByPrimaryKey(String primaryKey)
    throws FinderException
    System.out.println("ejbFindPrimaryKey call...");
    boolean result;
    try {
    result = selectByPrimaryKey(primaryKey);
    } catch (Exception ex) {
    throw new EJBException("ejbFindByPrimaryKey: " +
    ex.getMessage());
    if (result) {
    return primaryKey;
    else {
    throw new ObjectNotFoundException
    ("Row for id " + primaryKey + " not found.");
    public Collection ejbFindByLastName(String lastName)
    throws FinderException
    System.out.println("ejbFindByLastName call...");
    Collection result;
    try {
    result = selectByLastName(lastName);
    } catch (Exception ex) {
    throw new EJBException("ejbFindByLastName " +
    ex.getMessage());
    if (result.isEmpty()) {
    throw new ObjectNotFoundException("No rows found.");
    else {
    return result;
    public Collection ejbFindInRange(double low, double high)
    throws FinderException
    System.out.println("ejbFindRange call ....");
    Collection result;
    try {
    result = selectInRange(low, high);
    } catch (Exception ex) {
    throw new EJBException("ejbFindInRange: " +
    ex.getMessage());
    if (result.isEmpty()) {
    throw new ObjectNotFoundException("No rows found.");
    else {
    return result;
    public void ejbActivate()
    System.out.println("ejbActivate call ...");
    id = (String)context.getPrimaryKey();
    public void ejbLoad()
    System.out.println("ejbLoad call ...");
    try {
    loadRow();
    } catch (Exception ex) {
    throw new EJBException("ejbLoad: " +
    ex.getMessage());
    public void ejbPassivate()
    id = null;
    public void ejbRemove()
    System.out.println("ebjRemove call ...");
    try {
    deleteRow(id);
    } catch (Exception ex) {
    throw new EJBException("ejbRemove: " +
    ex.getMessage());
    public void ejbStore()
    System.out.println("ejbStore call ...");
    try {
    storeRow();
    } catch (Exception ex) {
    throw new EJBException("ejbLoad: " +
    ex.getMessage());
    public void setEntityContext(EntityContext context)
    this.context = context;
    System.out.println("setEntityContext call....");
    try {
    makeConnection();
    System.out.println("Came back from makeConnction call ...");
    } catch (Exception ex) {
    throw new EJBException("Unable to connect to database " +
    ex.getMessage());
    public void unsetEntityContext()
    System.out.println("unsetEntityContext call ...");
    try {
    con.close();
    } catch (SQLException ex) {
    throw new EJBException("unsetEntityContext: " + ex.getMessage());
    /*********************** Database Routines *************************/
    private void makeConnection() throws NamingException, SQLException
    System.out.println("makeConnection call...");
    try
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("java:/MySqlDS");
    con = ds.getConnection();
    catch (Exception ex)
    System.out.println("Something went wrong within makeConnction call .... " + ex);
    private void insertRow (String id, String firstName, String lastName,
    double balance) throws SQLException {
    System.out.println("insertRow call...");
    String insertStatement =
    "insert into account values ( ? , ? , ? , ? )";
    PreparedStatement prepStmt =
    con.prepareStatement(insertStatement);
    prepStmt.setString(1, id);
    prepStmt.setString(2, firstName);
    prepStmt.setString(3, lastName);
    prepStmt.setDouble(4, balance);
    prepStmt.executeUpdate();
    prepStmt.close();
    private void deleteRow(String id) throws SQLException {
    System.out.println("deleteRow call ...");
    String deleteStatement =
    "delete from account where id = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(deleteStatement);
    prepStmt.setString(1, id);
    prepStmt.executeUpdate();
    prepStmt.close();
    private boolean selectByPrimaryKey(String primaryKey)
    throws SQLException {
    System.out.println("selectByPrimaryKey call...");
    String selectStatement =
    "select id " +
    "from account where id = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setString(1, primaryKey);
    ResultSet rs = prepStmt.executeQuery();
    boolean result = rs.next();
    prepStmt.close();
    return result;
    private Collection selectByLastName(String lastName)
    throws SQLException {
    System.out.println("selectByLastName call...");
    String selectStatement =
    "select id " +
    "from account where lastname = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setString(1, lastName);
    ResultSet rs = prepStmt.executeQuery();
    ArrayList a = new ArrayList();
    while (rs.next()) {
    String id = rs.getString(1);
    a.add(id);
    prepStmt.close();
    return a;
    private Collection selectInRange(double low, double high)
    throws SQLException {
    System.out.println("selectInRange call ....");
    String selectStatement =
    "select id from account " +
    "where balance between ? and ?";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setDouble(1, low);
    prepStmt.setDouble(2, high);
    ResultSet rs = prepStmt.executeQuery();
    ArrayList a = new ArrayList();
    while (rs.next()) {
    String id = rs.getString(1);
    a.add(id);
    prepStmt.close();
    return a;
    private void loadRow() throws SQLException {
    System.out.println("loadRow call ....");
    String selectStatement =
    "select firstname, lastname, balance " +
    "from account where id = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setString(1, this.id);
    ResultSet rs = prepStmt.executeQuery();
    if (rs.next()) {
    this.firstName = rs.getString(1);
    this.lastName = rs.getString(2);
    this.balance = rs.getDouble(3);
    prepStmt.close();
    else {
    prepStmt.close();
    throw new NoSuchEntityException("Row for id " + id +
    " not found in database.");
    private void storeRow() throws SQLException {
    System.out.println("storeRow call ...");
    String updateStatement =
    "update account set firstname = ? ," +
    "lastname = ? , balance = ? " +
    "where id = ?";
    PreparedStatement prepStmt =
    con.prepareStatement(updateStatement);
    prepStmt.setString(1, firstName);
    prepStmt.setString(2, lastName);
    prepStmt.setDouble(3, balance);
    prepStmt.setString(4, id);
    int rowCount = prepStmt.executeUpdate();
    prepStmt.close();
    if (rowCount == 0) {
    throw new EJBException("Storing row for id " + id + " failed.");
    2. ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <description>Entity Bean ( BMP )</description>
    <display-name>Account</display-name>
    <ejb-name>Account</ejb-name>
    <home>com.ps.AccountHome</home>
    <remote>com.ps.Account</remote>
    <ejb-class>com.ps.impl.AccountBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    3. web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <servlet>
    <servlet-name>AccountServlet</servlet-name>
    <servlet-class>com.ps.AccountServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>AccountServlet</servlet-name>
    <url-pattern>/accountservlet</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    4. jboss.xml (i am not sure this is righ maybe this is the problem)
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
    <jboss>
    <resource-managers>
    <resource-manager res-class="">
    <res-name>MySqlDS</res-name>
    <res-jndi-name>java:/MySqlDS</res-jndi-name>
    </resource-manager>
    </resource-managers>
    </jboss>
    5. mysql-service.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- ===================================================================== -->
    <!-- -->
    <!-- JBoss Server Configuration -->
    <!-- -->
    <!-- ===================================================================== -->
    <server>
    <!-- ==================================================================== -->
    <!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
    <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
    <!-- ==================================================================== -->
    <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=MySqlDS">
    <!-- Include a login module configuration named MySqlDbRealm.
    Update your login-conf.xml, here is an example for a
    ConfiguredIdentityLoginModule:
    <application-policy name = "MySqlDbRealm">
    <authentication>
    <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
    <module-option name = "principal">yourprincipal</module-option>
    <module-option name = "userName">yourusername</module-option>
    <module-option name = "password">yourpassword</module-option>
    <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
    </login-module>
    </authentication>
    </application-policy>
    NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
    module-option name = "managedConnectionFactoryName"
    must match the object name of the ConnectionManager you are configuring here.
    -->
    <!--uncomment out this line if you are using the MySqlDbRealm above
    <attribute name="SecurityDomainJndiName">MySqlDbRealm</attribute>
    -->
    <depends optional-attribute-name="ManagedConnectionFactoryName">
    <!--embedded mbean-->
    <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=MySqlDS">
    <attribute name="JndiName">MySqlDS</attribute>
    <attribute name="ManagedConnectionFactoryProperties">
    <properties>
    <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/pac</config-property>
    <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
    <!--set these only if you want only default logins, not through JAAS -->
    <config-property name="UserName" type="java.lang.String">t100</config-property>
    <config-property name="Password" type="java.lang.String">t200</config-property>
    </properties>
    </attribute>
    <!--Below here are advanced properties -->
    <!--hack-->
    <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
    </mbean>
    </depends>
    <depends optional-attribute-name="ManagedConnectionPool">
    <!--embedded mbean-->
    <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=MySqlDS">
    <attribute name="MinSize">0</attribute>
    <attribute name="MaxSize">50</attribute>
    <attribute name="BlockingTimeoutMillis">5000</attribute>
    <attribute name="IdleTimeoutMinutes">15</attribute>
    <!--criteria indicates if Subject (from security domain) or app supplied
    parameters (such as from getConnection(user, pw)) are used to distinguish
    connections in the pool. Choices are
    ByContainerAndApplication (use both),
    ByContainer (use Subject),
    ByApplication (use app supplied params only),
    ByNothing (all connections are equivalent, usually if adapter supports
    reauthentication)-->
    <attribute name="Criteria">ByContainer</attribute>
    </mbean>
    </depends>
    <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
    <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>
    <attribute name="TransactionManager">java:/TransactionManager</attribute>
    <!--make the rar deploy! hack till better deployment-->
    <depends>jboss.jca:service=RARDeployer</depends>
    </mbean>
    </server>

    In /JBoss/server/default/conf/standardjaws.xml.
    Set
    <datasource>java:/mySqlDS</datasource>
    <type-mapping>mySql</type-mapping>
    In /JBoss/server/default/conf/standardjbosscmp-jdbc.xml.
    Set
    <defaults>
    <datasource>java:/mySqlDS</datasource>
    <datasource-mapping>mySql</datasource-mapping></defaults>

  • Clustering Problem on WLS 5.1 sp 2/3

    I've set up a multihomed machine running four instances of WLS 5.1 sp2 on
              solaris 7. When I initially added them to a cluster and tested them for
              serving JSPs everything seemed fine. I've since tried deploying an EJB
              (which works in a non clustered server) and I'm suddenly getting the
              following errors:
              stdout:
              ... <E> <MutlicastSocket> Multicast socket receive error:
              java.lang.runtimeException: I/O error opening JAR file from
              file:/export/home0/weblogic/cluster1/serverclasses
              stderr:
              java.util.zip.ZipException: error in opening zip file
              at java.util.zip.ZipFile.open(Native Method)
              at java.util.zip.ZipFile.open(Compiled Code)
              at java.util.zip.ZipFile.<init>(Compiled Code)
              at java.util.zip.ZipFile.<init>(Compiled Code)
              at
              weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java:141)
              at
              weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
              .java:74)
              at weblogic.cluster.AnnotatedServiceOffer.readObject(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(Comp
              iled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readLeftover(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(Compiled
              Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObject(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readArrayList(Compiled
              Code)
              at weblogic.cluster.Announcement.readObject(Announcement.java:73)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(Comp
              iled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readLeftover(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(Compiled
              Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObject(Compiled Code)
              at
              weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(Compiled Code)
              at weblogic.cluster.TMSocket.execute(Compiled Code)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              (My EJB is deployed it its expanded directory form, which worked in a single
              server, this error happens repeatedly, regardless of accessing the EJB. The
              weblogic log says that the EJB deployed successfully)
              I've also tried upgrading to sp3, now it cannot even serve jsps, I get the
              following error:
              Wed Jun 14 10:36:06 GMT+01:00 2000:<I> <ServletContext-General> file: init
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: init
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              verbose initialized to: true
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              compileCommand initialized to: /usr/java1.2/bin/javac
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              superclass initialized to null
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              workingDir initialized to: /export/home0/weblogic/cluster1/classfiles
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp: param
              pageCheckSeconds initialized to: 1
              Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              initialization complete
              Wed Jun 14 10:36:24 GMT+01:00 2000:<E> <ServletContext-General> Servlet
              failed with Exception
              java.lang.NullPointerException
              at
              weblogic.servlet.internal.session.ReplicatedSession.setMaxInactiveInterval(R
              eplicatedSession.java:339)
              at
              weblogic.servlet.internal.session.SessionContext.getNewSessionInstance(Sessi
              onContext.java:322)
              at
              weblogic.servlet.internal.ServletRequestImpl.getNewSession(ServletRequestImp
              l.java:1104)
              at
              weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
              ava:1007)
              at
              weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
              ava:981)
              at
              weblogic.servlet.jsp.PageContextImpl.initialize(PageContextImpl.java:47)
              at
              weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:64)
              at
              weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:31)
              at jsp_servlet.simpleSession._jspService(simpleSession.java:64)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :123)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :141)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              Thanks in advance, tell me if you need more info
              Loz (ECsoft/MyNet)
              

    I got that working. Never mind.
              Amit Bhutra <[email protected]> wrote in message
              news:[email protected]...
              > I am getting same error. How did you resolved it?
              > Weblogic creates a jar file in mycluster/tmp_deployment directory.
              >
              > Do i need to include this jar file in my weblogic.properties?
              >
              > Loz <[email protected]> wrote in message
              > news:[email protected]...
              > > OK, I got rid of the EJB problem by deploying as a jar, how about the
              sp3
              > > problem?
              > >
              > > Loz
              > >
              > > "Loz" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > I've set up a multihomed machine running four instances of WLS 5.1 sp2
              > on
              > > > solaris 7. When I initially added them to a cluster and tested them
              for
              > > > serving JSPs everything seemed fine. I've since tried deploying an EJB
              > > > (which works in a non clustered server) and I'm suddenly getting the
              > > > following errors:
              > > >
              > > > stdout:
              > > > ... <E> <MutlicastSocket> Multicast socket receive error:
              > > > java.lang.runtimeException: I/O error opening JAR file from
              > > > file:/export/home0/weblogic/cluster1/serverclasses
              > > >
              > > > stderr:
              > > > java.util.zip.ZipException: error in opening zip file
              > > > at java.util.zip.ZipFile.open(Native Method)
              > > > at java.util.zip.ZipFile.open(Compiled Code)
              > > > at java.util.zip.ZipFile.<init>(Compiled Code)
              > > > at java.util.zip.ZipFile.<init>(Compiled Code)
              > > > at
              > > > weblogic.boot.ServerClassLoader.deploy(ServerClassLoader.java:141)
              > > > at
              > > >
              > >
              >
              weblogic.cluster.AnnotatedServiceOffer.expandClassPath(AnnotatedServiceOffer
              > > > .java:74)
              > > > at weblogic.cluster.AnnotatedServiceOffer.readObject(Compiled
              > > Code)
              > > > at
              > > >
              > >
              >
              weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(Comp
              > > > iled Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readLeftover(Compiled
              > > Code)
              > > > at
              > > >
              weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(Compiled
              > > > Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readObject(Compiled
              > Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(Compiled
              > > Code)
              > > > at
              > > >
              weblogic.common.internal.WLObjectInputStreamBase.readArrayList(Compiled
              > > > Code)
              > > > at
              > weblogic.cluster.Announcement.readObject(Announcement.java:73)
              > > > at
              > > >
              > >
              >
              weblogic.common.internal.WLObjectInputStreamBase.readPublicSerializable(Comp
              > > > iled Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readLeftover(Compiled
              > > Code)
              > > > at
              > > >
              weblogic.common.internal.WLObjectInputStreamBase.readObjectBody(Compiled
              > > > Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readObject(Compiled
              > Code)
              > > > at
              > > > weblogic.common.internal.WLObjectInputStreamBase.readObjectWL(Compiled
              > > Code)
              > > > at weblogic.cluster.TMSocket.execute(Compiled Code)
              > > > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              > > >
              > > > (My EJB is deployed it its expanded directory form, which worked in a
              > > single
              > > > server, this error happens repeatedly, regardless of accessing the
              EJB.
              > > The
              > > > weblogic log says that the EJB deployed successfully)
              > > >
              > > > I've also tried upgrading to sp3, now it cannot even serve jsps, I get
              > the
              > > > following error:
              > > >
              > > > Wed Jun 14 10:36:06 GMT+01:00 2000:<I> <ServletContext-General> file:
              > init
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > init
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > verbose initialized to: true
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > packagePrefix initialized to: jsp_servlet
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > compileCommand initialized to: /usr/java1.2/bin/javac
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > srcCompiler initialized to weblogic.jspc
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > superclass initialized to null
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > workingDir initialized to: /export/home0/weblogic/cluster1/classfiles
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > param
              > > > pageCheckSeconds initialized to: 1
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<I> <ServletContext-General> *.jsp:
              > > > initialization complete
              > > > Wed Jun 14 10:36:24 GMT+01:00 2000:<E> <ServletContext-General>
              Servlet
              > > > failed with Exception
              > > > java.lang.NullPointerException
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.session.ReplicatedSession.setMaxInactiveInterval(R
              > > > eplicatedSession.java:339)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.session.SessionContext.getNewSessionInstance(Sessi
              > > > onContext.java:322)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletRequestImpl.getNewSession(ServletRequestImp
              > > > l.java:1104)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
              > > > ava:1007)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletRequestImpl.getSession(ServletRequestImpl.j
              > > > ava:981)
              > > > at
              > > >
              weblogic.servlet.jsp.PageContextImpl.initialize(PageContextImpl.java:47)
              > > > at
              > > > weblogic.servlet.jsp.PageContextImpl.<init>(PageContextImpl.java:64)
              > > > at
              > > >
              > weblogic.servlet.jsp.JspFactoryImpl.getPageContext(JspFactoryImpl.java:31)
              > > > at
              jsp_servlet.simpleSession._jspService(simpleSession.java:64)
              > > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > > > :123)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > > > :141)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > > l.java:744)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > > l.java:692)
              > > > at
              > > >
              > >
              >
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              > > > Manager.java:251)
              > > > at
              > > >
              > >
              >
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > > > at
              > > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > > > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              > > >
              > > > Thanks in advance, tell me if you need more info
              > > >
              > > > Loz (ECsoft/MyNet)
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Clustering problems and load balancing question

              I am using Weblogic 6.1. My Windows NT environment consists of 10 web client-simulator
              machines, 2 App. Server machines and one database server machine. I have defined
              one cluster on each app. server. Each cluster is running 3 Weblogic instances, or
              so it should be when I fix my problems!
              My questions/problems are the following:
              1. Can I use a software dispatcher to perform workload balancing between the 2 weblogic
              clusters? That is, the client-simulator machines send the requests to the software
              dispatcher which performs workload balancing between the 2 Weblogic clusters. The
              clusters perform round-robin amongst all instances. Note that the documentation only
              talks about Hardware Balancing.
              2. I am having problems with my multicast IP addresses. For instance, on one App.
              Server machine, I am using the multicast IP address: 239.0.0.1 for MyCluster. When
              I start the Admin Server, I get a JDBC error: "... multicast socket error: Request
              Time Out". I have used the utils.MulticastTest utility which shows the packets not
              being received:
              I (S1) sent message num 1
              I (S1) sent message num 2
              I (S1) sent message num 3
              I (S1) sent message num 4
              What am I doing wrong?
              3. Re. the cluster configuration:
              NOTE: I have executed my workload using 2 independent App. Server machines with a
              software dispatcher - no clustering. Each App. Server used a jdbc connection pool
              of 84 database connections. The db connections happened to become my bottleneck.
              When I tried to increase the number of connections in the jdbc pool, throughput decreased
              dramatically. Thus, I decided to add a cluster of Weblogic instances to each one
              of my 8 x 900Mhz machines in order to scale up. Unfortunatly, adding clusters have
              not been that simple a task - probably because I am totally new to the Web Application
              Server world!
              Here is what I've got so far:
              I have obtained 3 static IP addresses for the 3 instances of Weblogic instances that
              I wish to run within the cluster. All servers in the cluster use port number 80.
              There is a corresponding DNS entry for each IP address. My base assumption is that
              one of these instances will double up as the Administration Server... Is it true,
              or do I need to define a separate Admin server if I wish to run 3 Weblogic instances
              (each with a connection pool of 84 database connections for a total of 252 database
              connections)?
              Do I need to re-deploy my applications for the cluster? And if so, would this explain
              why I am having problem starting my Admin Server?
              I think this is it for now. Any help will be greatly appreciated!
              Thanks in advance,
              Guylaine.
              

              Guylaine Cantin wrote:
              > I am using Weblogic 6.1. My Windows NT environment consists of 10 web client-simulator
              > machines, 2 App. Server machines and one database server machine. I have defined
              > one cluster on each app. server. Each cluster is running 3 Weblogic instances, or
              > so it should be when I fix my problems!
              >
              > My questions/problems are the following:
              >
              > 1. Can I use a software dispatcher to perform workload balancing between the 2 weblogic
              > clusters? That is, the client-simulator machines send the requests to the software
              > dispatcher which performs workload balancing between the 2 Weblogic clusters. The
              > clusters perform round-robin amongst all instances. Note that the documentation only
              > talks about Hardware Balancing.
              >
              We also support software load balancers (for e.g. resonate)
              The software dispatcher should be intelligent enough to decode the
              cookie and route the request to the appropriate servers. This is
              necessary to maintain sticky load balancing.
              > 2. I am having problems with my multicast IP addresses. For instance, on one App.
              > Server machine, I am using the multicast IP address: 239.0.0.1 for MyCluster. When
              > I start the Admin Server, I get a JDBC error: "... multicast socket error: Request
              > Time Out". I have used the utils.MulticastTest utility which shows the packets not
              > being received:
              >
              > I (S1) sent message num 1
              > I (S1) sent message num 2
              > I (S1) sent message num 3
              > I (S1) sent message num 4
              > ...
              >
              > What am I doing wrong?
              >
              You should run the above utility from multiple windows and see if each
              of them being recognized or not.
              i.e. java utils.MulticastTest -N S1 -A 239.0.0.1
              java utils.MulticastTest -N S1 -A 239.0.0.1
              > 3. Re. the cluster configuration:
              >
              > NOTE: I have executed my workload using 2 independent App. Server machines with a
              > software dispatcher - no clustering. Each App. Server used a jdbc connection pool
              > of 84 database connections. The db connections happened to become my bottleneck.
              > When I tried to increase the number of connections in the jdbc pool, throughput decreased
              > dramatically. Thus, I decided to add a cluster of Weblogic instances to each one
              > of my 8 x 900Mhz machines in order to scale up. Unfortunatly, adding clusters have
              > not been that simple a task - probably because I am totally new to the Web Application
              > Server world!
              >
              You have to stress test your application several times and set
              maxCapacity of the conn pool accordingly.
              > Here is what I've got so far:
              >
              > I have obtained 3 static IP addresses for the 3 instances of Weblogic instances that
              > I wish to run within the cluster. All servers in the cluster use port number 80.
              > There is a corresponding DNS entry for each IP address. My base assumption is that
              > one of these instances will double up as the Administration Server... Is it true,
              > or do I need to define a separate Admin server if I wish to run 3 Weblogic instances
              > (each with a connection pool of 84 database connections for a total of 252 database
              > connections)?
              BEA recommends to use Admin server for administrative tasks only
              like configuring new deployments, jdbc conn pools, adding users etc..
              It's not a good idea to have admin server part of cluster.
              >
              > Do I need to re-deploy my applications for the cluster? And if so, would this explain
              > why I am having problem starting my Admin Server?
              >
              You have to target all your apps to the Cluster.
              > I think this is it for now. Any help will be greatly appreciated!
              >
              > Thanks in advance,
              >
              > Guylaine.
              >
              

  • Communication between Clusters Problem

    Hi all
              1. Is it possible for a bean, being hosted in a cluster to call a bean which is hosted in another cluster?
              We have a problem with the role information, which gets wrong at every second call.
              We have the following setup:
              - A cluster called "web-cluster" consists of two machines with one weblogic 9.2 server per machine.
              - We have another cluster called "ID-Cluster" with the same setup (2 Machines, 2 WLS).
              - In the "Web-Cluster" we have a bean deployed called "SecurityProxy".
              - In the "Web-Cluster" we have a Web-Application ("WebApp") deployed which use the "SecurityProxy"
              - In the ID-Cluster we have a Bean called "SecurityBean". - The SecurityProxy makes a login to the ID-Cluster with a technical user, role "techSecurityProxy".
              - Calls from SecurityProxy to SecurityBean alternate with each call.
              Problem:
              User logs in to the "WebApp" and gets role "customer" associated.
              First call from SecurityProxy to SecurityBean: call is done with the correct role "techSecurityProxy" second call is done with the role "customer" !?! It seams as if the security context gets propageted...
              We have no trust defined between the clusters and we have no runas configured in den deployment descriptors. Can anyone help?

    <p>Frank, the security context is propagted between the JVM's. I have asked BEA support to specify if this can be configured or turned off to resolve another issue I have but to date I have not had a response.</p>
              <p>In your case can you not add the new principle like -useProxy to authenticated users which allows them to use the proxy once they are authenticated?</p>
              <p>
              Hussein Badakhchani
              London Middleware
              </p>

  • JBoss install problem - nothing is installed

    Hello,
    I have installed aur/jboss package
    aur/jboss 5.1.0.GA-1 [installed] (53)
    JBoss Application Server
    But there is no /opt/jboss directory, no service added, nothing. When I try to uninstall it, it says:
    Packages (1): jboss-5.1.0.GA-1
    Total Removed Size: 0,00 MiB
    zip file with jboss is installed correctly, all additional files (build, service..) are too.
    What is the problem with this process ?

    Moving to AUR Issues...

  • Multi-tiers clustering problem: NameNotFoundException

    Hi All
              I am trying multi-tier clustering when I encounter an unexpected naming
              exception. Following is the scenario.
              1) There are two clusters: [webcluster] and [servercluster]. They are
              in the same administration domain.
              2) Each of them has only one server: [cscweb] and [cscserver].
              3) Cluster addresses are [node177.truetel.com.tw:7001] and
              [node177.truetel.com.tw:7003] respectively.
              4) war files are deployed to [webcluster] while ejb jars are
              deployed to [servercluster], supposedly.
              My problem is that, if all the war files and jar files are deployed on
              BOTH clusters, then the application runs smoothly. However,
              if they are deployed as in step 4, then the unexpected
              javax.naming.NameNotFoundException will be thrown.
              If I also deployed SOME of the ejb jars to the [webcluster], then the
              application can run until it fails to locate the ejbs not deployed on
              the [webcluster]. A javax.naming.NameNotFoundException will be
              thrown then.
              It seems to be a JNDI problem where ejbs not in the same cluster
              could not be located. Can this be fixed?
              Any help will be appreciated,
              Lynch
              

    Hi All
              I am trying multi-tier clustering when I encounter an unexpected naming
              exception. Following is the scenario.
              1) There are two clusters: [webcluster] and [servercluster]. They are
              in the same administration domain.
              2) Each of them has only one server: [cscweb] and [cscserver].
              3) Cluster addresses are [node177.truetel.com.tw:7001] and
              [node177.truetel.com.tw:7003] respectively.
              4) war files are deployed to [webcluster] while ejb jars are
              deployed to [servercluster], supposedly.
              My problem is that, if all the war files and jar files are deployed on
              BOTH clusters, then the application runs smoothly. However,
              if they are deployed as in step 4, then the unexpected
              javax.naming.NameNotFoundException will be thrown.
              If I also deployed SOME of the ejb jars to the [webcluster], then the
              application can run until it fails to locate the ejbs not deployed on
              the [webcluster]. A javax.naming.NameNotFoundException will be
              thrown then.
              It seems to be a JNDI problem where ejbs not in the same cluster
              could not be located. Can this be fixed?
              Any help will be appreciated,
              Lynch
              

  • Weblogic Clustering Problem

    Hi,
    I am tring to set up clustering on my laptop(Windows XP home OS) using Medrec Tutorials for Weblogic SP4.Its giving me SocketException.Same had worked when tried on Win2000 OS.I tried with SP2 also but its giving the same exception.
    Please let me know if anyone encountered similar pbm and resolved it.Thanks in advance.
    Please find the log below:
    <Jul 29, 2006 11:22:01 PM IST> <Notice> <WebLogicServer> <BEA-000328> <Starting WebLogic Managed Server "MedRec2" for domain "clusterdomain">
    <Jul 29, 2006 11:22:03 PM IST> <Error> <Cluster> <BEA-000116> <Failed to join cluster MedRecCluster at address 230.0.0.1 due to: java.net.SocketException: error setting options.
    java.net.SocketException: error setting options
    at java.net.PlainDatagramSocketImpl.join(Native Method)
    at java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:134)
    at java.net.MulticastSocket.joinGroup(MulticastSocket.java:274)
    at weblogic.cluster.FragmentSocket.initializeMulticastSocket(FragmentSocket.java:92)
    at weblogic.cluster.FragmentSocket.start(FragmentSocket.java:109)
    at weblogic.cluster.MulticastManager.startListening(MulticastManager.java:172)
    at weblogic.cluster.ClusterCommunicationService.initialize(ClusterCommunicationService.java:43)
    at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:924)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:670)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:344)
    at weblogic.Server.main(Server.java:32)
    >
    <Jul 29, 2006 11:22:03 PM IST> <Critical> <WebLogicServer> <BEA-000364> <Server failed during initialization. Exception:weblogic.server.ServerLifecycleException: Failed to listen on multicast address
    weblogic.server.ServerLifecycleException: Failed to listen on multicast address
    at weblogic.cluster.ClusterCommunicationService.initialize(ClusterCommunicationService.java:48)
    at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:924)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:670)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:344)
    at weblogic.Server.main(Server.java:32)
    Caused by: java.net.SocketException: error setting options
    at java.net.PlainDatagramSocketImpl.join(Native Method)
    at java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:134)
    at java.net.MulticastSocket.joinGroup(MulticastSocket.java:274)
    at weblogic.cluster.FragmentSocket.initializeMulticastSocket(FragmentSocket.java:92)
    at weblogic.cluster.FragmentSocket.start(FragmentSocket.java:109)
    at weblogic.cluster.MulticastManager.startListening(MulticastManager.java:172)
    at weblogic.cluster.ClusterCommunicationService.initialize(ClusterCommunicationService.java:43)
    ... 4 more
    >
    <Jul 29, 2006 11:22:03 PM IST> <Emergency> <WebLogicServer> <BEA-000342> <Unable to initialize the server: weblogic.server.ServerLifecycleException: Failed to listen on multicast addresserror setting options>
    The WebLogic Server did not start up properly.
    Exception raised: 'java.net.SocketException: error setting options'
    Reason: weblogic.server.ServerLifecycleException: Failed to listen on multicast addresserror setting options
    Thanks
    Raju

    Hi,
    Actually i tried with Weblogic 8.1 sp2 and sp4 but same problem.I just tried setting up clusters on Windows 2000 it works fine.Seems to be a problem with windows XP home.
    Any idea if same problem occurs with Win XP professional?
    Anyway thanx for the reply.
    Thanks
    Raju

  • JBoss Log4J problem

    Hi all,
    Although Log4J is not exactly about Java, but it is kind of related, so please don't mind me posting this message.
    I am having problems stoping JBoss from reloading the log4j.properties file. Is there anyway to stop it from polling the log4j.properties file every now and then..
    Thx for your help
    Kevin

    Look at ${JBOSS_HOME}/server/default/jboss-service.xml. It has a section with the following code:
       <mbean code="org.jboss.logging.Log4jService"
          name="jboss.system:type=Log4jService,service=Logging">
          <attribute name="ConfigurationURL">resource:log4j.xml</attribute>
          <attribute name="Log4jQuietMode">true</attribute>
          <!-- How frequently in seconds the ConfigurationURL is checked for changes -->
          <attribute name="RefreshPeriod">60</attribute>
       </mbean>You could try setting the refresh periode to 0, but I don't know to what kind of behaviour that will result in.

  • JBoss authentication problem

    Hi all
    i am using jboss - UsernamepasswordLoginModule for username and password authentication. I want to know the way to restrict users after 3 bad logins.
    if user uses wrong password for three times successively then something should happen like he should not be able to login for next 30 minutes.
    It can be done in weblogic, but how to do it in jboss?
    thanx in advance.

    thanx but its not specified thereDid you read this part?:
    How do I configure security with JBoss ?
    JBoss uses JAAS for security. JBoss includes several JAAS login modules allowing applications to get their user info from LDAP servers, databases or property files (the last to simplify testing). There are also login modules for clients, so that they can send security information to the JBoss server. Note that an application that logs into JBoss must use JAAS to give user name and password. It is not possible to use the JNDI lookup information for that in JBoss. How to configure this is shown in chapter 8 of the free getting started guide.
    Did you check the "getting started guide"?
    Did you familiarize yourself with JAAS?
    Did you implement/configure a login module?
    Did you have a specific problem with the login module (errors, etc.)?
    Did you post this question at the JBoss Forum?
    Did you get an answer?
    Did you try anything at all about which you can post the details?
    Are you getting my point?

Maybe you are looking for

  • How do i make my own wireless connection the default

    Everytime my mb goes to sleep mode and then wakes up it reconnects to one of the other wireless networks in range instead of my own. Is there a way to make it to were my connection is the default? Also is there a way to make it to where the macbook d

  • ORA-01006:bind variable does not exist for the QUERY

    Dear All, Please help on below query : DECLARE P_ROTATION_NO GCH_VSL_REGN.ROTATION_NO%TYPE :=21; P_VESL_NO GCH_VSL_MASTER.VESL_NO%TYPE := NULL; P_VESL_NAME GCH_VSL_MASTER.VESL_NAME%TYPE:= NULL; P_FROM_REG_DATE GCH_VSL_MASTER.CREATED_DATE%TYPE:= NULL;

  • Photoshop crashes, unable to perform Software Update, general slowness.

    I am writing on behalf of a colleague at work. He is using a brand new iMac 2.4 GHz Intel Core 2 Duo with 3GB 800 MHz DDR2 SDRAM. It is running Mac OS X 10.5.5 and he is trying to update to 10.5.6 to correct some problems he's been encountering. He h

  • Create Flash in Batches

    I'm running Flashpaper2 in a Windows XP environment, I would like to flash documents in batch process. I have 40 - 50 PDF files I'd like to convert to swf these files can keep the same filenames as the PDF files with a new SWF extention. I also frequ

  • Localization of MVC3 application for South Africa

    My mvc3 application is localized to support many different countries.  Mostly everything works fine, but in a few countries I've run into problems.  The biggest of which is South Africa.  They use commas instead of periods in decimals and when the th