|
 |
j2ee thread: EJB - Remotes or Hashtables
Message #1 by "Yamini Krishnamurthy" <yamini.krishnamurthy@i...> on Mon, 11 Jun 2001 09:50:13 +0530
|
|
this is probably a matter of opinion and performance testing. I guess it
also depends on the number of data items and the number of data items that
dont get used. If they are all used I think you will find that a single
connection plus caching is the most optimal for a small number of items. As
long as you are using connection pooling or make sure that you only obtain
the connection once per bean you may find that obtaining the data seperately
is better as that is what databases are best at.
some things to consider are, have you got an endless supply of memory? if
so, or if your data is quite small then choose your system. its worth
downloading a profiling program and stress testing it and then watching
where the bottle necks occur at high load.
chanoch
-----Original Message-----
From: Yamini Krishnamurthy
[mailto:yamini.krishnamurthy@i...]
Sent: 11 June 2001 05:20
To: Java 2 Enterprise Edition
Subject: [j2ee] EJB - Remotes or Hashtables
Hi
I am using session EJBs to connect to a backend system such as SAP and
retrieve data. Some of the data retrieved through one transaction is
displayed immediately while the rest of it is required for the next step.
Currently, I am retrieving everything and storing them in hashtables and
using the hashtable whereever required. What I would like to know is if
this
is an optimal way of doing this? Essentially, I can store the remote
interface instance and make a remote call to retrieve the data whenever
required as well. So, which is a better way of doing things, through remote
interface or through hashtables? Does the performance come down while using
hashtables in this respect?
Regards
Yamini
|
|
 |