Hi, I'm working with JBoss3/CMP2 on a project which spans many databases
and many CORBA interfaces. Truly enterprise, or should is say disparate
and legacy?... Anyway, I'm trying to make my beans as fault-tolerant as
One particular stateless session bean is executing some non-EJB code
which is hanging, thus blocking the client, and I'd like to have it
throw an exception after a timeout, rather than idle forever eating up a
thread. What's worse is that the hang occurs in ejbCreate and JBoss is
creating two of these instances simultaneously when the first client
does a home create (not sure why? instance pool preloading?), so I have
a dead client, dead thread, dead transaction, and if this bean were
stateful, dead beans in the instance pool. Argh! Luckily, TxCapsule
releases the thread with a warning "timed out" log message after a
while, but nothing rollsback and the client still hangs (perhaps this is
bug at this point in JBoss?).
What's hanging can't be fixed: CORBA narrowing a NamingContext. I've
tried JacORB and OpenORB, neither (open-source) ORBs give up, they just
block forever when the initial reference of a third-party system using
Orbix is sucessfully resolved, but this naughty closed-source Orbix
system is probably breaking CORBA specification rules by not throwing
exceptions on half-baked communications. In other words, the CORBA
"contract" has been broken.
What's really going on is that this funky CORBA server was rebooted and
the admin had to manually start something or other but didn't do it just
right. This is where I'm trying to achieve fault-tolerance. If a
system is down, report it to the user (or log4j, whatever), but never
Anyone have to code a bean similarly? Any suggestions?
Obviously I can't start a timer thread in the session bean, correct?
Gerald Turner Email: gturner@... Phone: (503) 725-7306
GPG: 0xFA8CD6D5 21D9 B2E8 7FE7 F19E 5F7D 4D0C 3FA0 810F FA8C D6D5
> Anyone have to code a bean similarly? Any suggestions?
I have had similar problems with CORBA timeout but not in a J2EE environment.
The problem was the client side ORB written in smalltalk. This particular
ORB did not handle broken TCP connection correctly, therefore run into
synchronisation problems and then into large timeouts (~10 min)
While analysing the problem we looked into to sources of the orb (thirdparty
commercial orb, we had access to the sources) This problems
only happened under NT and only under special circumstances but
reproducable. The same orb runs perfectly on HP-UX.
While analyseing all of this stuff I never came across any timeout spec
which tells an orb to apply a timeouts. Also all the timeouts in
the smalltalk orb where hardcoded, so I guess there is not timeout spec
(or this orb is not compoliant) We finaly had to gave up with this product :(