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
Similar Messages
-
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) -
Hi,
When monitoring Stateful EJBs the first column, "Cached Beans Current Count",
assume negative values.
Why this happens?
Thanks,
Denis MacedoHi,
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 using application client for local stateful session bean
Hi,
I have deployed a local stateful session bean in Sun J2EE 1.4 application server.
On running the applclient for the stateful session bean application client i get the following error:
Warning: ACC006: No application client descriptor defined for: [null]
cant we use application client for local stateful session beans. becoz the application runs smoothly when i changed the stateful sesion bean to remote.Hi,
No, an ejb that exposes a local view can only be accessed by an ejb or web component packaged within the same application. Parameters and return values for invocations through the ejb local view are passed by reference instead of by value. That can't work for an application client since it's running in a separate JVM.
--ken -
Accessing client session information in ejb
Hi!
My prblem is the following. We want to access ejb from a servlet. We need some client session information in ejb (e.g. client username, client terminal name, client ip address) for several reason. Could anybody suggest a solution other than passing all the data through the parameter list of every method?
Thanks for any help.
ZoltanIf you use stateful session bean, you can pass this information, when you create it.
-
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 SanchezYou'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 -
Hello. I would like to write async tcp client and server. I wrote this code but a have a problem, when I call the disconnect method on client or stop method on server. I can't identify that the client or the server is no longer connected.
I thought I will get an exception if the client or the server is not available but this is not happening.
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
How can I determine that the client or the server is no longer available?
Server
public class Server
private readonly Dictionary<IPEndPoint, TcpClient> clients = new Dictionary<IPEndPoint, TcpClient>();
private readonly List<CancellationTokenSource> cancellationTokens = new List<CancellationTokenSource>();
private TcpListener tcpListener;
private bool isStarted;
public event Action<string> NewMessage;
public async Task Start(int port)
this.tcpListener = TcpListener.Create(port);
this.tcpListener.Start();
this.isStarted = true;
while (this.isStarted)
var tcpClient = await this.tcpListener.AcceptTcpClientAsync();
var cts = new CancellationTokenSource();
this.cancellationTokens.Add(cts);
await Task.Factory.StartNew(() => this.Process(cts.Token, tcpClient), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
public void Stop()
this.isStarted = false;
foreach (var cancellationTokenSource in this.cancellationTokens)
cancellationTokenSource.Cancel();
foreach (var tcpClient in this.clients.Values)
tcpClient.GetStream().Close();
tcpClient.Close();
this.clients.Clear();
public async Task SendMessage(string message, IPEndPoint endPoint)
try
var tcpClient = this.clients[endPoint];
await this.Send(tcpClient.GetStream(), Encoding.ASCII.GetBytes(message));
catch (Exception exception)
private async Task Process(CancellationToken cancellationToken, TcpClient tcpClient)
try
var stream = tcpClient.GetStream();
this.clients.Add((IPEndPoint)tcpClient.Client.RemoteEndPoint, tcpClient);
while (!cancellationToken.IsCancellationRequested)
var data = await this.Receive(stream);
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
private async Task Send(NetworkStream stream, byte[] buf)
await stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
await stream.WriteAsync(buf, 0, buf.Length);
private async Task<byte[]> Receive(NetworkStream stream)
var lengthBytes = new byte[4];
await stream.ReadAsync(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
var buf = new byte[length];
await stream.ReadAsync(buf, 0, buf.Length);
return buf;
Client
public class Client
private TcpClient tcpClient;
private NetworkStream stream;
public event Action<string> NewMessage;
public async void Connect(string host, int port)
try
this.tcpClient = new TcpClient();
await this.tcpClient.ConnectAsync(host, port);
this.stream = this.tcpClient.GetStream();
this.Process();
catch (Exception exception)
public void Disconnect()
try
this.stream.Close();
this.tcpClient.Close();
catch (Exception exception)
public async void SendMessage(string message)
try
await this.Send(Encoding.ASCII.GetBytes(message));
catch (Exception exception)
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
private async Task Send(byte[] buf)
await this.stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
await this.stream.WriteAsync(buf, 0, buf.Length);
private async Task<byte[]> Receive()
var lengthBytes = new byte[4];
await this.stream.ReadAsync(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
var buf = new byte[length];
await this.stream.ReadAsync(buf, 0, buf.Length);
return buf;Hi,
Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
private async void Process()
try
while (true)
var data = await this.Receive();
this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
catch (Exception exception)
Console.WriteLine(exception.Message);
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
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
<?xml version="1.0" encoding="UTF-8"?>
<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">
*<enterprise-beans>*
*<session>*
*<ejb-name>ApplicationService</ejb-name>*
*<ejb-class>org.eclipse.persistence.example.unified.business.ApplicationService</ejb-class>*
*<session-type>Stateless</session-type>*
+<!-- default to CMP Container managed transations not BMP -->+
+<!-- transaction-type>Bean</transaction-type-->+
+<!-- resource-env-ref id="ResourceEnvRef_1080980284303">+
+<resource-env-ref-name>localOracle10RemoteDS</resource-env-ref-name>+
+<resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>+
+</resource-env-ref-->+
+<!-- resource-ref>+
+<res-ref-name>localOracle10RemoteDS</res-ref-name>+
+<res-type>javax.sql.DataSource</res-type>+
+<res-auth>Application</res-auth>+
+</resource-ref-->+
*</session>*
*</enterprise-beans>*
</ejb-jar>
weblogic-ejb-jar.xml
<?xml version="1.0"?>
<weblogic-ejb-jar>
*<weblogic-enterprise-bean>*
*<ejb-name>ApplicationService</ejb-name>*
*<stateless-session-descriptor>*
*<pool>*
*<max-beans-in-free-pool>8</max-beans-in-free-pool>*
*<initial-beans-in-free-pool>2</initial-beans-in-free-pool>*
*</pool>*
*</stateless-session-descriptor>*
{color:#008000}<resource-description>
<res-ref-name>localOracle10RemoteDS</res-ref-name>
<jndi-name>localOracle10RemoteDS</jndi-name>
</resource-description>
<resource-env-description>
<resource-env-ref-name>localOracle10RemoteDS</resource-env-ref-name>
<jndi-name>localOracle10RemoteDS</jndi-name>
</resource-env-description>
{color}+<!-- jndi-name>localOracle10RemoteDS</jndi-name-->+
*</weblogic-enterprise-bean>*
</weblogic-ejb-jar>
thank you
/michael
[http://www.eclipselink.org|http://www.eclipselink.org/]
Edited by: michael_obrien on Feb 26, 2009 9:56 AM -
Pls help : How to get the client ip address in EJB
Hi experts,
I need to find the ip addr of the client which makes the remote call.
I tried using
java.rmi.server.RemoteServer.getClientHost()
But it throws ServerNotActiveException .
When I tried this in RMI it works fine perfectly.
If i am right EJB is just similar to RME and it should work in it too..
Can you please help me in finding out the ip address of the client which makes the ejb call.
Thanks & Regards,
MukuntHi Mukunt,
There is no portable way to do this in the Remote EJB programming model. The bean class
is written in a way that is agnostic to those kind of plumbing-related details of the caller.
--ken -
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?
-
Creating a simple java client for a session EJB local interface
Hi all
Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
The problem is that it creates a test client for a remote interface only...
i.e.
MySessionEJB sessionEJB = context.lookup("MySessionEJB")
and once i try to adjust it manually for the local interface...
MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
it generates the exception:
javax.naming.NotFoundException: SessionEJBLocal not found
at...........................(RMIClientContext.java:52)
There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
Thanks in advance.
Alex.Pedja thanks for reply.
I still dont understand what is wrong with my example.
The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
Thanks. Alex. -
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.
-
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.
ThanksHi 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 -
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, -- plPaul,
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 -
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,
AndiHi,
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
Maybe you are looking for
-
Set Delivery date blank - URGENT
Hi All I am working on SRM 5.0. I have received a requirement to blank out/clear DELIVERY DATE/ REQUIRED ON field. For example: Click Describe Requirement ,and there will be fields to be filled up and the REQUIRED ON field is defaulting to system dat
-
Get still image, but no motion video via firewire. Help!
This is really kicking me in the behind. I'm trying to do a print to tape, but before I get to that stage I have this problem where I can see my timeline video play fine in the canvas and I can see the still frame that I'm sitting on on the NTSC moni
-
Problems with WLS 4.5.1 and F5 Big IP HA+ Switch
Hello. We're having problems with our F5 Big IP HA+ switch and pool of WLS 4.5.1 servers (two in the pool currently). At seemly random intervals the Big IP believes the one or both of the servers are not responding, so they
-
Calibrating Acrobat's on screen full page aspect ratio
I've had an issue with Acrobat since I started using it at around version 6 up through the current version on both the Mac and Windows that I've not been able to find an answer for though I have searched with all the search terms that I can think of.
-
I just did the update iOS 8.3, and now I can't acces or use it the USB tranfer for windows (FOLDER PLUS - The Very Games) I have a lot of files that I need it, because they are important for my business. It's about it... 8Gb. I really need a help. T