|
Home > Archive > WebSphere HATS > February 2006 > Connection Management in EJB using Itegration Obejcts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Connection Management in EJB using Itegration Obejcts
|
|
| Anthony Schmude 2006-01-18, 7:45 am |
| Hi there,
we finally managed to process IntegrationObject execution via a self
written bean using the HATS start sequenz described in the user manual:
Ras.initializeRas(this);
LicenseManager.getInstance();
Runtime.initRuntime(getAppName(), this);
...
integrationObject.setHPubStartPoolName(getAppName()+"/main");
But still we have some questions:
1) We have an EJB pool established. Is ist Ok to start the HATS runtime
various times?
2) How should we act on EJB removal. Do we have to stop the HATS runtime?
3) How can we manage the connections used? Are they pooled?
4) We use a stateless session bean. The HATS Bean is stateful. Why?
Thanks for help on that issues.
Cheers
Anthony
| |
|
| Anthony,
Regarding you questions:
1) We have an EJB pool established. Is ist Ok to start the HATS runtime
various times?
I am not sure what you mean by an EJB pool. When you say start the HATS
runtime
various times, what do you mean? For example, the "HATS EJB" keeps track of
whether
the runtime has been initialized or not. However, the HATS runtime does have
code to
ensure that it only goes through initialization once.
2) How should we act on EJB removal. Do we have to stop the HATS runtime?
No, you should not stop the HATS runtime. I might suggest running last in
chain IO(s)
if that is a possible scenario to get the connection cleanly returned to the
pool. However,
HATS runtime will attempt clean up after the "maximum busy time" for the
connection
has expired.
3) How can we manage the connections used? Are they pooled?
Please read the "Managing Connections" chapter of the HATS User's and
Administrator's Guide
to understand HATS connections, pooling, and connect and disconnect macros.
In general, I
would recommend using pooling with an associated connect and disconnect
macro to make the
Integration Object macros as short/efficient as possible.
4) We use a stateless session bean. The HATS Bean is stateful. Why?
HATS uses a stateful session bean in anticipation of having to accomplish a
task using Integration
Object chaining; a stateful session bean ensures that the EJB instance hangs
around until the EJB
client is done with the connection.
Thanks,
Alisa
|
|
|
|
|