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)

Similar Messages

  • 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.

  • 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?
              

  • 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

  • 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) ? %

  • 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

  • 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

  • I have a problem when running my own EJB as a TUXEDO service using WTC.

    Hello,
    I have a problem when running my own EJB as a TUXEDO service using WTC. I am using TUXEDO 8.1 and WL 9.1.
    When I am trying to run my own EJB as a TUXEDO service error appears.
    TPENOENT(6):0:0:TPED_MINVAL(0):QMNONE(0):0:Could not find service TOUPPER
    at weblogic.wtc.gwt.WTCService.getImport(WTCService.java:4988)
    at weblogic.wtc.gwt.TuxedoConnection.getImport(TuxedoConnection.java:303)
    at weblogic.wtc.gwt.TuxedoConnection.tpcall(TuxedoConnection.java:1302)
    at examples.MyTestSessionBean.Toupper(MyTestSessionBean.java:102)
    at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:61)
    at net.roseindia.web.servlets.SessionTestServlet.doGet(SessionTestServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    e8
    10
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NullPointerException
    at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:95)
    at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:713)
    at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:681)
    at weblogic.ejb.container.internal.BaseEJBObject.postInvoke1(BaseEJBObject.java:447)
    at weblogic.ejb.container.internal.StatelessEJBObject.postInvoke1(StatelessEJBObject.java:72)
    at weblogic.ejb.container.internal.BaseEJBObject.postInvokeTxRetry(BaseEJBObject.java:374)
    at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:75)
    at net.roseindia.web.servlets.SessionTestServlet.doGet(SessionTestServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: java.lang.NullPointerException
    at examples.MyTestSessionBean.Toupper(MyTestSessionBean.java:130)
    at examples.TestSessionBean_knby6k_EOImpl.Toupper(TestSessionBean_knby6k_EOImpl.java:61)
    ... 15 more
    Any clue on this.
    With Regards,
    MVS

    If you are trying to create a Tuxedo service in Java using WTC you need to develop an EJB that implements the TuxedoService interface and register its home in JNDI so WTC can look it up. Once that is done you can then export the service to a remote domain in the WTC configuration.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • 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

  • Problem in creating jar for ejb

    hi,
    I want just to try to compile and deploy my ejb in the new version of bea weblogic
    server (version 8.1 trial version), but I have the problem when using weblogic.ejbc
    to create the jar file.
    There is no such problem when using weblogic 6.x, I can create the jar package
    of my ejb and deploy it within the server.
    I did this :
    java weblogic.ejbc stage/temp_myejb.jar stage/my_ejb.jar
    and I got the error message :
    ERROR: Error creating descriptor from jar file stage/temp_myejb.jar:
    ERROR: Error from ejbc: 1
    java.lang.ArrayIndexOutOfBoundsException: 1
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:97)
    at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:698)
    at weblogic.ejbc20.runBody(ejbc20.java:459)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.ejbc.main(ejbc.java:29)
    ERROR: ejbc couldn't load descriptor from jar
    I do verify that the weblogic-ejb-jar.xml and ejb-jar.xml have been included in
    temp_myejb.jar but why the compiler cannot load the descriptor ?
    This is my weblogic-ejb-jar.xml :
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
    "http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
         <weblogic-enterprise-bean>
              <ejb-name>MemberHome</ejb-name>
              <caching-descriptor>
                   <max-beans-in-free-pool>20</max-beans-in-free-pool>
                   <max-beans-in-cache>100</max-beans-in-cache>
                   <idle-timeout-seconds>10</idle-timeout-seconds>
              </caching-descriptor>
              <persistence-descriptor>
                   <is-modified-method-name>isModified</is-modified-method-name>
                   <delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
              </persistence-descriptor>
              <jndi-name>MemberHome</jndi-name>
         </weblogic-enterprise-bean>
         <security-role-assignment>
              <role-name>EjbClient</role-name>
              <principal-name>RemoteUser</principal-name>
         </security-role-assignment>
    </weblogic-ejb-jar>
    Is there something I missed ?
    Many thanks in advance.
    best regards,
    Victorianus Kapuangan

    hi Deepak,
    Thanks for the answer.
    I do put the ejb-jar.xml and the weblogic-ejb-jar.xml in the META-INF dir of the
    temp_my_ejb.jar file. I use the bmp entity bean so I guess I do not need to put
    the weblogic-cmp-rdbms-jar.xml.
    Should I missed to put these deployment descriptors in the META-INF, I should
    not then be able to deploy my ejb in weblogic 6.x. But in fact I can deploy it
    using weblogic 6.x.
    TIA.
    regards,
    Victorianus
    "Deepak Vohra" <[email protected]> wrote:
    >
    The input jar file, temp_myejb.jar should have ejb-jar.xml, weblogic-ejb-jar.xml
    & weblogic-cmp-rdbms-jar.xml, for cmp entity bean, in the META-INF dir.
    "Victorianus Kapuangan" <[email protected]> wrote:
    hi,
    I want just to try to compile and deploy my ejb in the new version of
    bea weblogic
    server (version 8.1 trial version), but I have the problem when using
    weblogic.ejbc
    to create the jar file.
    There is no such problem when using weblogic 6.x, I can create the jar
    package
    of my ejb and deploy it within the server.
    I did this :
    java weblogic.ejbc stage/temp_myejb.jar stage/my_ejb.jar
    and I got the error message :
    ERROR: Error creating descriptor from jar file stage/temp_myejb.jar:
    ERROR: Error from ejbc: 1
    java.lang.ArrayIndexOutOfBoundsException: 1
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:97)
    at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:698)
    at weblogic.ejbc20.runBody(ejbc20.java:459)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.ejbc.main(ejbc.java:29)
    ERROR: ejbc couldn't load descriptor from jar
    I do verify that the weblogic-ejb-jar.xml and ejb-jar.xml have beenincluded
    in
    temp_myejb.jar but why the compiler cannot load the descriptor ?
    This is my weblogic-ejb-jar.xml :
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic
    5.1.0 EJB//EN"
    "http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
         <weblogic-enterprise-bean>
              <ejb-name>MemberHome</ejb-name>
              <caching-descriptor>
                   <max-beans-in-free-pool>20</max-beans-in-free-pool>
                   <max-beans-in-cache>100</max-beans-in-cache>
                   <idle-timeout-seconds>10</idle-timeout-seconds>
              </caching-descriptor>
              <persistence-descriptor>
                   <is-modified-method-name>isModified</is-modified-method-name>
                   <delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
              </persistence-descriptor>
              <jndi-name>MemberHome</jndi-name>
         </weblogic-enterprise-bean>
         <security-role-assignment>
              <role-name>EjbClient</role-name>
              <principal-name>RemoteUser</principal-name>
         </security-role-assignment>
    </weblogic-ejb-jar>
    Is there something I missed ?
    Many thanks in advance.
    best regards,
    Victorianus Kapuangan

  • Call another WebLogic's EJBs from resource adapter?

              Is it possible to call another WebLogic's EJBs from a resource adapter?
              A call to the javax.naming.InitialContext(Hashtable environment) results in a
              VersioningError:
              weblogic.common.internal.VersioningError: Incompatible service packs in CLASSPATH:
              (BEA Systems, WebLogic Server 6.1 SP4 11/08/2002 21:50:43 #221641 , 6.1.4.0)
              not compatible with
              (BEA Systems, WebLogic Server 6.1 SP3 06/19/2002 22:25:39 #190835 , 6.1.3.0)
              at weblogic.common.internal.VersionInfo.verifyPackages(VersionInfo.java:128)
              at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:60)
              at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:79)
              at weblogic.kernel.Kernel.initialize(Kernel.java:122)
              at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:101)
              at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
              at java.lang.Class.newInstance0(Native Method)
              at java.lang.Class.newInstance(Class.java:232)
              at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
              at javax.naming.InitialContext.init(InitialContext.java:217)
              at javax.naming.InitialContext.<init>(InitialContext.java:193)
              at java.lang.reflect.Constructor.newInstance(Native Method)
              I'm not sure it will always be possible to match the version, although here upgrading
              the SP3 to SP4 will probably be done soon.
              Does anyone have experience with this?
              Or better: is there any documentation on this issue?
              

              Hi Hans,
              Here is the link for Weblogic SP3 / SP4 vulnerability and comparison for
              http://216.239.53.104/search?q=cache:RqqaQ3HZdwoJ:www.nipc.gov/cybernotes/2003/cyberissue2003-06.pdf+Versioning+Error+in+BEA+weblogic+6.1+SP3+and+SP4&hl=en&ie=UTF-8
              Hope this will help you.
              Let me know if u have any further problems.
              rgds
              KSK
              "Hans Bausewein" <[email protected]> wrote:
              >
              >
              >Is it possible to call another WebLogic's EJBs from a resource adapter?
              >
              >A call to the javax.naming.InitialContext(Hashtable environment) results
              >in a
              >VersioningError:
              >
              >weblogic.common.internal.VersioningError: Incompatible service packs
              >in CLASSPATH:
              >(BEA Systems, WebLogic Server 6.1 SP4 11/08/2002 21:50:43 #221641 ,
              >6.1.4.0)
              >not compatible with
              >(BEA Systems, WebLogic Server 6.1 SP3 06/19/2002 22:25:39 #190835 , 6.1.3.0)
              > at weblogic.common.internal.VersionInfo.verifyPackages(VersionInfo.java:128)
              > at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:60)
              > at weblogic.common.internal.VersionInfo.initialize(VersionInfo.java:79)
              > at weblogic.kernel.Kernel.initialize(Kernel.java:122)
              > at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:101)
              > at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDelegate.java:166)
              > at java.lang.Class.newInstance0(Native Method)
              > at java.lang.Class.newInstance(Class.java:232)
              > at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:147)
              > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
              > at javax.naming.InitialContext.init(InitialContext.java:217)
              > at javax.naming.InitialContext.<init>(InitialContext.java:193)
              > at java.lang.reflect.Constructor.newInstance(Native Method)
              >
              >
              >
              >I'm not sure it will always be possible to match the version, although
              >here upgrading
              >the SP3 to SP4 will probably be done soon.
              >
              >Does anyone have experience with this?
              >
              >Or better: is there any documentation on this issue?
              >
              

  • 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

  • Does WebLogic mangle EJB names?

    My web app has an EJB named like this in web.xml:
    <ejb-ref-name>ejb/MTI/UserManager</ejb-ref-name>
    The code tries to look up that EJB using the initialContext.lookup() method,
    using the name specified above. This works under Orion 1.5.2, but under
    WebLogic 6.1 sp1, it throws this exception:
    javax.naming.NameNotFoundException: Unable to resolve
    ejb.MTI/UserManager Resolved: '' Unresolved:'ejb' ; remaining name
    'MTI/UserManager'
    Notice that the first slash is a period in the WebLogic exception message.
    Is WebLogic mangling EJB names? What should I do to get my web app to work
    under WebLogic?

    As an aside, its not a good idea to have your EJB lookups and your JNDI
    names the same.
    ejb/MTI/UserManager is the correct convention for the ejb-ref-name - which
    is what your code is looking up.
    Your JNDI name should look something like Application.Component.Version (if
    you have to version... otherwise leave it off)
    Not that this is the answer to your problem - but when you do this, you will
    have a clearer understanding if your lookup in your code is wrong or whether
    your JNDI mapping is wrong.
    "Eric Hodges" <[email protected]> wrote in message
    news:3c6a87fb$[email protected]..
    >
    "Kumar Allamraju" <[email protected]> wrote in message
    news:[email protected]..
    Have you defined the corresponding ejb-ref-name & mapped it to
    the actual jndi name in weblogic.xml
    Refer the following doc
    http://e-docs.bea.com/wls/docs61/webapp/web_xml.html#1020090
    You mean like this?
    <ejb-reference-description>
    <ejb-ref-name>ejb/MTI/UserManager</ejb-ref-name>
    <jndi-name>ejb/MTI/UserManager</jndi-name>
    </ejb-reference-description>
    If so, then yes. That's in my weblogic.xml file.

  • Problem generating stubs for Java EJB web service deployed in OAS

    I created an EJB web service and I've successfully deployed it in my Oracle App Server. Some of the methods work fine but others produce the ff error:
    org.apache.soap.SOAPException - java.lang.IllegalArgumentException: No Serializer found to serialize [classname] using encoding style [encoding]It seems that the objects specified as parameters in the web service methods exposed are the only ones that had stubs generated for them. Other objects I use, which are usually wrapped inside a Vector, did not have generated stubs.
    Example:
         public String loginUser(UserDTO userDTO) throws RemoteException, NamingException, SQLException;
    public String addItems (Vector vecItems) throws RemoteException, NamingException, SQLException; // where vecItems is a collection of ItemDTO objects     In this scenario, stubs were generated for the UserDTO class, but not for the ItemDTO class. In effect, calling the addItems method resulted to the exception I mentioned above.
    I did a workaround wherein I declared a dummy method which accepted all the types of objects I needed as parameters so all the necessary stubs can be generated, but this fix doesn't feel like it's the proper solution to my problem.
    If anyone can help me, it would be greatly appreciated. Thanks!

    Crossposted:
    Problem generating stubs for Java EJB web service deployed in OAS

Maybe you are looking for