On Fri, 2003-11-07 at 11:42, Pedro Salazar wrote: > Greetings, > > I would like to ask you if it worths create an entity bean for record > the id of a connection and delete it when user leaves? > > The entity bean would have only the id of the connection, the user id > and the timestamp of the connection start. > > Does it worths create an entity bean for that or is better create a > stateless bean that would call a stored procedure for create and delete > records. I think there is no need of cache since just that user would > delete the record that it created. But, I also don't know if I create an > entity bean, it goes automatically to the database or it remains a few > time in memory before it goes stored in database. > > I ask this because maybe in future I would like to monitor the user > connections in "real time" (? maybe, maybe not) or how many connections > are active. In this case, I don't know if an entity bean would make > sense here for caching information or it stills doesn't make sense > because for these new requirements a stateless bean making JDBC > connections invoking stored procedures... > > what is your opinion? > > Pedro Salazar.
An alternative that occurred me now. Since the data should persist only for a small period of time, could a stateful session bean solve my problem saving me from access database to write and delete? But there are 2 issues that I must guarantee: 1-I should work with JBOSS in cluster. So, these session beans must be available on both sides. If one JBOSS instance goes down I must have it on on any other instance. 2-Can I make a global search like counting the active connections for a user or the total sessions on system? thanks, Pedro Salazar. -- -PS ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
