Well ...
usually I avoid issues such as yours by calling the scheduled operations
from an external system. Although orion allows user threads other EJB
Containers don't. Also I have noticed that Orion looses from time to time
it's JNDI Context by doing so.
Bottom line: Don't use user threads. Don't break EJB spec.
I did not dig into former mails send by you to the list but why don't you
use CRON or equal to trigger your action? You might be able to solve it
within an hour ... are able to restart whenever you want ... and don't break
EJB spec.
Jens
| -Original Message-
| From: [EMAIL PROTECTED]
| [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus Hoem
| Sent: Wednesday, January 30, 2002 4:46 PM
| To: Orion-Interest
| Subject: Re: IllegalStateException
|
|
| Hello again!
| The original error still seems to be there. I've relocated my Timer to a
| seperate application (it was only used to post messages to a topic).
| Because of that I am no longer using a Thread in my EJB:s (which was
| suggested earlier that it might be the problem). I am starting orion
| with the switch -userThreads.
|
| No matter what I do I still get the java.lang.IllegalStateException:
| Transaction expired (Committed) error. My system starts without a
| problem, it runs for a short period of time, (with all the jsp-pages
| working fine) and then all of a sudden I get the error. I am monotoring
| all the messages sent to the topic, so I can se that the beans still are
| working (there are still messages beeing published on the Topic every
| now and then). The problem is that I can't access any of the methods in
| the home-interface.
|
| Anybody have an idea?
|
| Thanks,
| Magnus
|
| On måndag, januari 28, 2002, at 07:25 , Alex Paransky wrote:
|
| You mention that one of the entity beans contains a timer, but you have
| not mentioned how are you holding on to that timer. Is it a Static
| reference in the entity bean or is it a Member of the EJB? Container
| could physically remove the EJB from memory at any time, how are you
| dealing with this?
|
| A typical Timer implementation uses a thread. You cannot start or stop
| threads in an EJB object. If you want to use a timer, you might want
| to consider using an external object that lives outside of EJB and
| triggers events on a periodic basis. If you need access to that object
| you might want to create an RMI object, and deploy it into the orion
| JNDI tree so you can have access to it from EJB.
|
| -AP_
|
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:owner-orion-
| [EMAIL PROTECTED]]On Behalf Of Magnus Hoem
| Sent: Monday, January 28, 2002 3:33 AM
| To: Orion-Interest
| Subject: IllegalStateException
|
| Hi!
| I have a strange problem which I can't find a solution to. I am running
| a system with a two message-driven beans and a couple of entity beans.
| They are all listening to (and able to publish messages to) the same
| Topic. One of the entity beans contains a Timer with a couple of
| TimerTasks that publish messages to the topic that tells to mdb:s to do
| different things. I also have a jsp that refreshes itself every couple
| of minutes. When the system has been up and running for a while I
| suddenly get a very strange error. When the self-refreshing jsp-page
| (or load any other jsp-page connected to the system) is loaded I get
| java.lang.IllegalStateException: Transaction expired (Committed) and
| a reference to the line in the jsp where I try to connect to the Home
| interface and run the create(), findByPrimaryKey() or findAll()
| methods. Does anybody know why this happens and have a sollution?
| I log all the messages sent to the topic, and the timer-bean keeps
| sending messages after the error occurs...
|
| Thanks,
| Magnus
|
|