Monitoring Stateful EJBs

Hi,
When monitoring Stateful EJBs the first column, "Cached Beans Current Count",
assume negative values.
Why this happens?
Thanks,
Denis Macedo

Hi,
if you give some number in <max-beans-in-cache>number</max-beans-in-cache>.Then Weblogic Server going to create that many number of objects initially .
In case of statefull SessionBeans, If you give 3 ,Then Server creates 3 objects for that bean to provide service to the 3 clients at a time .
Whenever it receives the 4 requests at a time then three request's will be served at a time and 4th request will wait until the server passivate any object out of 3 in some persistant storage and create the object for 4th client.
it will not throw any exception or error if we sent more than number of requests which we were mention in max-beans-in-cache.
----Anilkumar kari

Similar Messages

  • How to get the TransactionManager in a stateful EJB (using JPA toplink)

    I use weblogic 10.3
    This is my stateful EJB and I need to get the TransactionManager because I want to suspend my transaction...
    Here it is ok for the UserTransaction ut but I got an error with the TransactionManager
    EJB Code
    //@Stateless(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @Stateful(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @TransactionManagement(TransactionManagementType.BEAN)
    @Remote
    @Local
    public class MyFacadeEJBBean implements MyFacadeEJB, MyFacadeEJBLocal, Serializable {   
    @Resource javax.transaction.UserTransaction ut;
    @Resource javax.transaction.TransactionManager tm;
    Error Message at the deploy EJB
    Unable to deploy EJB: MyFacadeEJB from PocJTA-PEJB-ejb:
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
    weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'test.ejb.MyFacadeEJBBean/tm' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:639)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:247)

    Chpruvos,
    Hi, I ran into a similar issue when specifying WebLogic specific descriptors in ejb-jar.xml and the corresponding weblogic-ejb-jar.xml. I no longer use this approach in our example code - we just use annotations. see: http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Tutorial_Source
    My session bean is stateless - I don't know how much it will help with your statefull bean managed config but here are copies of the ejb.jar configuration xml I used to use. All the resource*ref elements (see the resource-description* element) ended up in the weblogic specific weblogic-ejb-jar.xml descriptor file.
    ejb-jar.xml
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd]" version="3.0"&gt;
    *&lt;enterprise-beans&gt;*
    *&lt;session&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;ejb-class&gt;org.eclipse.persistence.example.unified.business.ApplicationService&lt;/ejb-class&gt;*
    *&lt;session-type&gt;Stateless&lt;/session-type&gt;*
    +&lt;!-- default to CMP Container managed transations not BMP --&gt;+
    +&lt;!-- transaction-type&gt;Bean&lt;/transaction-type--&gt;+
    +&lt;!-- resource-env-ref id="ResourceEnvRef_1080980284303"&gt;+
    +&lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;+
    +&lt;resource-env-ref-type&gt;javax.sql.DataSource&lt;/resource-env-ref-type&gt;+
    +&lt;/resource-env-ref--&gt;+
    +&lt;!-- resource-ref&gt;+
    +&lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;+
    +&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;+
    +&lt;res-auth&gt;Application&lt;/res-auth&gt;+
    +&lt;/resource-ref--&gt;+
    *&lt;/session&gt;*
    *&lt;/enterprise-beans&gt;*
    &lt;/ejb-jar&gt;
    weblogic-ejb-jar.xml
    &lt;?xml version="1.0"?&gt;
    &lt;weblogic-ejb-jar&gt;
    *&lt;weblogic-enterprise-bean&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;stateless-session-descriptor&gt;*
    *&lt;pool&gt;*
    *&lt;max-beans-in-free-pool&gt;8&lt;/max-beans-in-free-pool&gt;*
    *&lt;initial-beans-in-free-pool&gt;2&lt;/initial-beans-in-free-pool&gt;*
    *&lt;/pool&gt;*
    *&lt;/stateless-session-descriptor&gt;*
    {color:#008000}&lt;resource-description&gt;
    &lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-description&gt;
    &lt;resource-env-description&gt;
    &lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-env-description&gt;
    {color}+&lt;!-- jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name--&gt;+
    *&lt;/weblogic-enterprise-bean&gt;*
    &lt;/weblogic-ejb-jar&gt;
    thank you
    /michael
    [http://www.eclipselink.org|http://www.eclipselink.org/]
    Edited by: michael_obrien on Feb 26, 2009 9:56 AM

  • Problems clustering a Weblogic  Stateful EJB 3.0

    Hello!
    I'm developing a Stateful EJB 3.0 with clustering configuration for weblogic 11G. My client gets a reference to the RemoteInterface, invoke a method and it's working. Then I shutdown the server where the EJB was created and the client reinvoke (using the same reference) a method and get's this error:
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
    java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    javax.ejb.EJBException: Exception waiting for response; nested exception is:
         java.io.EOFException: Connection closed by peer; nested exception is: java.io.EOFException: Connection closed by peer
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy0.getMas(Unknown Source)
         at com.ibermatica.pruebas.pruebaEJB30SF.getPrueba(pruebaEJB30SF.java:79)
         at com.ibermatica.pruebas.pruebaEJB30SF.main(pruebaEJB30SF.java:26)
    Caused by: java.io.EOFException: Connection closed by peer
         at weblogic.iiop.EndPointImpl.handleCloseConnection(EndPointImpl.java:602)
         at weblogic.iiop.EndPointImpl.processMessage(EndPointImpl.java:545)
         at weblogic.iiop.EndPointImpl.handleMessage(EndPointImpl.java:500)
         at weblogic.iiop.EndPointImpl.dispatch(EndPointImpl.java:324)
         at weblogic.iiop.ConnectionManager.dispatch(ConnectionManager.java:126)
         at weblogic.iiop.MuxableSocketIIOP.dispatch(MuxableSocketIIOP.java:302)
         at weblogic.socket.BaseAbstractMuxableSocket.dispatch(BaseAbstractMuxableSocket.java:298)
         at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:915)
         at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:844)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:335)
         at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
         at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    The description of my test is:
    +I have a Weblogic cluster (c1, c2)
    +I have developed an 3.0 Stateful EJB (configurated for replication)
    +My client  gets an EJB Instance from c1 and invoke one method (debugging)
    +I stops my client
    +I shutdown my server (c1)
    +My client invokes another EJB method end gets the error described before.
    It seems like the Server don't replicate the EJB.
    My replicatión ejb deployment descriptor is (weblogic.xml):
    <weblogic-enterprise-bean>
    <ejb-name>Session30EJBSFBean</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-clustering>
    <!--<home-is-clusterable>true</home-is-clusterable>
    <home-load-algorithm>random</home-load-algorithm>
    <replication-type>InMemory</replication-type>-->
    <use-serverside-stubs>true</use-serverside-stubs>
    <replication-type>InMemory</replication-type>
    </stateful-session-clustering>
    </stateful-session-descriptor>
    </weblogic-enterprise-bean>
    My ejb bean class is:
    @Stateful(name = "Session30EJBSF", mappedName = "clustering30-cluster301-Session30EJBSF")
    @Remote
    public class Session30EJBSFBean implements Session30EJBSF {
    private SessionContext _context;
    private int contador= 0;
    private String user="";
    public Session30EJBSFBean() {
    public void inicio(String user){
    this.user= user;
    contador=0;
    public void mas(){
    contador++;
    public int getMas(){
    return contador;
    public String getUser(){
    return this.user;
    My Remote EJB:
    import javax.ejb.Remote;
    @Remote
    public interface Session30EJBSF {
    public void inicio(String user);
    public void mas();
    public int getMas();
    public String getUser();
    My client:
    public class pruebaEJB30SF {
    public pruebaEJB30SF() {
    super();
    public static void main(String[] args) {
    pruebaEJB30SF pruebaEJB30SF = new pruebaEJB30SF();
    try {
    pruebaEJB30SF.getPrueba();
    } catch (Exception e) {
    e.printStackTrace();
    public Context getInitialContext() throws NamingException {
    //String url="t3://c1:8001";
    String url="iiop://c1:8001";
    String user="any";
    String password="any";
    Properties p= new Properties();
    //p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    public void getPrueba() throws NamingException, RemoteException,
    CreateException {
    // <PROFILING>
    Context ctx= getInitialContext();
    //2.0 Stateful
    Object ref= ctx.lookup("clustering30-cluster301-Session30EJBSF#.Session30EJBSF");
    Session30EJBSF home= (Session30EJBSF)PortableRemoteObject.narrow(ref, Session30EJBSF.class);
    Session30EJBSF ejb=home;
    ejb.inicio("User1");
    ejb.mas();
    System.out.println( ejb.getMas());// I put here a breakpoint and I shutdown the serer c1
    ejb.mas();
    System.out.println( ejb.getMas());
    ejb.mas();
    System.out.println( ejb.getMas());//Caida
    ejb.mas();
    System.out.println( ejb.getMas());
    I have developed a EJB 2.1 and a EJB 2.1 client and it's working. The most important change betwin ejb 3.0 client and my 2.1 client is that in 2.1 I use the getHandle method and a Home, not a Remote.
    Please, can anyone help me.
    Thanks.

    Hi,
    Please change your Client Code as below: URL must be pointing to the comma Separated address of your ManagedServers Address/Port which are part of Cluster like For Example Suppose you have 2 managedServers in ClusterA ..... t3://MS1Host:8003,MS2Host:8005
    public Context getInitialContext() throws NamingException {
    <strike><font color=red>String url="t3://c1:8001";</font></strike>
    <b>String url="t3://ManagedServer1HostName:port,ManagedServer2HostName:port";</b>
    String user="any";
    String password="any";
    Properties p= new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,url);
    p.put(Context.SECURITY_PRINCIPAL,user);
    p.put(Context.SECURITY_CREDENTIALS,password);
    return new InitialContext(p);
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

  • Problem with Stateful EJB in JBOSS

    Hi,
    J have a problem with invoking stateful EJB methods from my web application deployed in Jboss 4.0.5.GA both. The same EJB with WebLogic functions perfectly, instead with Jboss it often throws the following exception:
    ERROR [org.jboss.ejb.plugins.LogInterceptor]
    EJBException in method: public abstract java.lang.String
    infrastruttura.server.ejb.sessionproxy.SessionProxy.getCodiceGruppo() throws
    java.rmi.RemoteException:
    javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
    different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
    GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
    TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
    localId=306]
    at
    org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
    at
    org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at
    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at
    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:954)
    at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
    org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at
    org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
    at
    org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
    at $Proxy83.getCodiceGruppo(Unknown Source)
    at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at
    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
    at
    org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    2008-02-27 20:19:54,458 ERROR
    [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[PitagoraOlo].[jsp]]
    Servlet.service() for servlet jsp threw exception
    java.rmi.ServerException: EJBException:; nested exception is:
    javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
    different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
    GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
    TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
    localId=306]
    at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
    at
    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:954)
    at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
    org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at
    org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
    at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
    at
    org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
    at $Proxy83.getCodiceGruppo(Unknown Source)
    at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at
    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
    at
    org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.ejb.EJBException: Application Error: tried to enter Stateful
    bean with different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
    GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
    TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
    localId=306]
    at
    org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
    at
    org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at
    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    ... 47 more
    Is there someone can help me?
    thanks forward.

              We got resolved it through bea. This is a know problem of WLS6.1 Sp4. Bea has provided
              us with a patch, after which every thing seems to be working fine.
              Please open a case with bea mentioning the CR092146. You can read the description
              of this CR on internet.
              This will certainly solve your problem.
              Bob Butkus <[email protected]> wrote:
              >We are experiencing the same issue. Did you ever get this resolved?
              

  • Trying to build a web application with stateful ejb clustering

    Hi to everyone,
    I'd like to know if someone gets to work a stateful ejb clustering. The stateful ejbs are called from a servlet so i'm not using RMI.
    The ejb clustering sample works! but It is using RMI and this is not use for me.
    My application already works but not in a cluster. Is this possible? I supose yes AND HOW???
    Thanks in advanced.

    Might look at: https://jsfportletbridge.dev.java.net to get started.

  • Classes, Stateful EJBs and EJB Container

    Hi,
    We have several doubts about classes, servlets, and EJBs.
    We have been told that the instance of non-static classes from JSPs or servlets
    can be a problem if we have a big number of clients connecting to weblogic (or
    any other app server). Would it be a problem? Is it a better practice to instantiate
    those classes from EJBs?
    We have been told that EJBs are managed by the EJB container, and it uses a pool
    for serving them to clients, passivating and activating them. This would include
    the classes instantiated inside them. Is it true?
    If all our guesses are true, the better way to implement a search with pagination
    would be a stateful EJB, using handlers to save it in the client's session. But
    we've heard that stateful EJBs are really bad for server's perfomance. Is it true?
    We are using Weblogic 7.0. If so, what are they useful for???
    If they can be a problem, how to build that searching using stateless EJBs?
    Best regards,
    Ignacio Sanchez

    You're right, the concrete tag to use seems to be:
    <replication-type>InMemory</replication-type>
    Anyway, do you have any further explanation on Stateful's behaviour with many
    clients and pagination implementation?
    "Stanley Beamish" <[email protected]> wrote:
    >
    "Ignacio Sanchez" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for your replies.
    Anyway, I still have some questions about stateful EJBs. In a clusteredenvironment,
    we've been told that stateful EJBs are only balanced before create()method. So,
    if we have already "created" the Remote interface, we're using it,and the
    server
    fails and must be balanced to another instance, what will happen? Willwe
    lost
    that Remote interface and data included in it?
    Not necessarily, you can enable replication, which means that your stateful
    EJB's state (values of i-vars) can be replicated across nodes in a cluster.
    Search through the WLS cluster documentation for details.
    SB
    And about your suggestion on pagination using stateless. Could youplease
    explain
    it in more detail? I haven't understood it well.
    Thank you very much for your attention.
    "Sri" <[email protected]> wrote:
    Hi,
    Look below for my coments.
    S
    "Ignacio Sanchez" <[email protected]> wrote:
    Hi,
    We have several doubts about classes, servlets, and EJBs.
    We have been told that the instance of non-static classes from JSPsor
    servlets
    can be a problem if we have a big number of clients connecting to
    weblogic
    (or
    any other app server). Would it be a problem? Is it a better practice
    to instantiate
    those classes from EJBs?It all boils down to your architecture. If you have a lot of clients
    connecting
    to web container then and if each client needs objects stored in session
    then
    you have to refactor your object distribution. But this could be avoided
    by separating
    static content from dynamic content (using proxies, load balancersetc),
    having
    more web containers etc. It's not necessary to instantiate these classes
    in EJBs
    always (then you are increasing your memory footprint). The generalguidelne
    is
    to do more heavy duty work as you go deeper into tiers hopefully handling
    less
    connections etc.
    We have been told that EJBs are managed by the EJB container, and
    it
    uses a pool
    for serving them to clients, passivating and activating them. Thiswould
    include
    the classes instantiated inside them. Is it true?
    True.
    If all our guesses are true, the better way to implement a search
    with
    pagination
    would be a stateful EJB, using handlers to save it in the client'ssession.
    But
    we've heard that stateful EJBs are really bad for server's perfomance.
    Is it true?
    We are using Weblogic 7.0. If so, what are they useful for???
    True if misused as stateful EJBs, just like HTTP sessions could bereplicated
    and could be activated/passivated.
    If they can be a problem, how to build that searching using stateless
    EJBs?
    You could cache searchs and pass identity and page numbers to theSLSB.
    Best regards,
    Ignacio Sanchez

  • EJBLockingRuntime.WaiterCurrentCount for a stateful ejb

    Hi All,
    Suppose I have <max-beans-in-cache> number of active threads in cache and none of them could be passivated. In this case, when a new thread attempts to cache a stateful ejb, a CacheFullException is thrown up immediately, as the number of beans in cache is equal to the maximum number allowed.
    I need help to understand EJBLockingRuntime.WaiterCurrentCount attribute in context of a stateful ejb. I want to know when would a thread wait for a lock on the bean ? If anyone could explain how this works, would be great help.
    Thanks

    Hi All,
    Suppose I have <max-beans-in-cache> number of active threads in cache and none of them could be passivated. In this case, when a new thread attempts to cache a stateful ejb, a CacheFullException is thrown up immediately, as the number of beans in cache is equal to the maximum number allowed.
    I need help to understand EJBLockingRuntime.WaiterCurrentCount attribute in context of a stateful ejb. I want to know when would a thread wait for a lock on the bean ? If anyone could explain how this works, would be great help.
    Thanks

  • Running a presentation via VGA out with Firefox/Safari open. When I hit 'esc' to come out of slideshow, monitor stated resolution too low. Now Safari and Firefox browsers are still open, but I can't see the browser window on either. Ideas?

    Running a presentation via VGA out with Firefox/Safari open. When I hit 'esc' to come out of slideshow, monitor stated resolution too low. Now Safari and Firefox browsers are still open, but I can't see the browser window on either. Ideas?

    If you use Lion, go to Applications/ Mission Control and, if you have more Desktops, as attached, it means you have more, and you must select the one you need for a certain app. If default settings has not changed, this is Control with left / right arrow
    If in Snow Leopard and earlier, you have these settings in System Preferences only. In Lion, you also have some settings in Sys Prefs.

  • Is a Web Services "conversation"  a Stateful EJB?

    Is a Web Services "conversation" a Stateful EJB?
    Or is this implementation geared more to conversations
    that could span days or weeks?
    Thanks, -- pl

    Paul,
    Good question. A conversation is backed up by an entity bean whose
    state is persisted. It will, therefore be maintained across WebLogic
    server restarts and will last as long as the application needs it to.
    Gordon O'Gorman
    BEA Systems
    Developer Relations Engineer
    ======
    Paul Loubriel wrote:
    Is a Web Services "conversation" a Stateful EJB?
    Or is this implementation geared more to conversations
    that could span days or weeks?
    Thanks, -- pl

  • Determine if a client of  a stateful EJB dies...

    We are trying to remove stateful EJB instances when the client accessing the stateful
    EJB dies abruptly. We do not want to rely on the timeout feature.
    Let us say that we have a client that creates a stateful session bean and dies
    abruptly.
    Is there any way of determining, from the Weblogic server by inspecting the Stateful
    Bean, if the client is dead?

    Hi Laurent,
    thank you very much for you replay. As you indicated
    JDOHelper.isDirty(Object) returns true when the content of Object has
    changed in the current transaction. But I need more specific information
    about the object state : which are the changed fields?
    With kodo3 I was able to know which fields was changed through
    KodoStateManager:
    KodoStateManager sm = ((KodoPersistenceManager) pm).
    getStateManager(obj);
    int fieldIdx = sm.getMetaData().getField("myFieldName").getIndex();
    boolean dirty = sm.getDirty().get(fieldIdx);
    now, in kodo 4 I don't find an equivalent class.
    Any idea? Thank you a lot.
    Kind Regards,
    Daniela
    Laurent Goldsztejn wrote:
    JDOHelper.isDirty(Object) returns true if the content of Object has changed in the current transaction.
    Laurent

  • Statistics: stateful ejbs and timeout

    Hi,
    I'm wondering if there is a possiblity to get the number of stateful ejbs that hit the timeout marker. Any hints on that? (I'm not looking for the number of transactions that hit the timeout, but rather of the ejbs - related to the idle-timeout-seconds configuration settings.)
    Regards,
    Andi

    Hi,
    In a clustered environment, we've been told that
    stateful EJBs are only balanced before create()
    method. So, if we have already "created" the Remote
    interface, we're using it, and the server fails and
    must be balanced to another instance, what will
    happen? Will we lost that Remote interface and data
    included in it?no, WEBLogic will failover to another node. You will not lose remote interface and data, because SFSB data are copied among several servers (replication group). Please read WL docs at BEA site. WL has excelent documentation about clusters.
    Maris

  • Binding stateful EJB bean

    Hi,
    I have a problem binding EJB bean (Stateful bean). Bean have two business methods:
    SendPacketToTRSM and GetData
    When I invoke SendPacketToTRSM method from process, application server create first instance of bean and invoke method SendPacketToTRSM
    Next I invoke GetData method in process, application server create second instance of bean and invoke method GetData.
    Every time, when I invoke method, application server create new instance of bean and don't remove it.
    Application server after passivation remove instance of bean from container.
    Environment: BPEL 10.0.2(OC4J), patch 4369818, 4406640, 4496111
    EJB bean on JBoss 4.0.2
    The following wsdl EJB binding:
    <?xml version="1.0" ?>
    <definitions targetNamespace="http://xmlns.unizeto.pl/TRSMBPEL"
    xmlns:tns="http://xmlns.unizeto.pl/TRSMBPEL"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
    xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <!-- message declns -->
    <message name="SendPacketToTRSMRequestMessage">
    <part name="sender" type="xsd:int"/>
    <part name="bufferToTRSM" type="xsd:string"/>
    </message>
    <message name="SendPacketToTRSMResponseMessage">
    <part name="result" type="xsd:int"/>
    </message>
    <message name="GetDataRequestMessage">
    </message>
    <message name="GetDataResponseMessage">
    <part name="result" type="xsd:string"/>
    </message>
    <message name="RemoveRequestMessage">
    </message>
    <message name="RemoveResponseMessage">
    </message>
    <message name="CreateRequestMessage">
    </message>
    <message name="CreateResponseMessage">
    </message>
    <!-- port type declns -->
    <portType name="TRSMService">
    <operation name="SendPacketToTRSM">
    <input name="SendPacketToTRSMRequest" message="tns:SendPacketToTRSMRequestMessage"/>
    <output name="SendPacketToTRSMResponse" message="tns:SendPacketToTRSMResponseMessage"/>
    </operation>
    <operation name="GetData">
    <input name="GetDataRequest" message="tns:GetDataRequestMessage"/>
    <output name="GetDataResponse" message="tns:GetDataResponseMessage"/>
    </operation>
    <operation name="Remove">
    <input name="RemoveRequest" message="tns:RemoveRequestMessage"/>
    <output name="RemoveResponse" message="tns:RemoveResponseMessage"/>
    </operation>
    <operation name="Create">
    <input name="CreateRequest" message="tns:CreateRequestMessage"/>
    <output name="CreateResponse" message="tns:CreateResponseMessage"/>
    </operation>
    <operation name="SSCDAuthorizedForget">
    </portType>
    <!-- binding declns -->
    <binding name="EJBBinding" type="tns:TRSMService">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="xsd:int" formatType="int"/>
    <format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
    </format:typeMapping>
    <operation name="SendPacketToTRSM">
    <ejb:operation
    methodName="SendBase64PacketToTRSM"
    parameterOrder="sender bufferToTRSM"
    interface="remote"
    returnPart="result"/>
    <input name="SendPacketToTRSMRequest"/>
    <output name="SendPacketToTRSMResponse"/>
    </operation>
    <operation name="GetData">
    <ejb:operation
    methodName="GetBase64Data"
    parameterOrder=""
    interface="remote"
    returnPart="result"/>
    <input name="GetDataRequest"/>
    <output name="GetDataResponse"/>
    </operation>
    <operation name="Remove">
    <ejb:operation
    methodName="remove"
    interface="remote"/>
    </operation>
    <operation name="Create">
    <ejb:operation
    methodName="create"
    interface="home"/>
    </operation>
    </binding>
    <!-- service decln -->
    <service name="TRSMService">
    <port name="EJBPort" binding="tns:EJBBinding">
    <ejb:address className="pl.unizeto.pki.des.ssp.trsmd.TRSMDRemoteHome"
    jndiName="pl.unizeto.pki.des.ssp.trsmd.TRSMDBean"
    initialContextFactory="org.jnp.interfaces.NamingContextFactory"
         jndiProviderURL="192.168.129.202:1999"/>
    </port>
    </service>
    <!-- partner links -->
    <plnk:partnerLinkType name="TRSMService">
    <plnk:role name="TRSMServiceProvider">
    <plnk:portType name="tns:TRSMService"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    and bpel source
    <process name="TRSMBPEL" targetNamespace="http://xmlns.unizeto.pl/TRSMBPEL" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:tns="http://xmlns.unizeto.pl/TRSMBPEL" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:trsm="http://xmlns.unizeto.pl/TRSMBPEL" xmlns:ctask="http://services.oracle.com/bpel/task" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:taskMgr="http://services.oracle.com/bpel/task" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"><!-- ================================================================= --><!-- PARTNERLINKS --><!-- List of services participating in this BPEL process --><!-- ================================================================= -->
    <partnerLinks><!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="tns:TRSMBPEL" myRole="TRSMBPELProvider"/>
    <partnerLink name="TRSMService" partnerRole="TRSMServiceProvider" partnerLinkType="tns:TRSMService"/>
    <partnerLink myRole="TaskManagerRequester" name="userTask" partnerRole="TaskManager" partnerLinkType="taskMgr:TaskManager"/>
    </partnerLinks><!-- ================================================================= --><!-- VARIABLES --><!-- List of messages and XML documents used within this BPEL process --><!-- ================================================================= -->
    <variables><!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="tns:TRSMBPELRequestMessage"/>
    <variable name="outputVariable" messageType="tns:TRSMBPELResponseMessage"/>
    <variable name="SendPacketToTRSM_SendPacketToTRSM_InputVariable" messageType="tns:SendPacketToTRSMRequestMessage"/>
    <variable name="SendPacketToTRSM_SendPacketToTRSM_OutputVariable" messageType="tns:SendPacketToTRSMResponseMessage"/>
    <variable name="GetData_GetData_InputVariable" messageType="tns:GetDataRequestMessage"/>
    <variable name="GetData_GetData_OutputVariable" messageType="tns:GetDataResponseMessage"/>
    <variable name="UserTask2.0Var1" element="ctask:task"/>
    <variable name="Invoke_1_Create_InputVariable" messageType="tns:CreateRequestMessage"/>
    <variable name="Invoke_1_Create_OutputVariable" messageType="tns:CreateResponseMessage"/>
    <variable name="removeTRSMD_Remove_InputVariable" messageType="tns:RemoveRequestMessage"/>
    <variable name="removeTRSMD_Remove_OutputVariable" messageType="tns:RemoveResponseMessage"/>
    </variables><!-- ================================================================= --><!-- ORCHESTRATION LOGIC --><!-- Set of activities coordinating the flow of messages across the --><!-- services integrated within this business process --><!-- ================================================================= -->
    <sequence name="main"><!-- Receive input from requestor.
    Note: This maps to operation defined in TRSMBPEL.wsdl
    -->
    <receive name="receiveInput" partnerLink="client" portType="tns:TRSMBPEL" operation="process" variable="inputVariable" createInstance="yes"/>
    <scope name="Scope_1">
    <variables>
    <variable name="Invoke_3_Create_InputVariable" messageType="tns:CreateRequestMessage"/>
    <variable name="Invoke_3_Create_OutputVariable" messageType="tns:CreateResponseMessage"/>
    <variable name="Invoke_1_Remove_InputVariable" messageType="tns:RemoveRequestMessage"/>
    </variables>
    <sequence name="Sequence_1">
    <assign name="Init">
    <copy>
    <from variable="inputVariable" part="payload" query="/tns:TRSMBPELProcessRequest/tns:sender"/>
    <to variable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" part="sender"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload" query="/tns:TRSMBPELProcessRequest/tns:buffer"/>
    <to variable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" part="bufferToTRSM"/>
    </copy>
    </assign>
    <invoke name="create" partnerLink="TRSMService" portType="tns:TRSMService" operation="Create" inputVariable="Invoke_3_Create_InputVariable" outputVariable="Invoke_3_Create_OutputVariable"/>
    <invoke name="SendPacketToTRSM" partnerLink="TRSMService" portType="tns:TRSMService" operation="SendPacketToTRSM" inputVariable="SendPacketToTRSM_SendPacketToTRSM_InputVariable" outputVariable="SendPacketToTRSM_SendPacketToTRSM_OutputVariable"/>
    <invoke name="GetData" partnerLink="TRSMService" portType="tns:TRSMService" operation="GetData" inputVariable="GetData_GetData_InputVariable" outputVariable="GetData_GetData_OutputVariable"/>
    <invoke name="Remove" partnerLink="TRSMService" portType="tns:TRSMService" operation="Remove" inputVariable="Invoke_1_Remove_InputVariable"/>
    </sequence>
    </scope><!-- Generate reply to synchronous request -->
    <assign name="Result">
    <copy>
    <from variable="GetData_GetData_OutputVariable" part="result"/>
    <to variable="outputVariable" part="payload" query="/tns:TRSMBPELProcessResponse/tns:data"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="tns:TRSMBPEL" operation="process" variable="outputVariable"/>
    </sequence>
    </process>
    Could anyone explain, is it possible to binding stateful bean to process?
    Thanks
    Norbert

    Did some additional investigations and concluded"
    The (embedded) OTC uses default the empty to obtain the reference to a Session Bean (EJB). In my case I was using the Remote Interface and my Context was empty { }:
    Hashtable ht = ic.getEnvironment();
    System.out.println(ht.toString());
    When I supply the missing information, obtained via the Test Client that functions correctly, a new Bean instance was created for each Client. My getInitialContext() method looks like the example below.
    public InitialContext getInitialContext() throws NamingException {
    Properties p =new Properties();
    p.setProperty( "java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
    p.setProperty( "java.naming.provider.url", "ormi://localhost:23892/current-workspace-app" );
    I tried the ApplicationInitialContextFactory and again the same Bean instance was shared among all Clients. I did not try ApplicationClientInitialContextFactory, but I expect that the Remote interface will be used!
    Is it a Bug that ApplicationInitialContextFactory does not create a new instance for my Stateful Session Bean? I can use the Remote interface, but that would decrease the performance and it is less elegant...
    Michael

  • WLS6.1sp1 stateful EJB problem =   load-balancing and fail over

              I have three problem
              1. I have 2 clustered server. my weblogic-ejb-jar.xml is here
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
              'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
                   <ejb-name>DBStatefulEJB</ejb-name>
                   <stateful-session-descriptor>
                   <stateful-session-cache>
                        <max-beans-in-cache>100</max-beans-in-cache>
                        <idle-timeout-seconds>120</idle-timeout-seconds>
                   </stateful-session-cache>
                   <stateful-session-clustering>
                        <home-is-clusterable>true</home-is-clusterable>
                        <home-load-algorithm>RoundRobin</home-load-algorithm>
                        <home-call-router-class-name>common.QARouter</home-call-router-class-name>
                        <replication-type>InMemory</replication-type>
                   </stateful-session-clustering>
                   </stateful-session-descriptor>
                   <jndi-name>com.daou.EJBS.solutions.DBStatefulBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              when i use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              and deploy this ejb, exception cause
              <Warning> <Dispatcher> <RuntimeException thrown b
              y rmi server: 'weblogic.rmi.cluster.ReplicaAwareServerRef@9 - jvmid: '2903098842
              594628659S:203.231.15.167:[5001,5001,5002,5002,5001,5002,-1]:mydomain:cluster1',
              oid: '9', implementation: 'weblogic.jndi.internal.RootNamingNode@5f39bc''
              java.lang.IllegalArgumentException: Failed to instantiate weblogic.rmi.cluster.B
              asicReplicaHandler due to java.lang.reflect.InvocationTargetException
              at weblogic.rmi.cluster.ReplicaAwareInfo.instantiate(ReplicaAwareInfo.ja
              va:185)
              at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHandler(ReplicaAwareI
              nfo.java:105)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.initialize(ReplicaAwareRem
              oteRef.java:79)
              at weblogic.rmi.cluster.ClusterableRemoteRef.initialize(ClusterableRemot
              eRef.java:28)
              at weblogic.rmi.cluster.ClusterableRemoteObject.initializeRef(Clusterabl
              eRemoteObject.java:255)
              at weblogic.rmi.cluster.ClusterableRemoteObject.onBind(ClusterableRemote
              Object.java:149)
              at weblogic.jndi.internal.BasicNamingNode.rebindHere(BasicNamingNode.jav
              a:392)
              at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.j
              ava:142)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              2)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
              So do i must use it or not???
              2. When i don't use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              , there's no exception
              but load balancing does not happen. According to the document , there's must load
              balancing when i call home.create() method.
              my client program goes here
                   DBStateful the_ejb1 = (DBStateful) PortableRemoteObject.narrow(home.create(),
              DBStateful.class);
                   DBStateful the_ejb2 = (DBStateful) PortableRemoteObject.narrow(home.create(3),
              DBStateful.class);
              the result is like that
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@acf6e)/398
                   or
                   the_ejb1 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@252fdf)/380
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
                   I think the result should be like under one... isn't it??
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
              In this case i think the_ejb1 and the_ejb2 must have instance in different cluster
              server
              but they go to one server .
              3. If i don't use      "<home-call-router-class-name>common.QARouter</home-call-router-class-name>",
              "<replication-type>InMemory</replication-type>" then load balancing happen but
              there's no fail-over
              So how can i get load-balancing and fail over together??
              

              I have three problem
              1. I have 2 clustered server. my weblogic-ejb-jar.xml is here
              <?xml version="1.0"?>
              <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
              'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
                   <ejb-name>DBStatefulEJB</ejb-name>
                   <stateful-session-descriptor>
                   <stateful-session-cache>
                        <max-beans-in-cache>100</max-beans-in-cache>
                        <idle-timeout-seconds>120</idle-timeout-seconds>
                   </stateful-session-cache>
                   <stateful-session-clustering>
                        <home-is-clusterable>true</home-is-clusterable>
                        <home-load-algorithm>RoundRobin</home-load-algorithm>
                        <home-call-router-class-name>common.QARouter</home-call-router-class-name>
                        <replication-type>InMemory</replication-type>
                   </stateful-session-clustering>
                   </stateful-session-descriptor>
                   <jndi-name>com.daou.EJBS.solutions.DBStatefulBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              when i use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              and deploy this ejb, exception cause
              <Warning> <Dispatcher> <RuntimeException thrown b
              y rmi server: 'weblogic.rmi.cluster.ReplicaAwareServerRef@9 - jvmid: '2903098842
              594628659S:203.231.15.167:[5001,5001,5002,5002,5001,5002,-1]:mydomain:cluster1',
              oid: '9', implementation: 'weblogic.jndi.internal.RootNamingNode@5f39bc''
              java.lang.IllegalArgumentException: Failed to instantiate weblogic.rmi.cluster.B
              asicReplicaHandler due to java.lang.reflect.InvocationTargetException
              at weblogic.rmi.cluster.ReplicaAwareInfo.instantiate(ReplicaAwareInfo.ja
              va:185)
              at weblogic.rmi.cluster.ReplicaAwareInfo.getReplicaHandler(ReplicaAwareI
              nfo.java:105)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.initialize(ReplicaAwareRem
              oteRef.java:79)
              at weblogic.rmi.cluster.ClusterableRemoteRef.initialize(ClusterableRemot
              eRef.java:28)
              at weblogic.rmi.cluster.ClusterableRemoteObject.initializeRef(Clusterabl
              eRemoteObject.java:255)
              at weblogic.rmi.cluster.ClusterableRemoteObject.onBind(ClusterableRemote
              Object.java:149)
              at weblogic.jndi.internal.BasicNamingNode.rebindHere(BasicNamingNode.jav
              a:392)
              at weblogic.jndi.internal.ServerNamingNode.rebindHere(ServerNamingNode.j
              ava:142)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              2)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.BasicNamingNode.rebind(BasicNamingNode.java:36
              9)
              at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:296)
              So do i must use it or not???
              2. When i don't use "<home-call-router-class-name>common.QARouter</home-call-router-class-name>"
              , there's no exception
              but load balancing does not happen. According to the document , there's must load
              balancing when i call home.create() method.
              my client program goes here
                   DBStateful the_ejb1 = (DBStateful) PortableRemoteObject.narrow(home.create(),
              DBStateful.class);
                   DBStateful the_ejb2 = (DBStateful) PortableRemoteObject.narrow(home.create(3),
              DBStateful.class);
              the result is like that
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@acf6e)/398
                   or
                   the_ejb1 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@252fdf)/380
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
                   I think the result should be like under one... isn't it??
                   the_ejb1 = ClusterableRemoteRef(203.231.15.167 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@4695a6)/397
                   the_ejb2 = ClusterableRemoteRef(203.231.15.125 weblogic.rmi.cluster.PrimarySecon
                   daryReplicaHandler@6a0252)/381
              In this case i think the_ejb1 and the_ejb2 must have instance in different cluster
              server
              but they go to one server .
              3. If i don't use      "<home-call-router-class-name>common.QARouter</home-call-router-class-name>",
              "<replication-type>InMemory</replication-type>" then load balancing happen but
              there's no fail-over
              So how can i get load-balancing and fail over together??
              

  • JTA timeout value doesn't take effect within stateful EJB

    Platform : weblogic10.3.5
    problem description: I have 2 ejbs: ejb1 is a stateful bean and the transaction is bean managed, the trans-timeout-seconds is set to 60; ejb2 is a stateless bean, transaction is container managed, transaction type is required, trans-timeout-seconds is 35. And the JTA timeout value set in weblogic console is 20.
    ejb1 invokes the ejb2's interface to access db, and this transaction should be committed since ejb2 is container managed transaction. Then ejb1 create userTransaction to access db. And I found the transaction will be timed out after 35 seconds, which is the trans-timeout-seconds of ejb2.
    Here is the sample code
    ejb1.method(){
         ejb2.method();
         try{
              Context ctx = new InitialContext();
              UserTransaction ut = (UserTransaction) ctx.lookup(USER_TRANSACTION_REF_NAME);
              ut.begin();
                   //do some operation
              ut.commit();
         }catch(Exception e){
                   try{
              ut.rollback();
                   }catch(Exception ee){
    Is timeout value of the user transaction created in ejb1 should be jta timeout 20? why the ejb2's trans-timeout-seconds affects the ejb1's usertransaction timeout value? does any body know the reason?
    Thanks

    A transaction timeout will not and cannot terminate user code as there
    is no Java API for doing so. If you wish the user code to timeout, try
    using the "setQueryTimeout()" method on the SQL statement. The WebLogic
    JTS will timeout the transaction using another thread and will prevent
    any JDBC activity associated with the global transaction from being
    commited.
    Sincerely,
    Charlie Therit
    Developer Relations Engineer
    BEA Support
    hjkuob wrote:
    "Dear Support,
    We encounter problems with transaction timeout and details as follows:
    A swing UI calls a session bean in which a DAO(Data Access Object) is invoked,
    In this DAO, it try to invoke a store procedure like following :
    dateSource = getTxDataSource();
    conn = (Connection)dataSource.getConnection();
    cstmt = conn.prepareCall("{call PK_AP_OO_CATCH_UP.P_AP_MAIN(?,?) }");
    cstmt.registerOutParameter(...........);
    cstmt.execute();
    When a irrevalent guy carelessly locked the table , the swing keep running for 5 hours and
    the transaction never throws exception ( both JTA and trans-timeout-seconds are set).
    I've also survey docments , however, we are not sure about the definition of Container-managed transactions
    and Bean-managed transactions. So there are two problems to be solved :
    1. How to solve the timeout problem as the sample code above for calling store procedures,
    and what kind of transctions it uses according to the definition ?
    2. If a normal sql statement is executed as follows , should we declare explicit transaction ( begin and commit) ? %

  • Re: User Session using ServletSession and Stateful EJB in Cluster

              Sorry , I didn't use WLS 6.0, we use wls 5.1 in production.
              But in Wls 6.0, in some situations , the state of the stateful session bean can be lost. So it's not so reliable. You have to deal with it in the client code. Instead, servlet is a reliable solution.
              In order to test under wls6.0, you can store the handle of the EJBObject in the HttpSession, not in jndi, cos if the instance fails, all its objects will be removed by remaining instances from jndi. In another instance, you get the handle, and try to get the EJBObject.
              In wls5.1, some information like the server url must be embeded inside the handle. But in wls6.0, I don't know how they deal with it.
              I am looking forward to your results
              "Anuj Soni" <[email protected]> wrote:
              >
              >What kind of clustering problems you had with WL6.0 for Stateful session beans ? It will be helpful for me to know before hand.
              >
              >BTW, how were you able to test stateful session beans in a cluster under WL6.0 i.e. were you storing the Handle or EJBObject in HttpSession or did you store it in JNDI ?
              >
              >Thanks,
              >
              >Anuj
              >"Tao Zhang" <[email protected]> wrote:
              >>Although it's very advanced to take advantage of both http session and
              >>stateful session bean replication, but if you rely on the stateful session
              >>bean's state, you will be in trouble. Because the support of stateful
              >>session bean's replication is not perfect in wls6.0. We already chaned
              >>almost all stateful session beans into servlets or entity beans.
              >>
              >>I am not sure about the handle of the EJBObject. I think it should be able
              >>to reconstruct for us otherwise we can't use the handle any more.
              >>
              >>You can do a test. BTW, could you tell me the result?
              >>
              >>Thanks.
              >>
              >>Anuj Soni <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> Hi,
              >>>
              >>> I am designing the workflow for my web application using a Stateful
              >>session bean. As Weblogic 6.0 supports clustering of stateful session bean
              >>and HttpSession(in-memory replication), I want to use the combination of
              >>both techniques to provide load-balancing and fail-over safety for user
              >>sessions and their corresponding workflows.
              >>>
              >>> The question I have is that, Is Handle obtained using
              >>EJBObject.getHandle(), fail-over safe (for a clusterable stateful bean), so
              >>that I can reconstruct the reference to EJBObject on the secondary server
              >>incase of primary server crash.
              >>>
              >>> My understanding is that I should store Handle in the HttpSession as it is
              >>Serializable not the EJBObject. The weblogic 6.0 document only talks about
              >>the replica-awareness of EJBObject.
              >>>
              >>> If my above assumption is incorrect, Can you tell me how else I can
              >>achieve my goal ?
              >>>
              >>> Thanks in advance.
              >>>
              >>> Anuj Soni
              >>
              >>
              >
              

    Any one tested this scenario yet? i.e: storing the handle to an EJB object and then trying to re-use after the HttpSession is restored?
              Thanks.
              

Maybe you are looking for

  • TS4006 Is there ANY way to locate my iPod Touch if it's offline

    My iPot Touch was either lost or stolen last week in Vegas.  I have it registered on my iCloud "Find my Phone" but it simply comes up as offline, which doesn't surprise me since the battery has probably run out!  Does any one have ideas on what else

  • Finder will not allow user to create folder on a network drive

    I have an 27-inch iMac (Late-2012) that I recently did a wipe of the HD and reloaded the OS. When I did the reload, I installed MacOS X 10.9.2 but have kept it up to date, so that it is currently running 10.9.4. The user of this computer connects to

  • Can't drag desktop icons & other problems

    Hi.. I cannot drag my desktop icons nor items from a folder to DT. When this happened, I lost printing from my Lexmark E120N, my memory chips were listed as 68k and 28 k when they are 1 gig & 2 gig. That seems to have cleared up. I also cannot copy a

  • Report on Airport Utility when connecting Access Points to Airport Extreme

    I have a plan to upgrade my Access Points for a better bandwidth of speed rate of wireless connection in my local connection. There are the lasted model of Airport Extreme, and 2* Airport Express. Both of the Airport Express are connecting to Extreme

  • Beginner in XI

    hi All Im a beginner in  XI  starting to  learn the fundamentals and  some practice exercises in Adapters,  BPM and Mapping  Kindly  help  in providing  some useful links of hands on exercises,though i have been going through  http://help.sap.com tha