Hi everyone, 

i'm developing an application using entity and session
beans.

I have a semi-static table called proyect with two
columns: Code and Name.
I will add a row every 2 or 3 months, so i think i
have two solutions:

1) when the application starts, read it. If i need to
add a proyect, i'll use SQL manually to insert it and
then, restart the application. :-((

2) Create a singleton statefull session bean.
This bean has an ArrayList of Proyects. And I have a
helper class for getting the same session bean:

public class ... {

  private Proyect singleInstance = null;

  static {
    ProyectHome pHome = .....lookup(...);
     singleInstance = pHome.create();
  }

  public Proyect getInstance() {
       return singleInstance;
  }

}


So, every session bean can get a reference to the
singleton Proyect session bean.
Is there a problem using that?

Thanks, Hernan


=====


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to