I have a Java POJO that accesses a database. It establishes a connection to the database in the constructor, the uses that connection in each call to query the database.
However, the query time is VERY slow, PAINFULLY slow. I suspect that the constructor is being called each time the query method is called.
I am new to BlazeDS, so i am curious about a few things:
1- is the constructor called each time i make a call to the remote object?
2-is it possible to instantiate the object and keep it in memory so i can make references to the instantiated object instead?
3-Would this be facilitated using EJB or Spring Framework? I am looking into these, but don't know enough yet to make the call myself.
ANY information you can provide is GREATLY appreciated....
sorry, i REALLY need this answered, if possible, so i'm going to BUMP it just this once!