1 Reply Latest reply: Apr 3, 2010 11:48 AM by 843807 RSS

    JavaBeans, JSP, Desktop Apps, and you (well, me)

    843807
      Greetings.

      I trying to figure out if there is any way to implement JavaBeans akin to how they are used on a JSP web page.

      On a JSP page, you can create a session bean using the code
      <jsp:useBean id="thisBean" scope="session" class="MyBean" /> 
      {/code>
      
      I am wondering if stand-alone apps can implement similar *session-lasting* Java objects, ie objects that remain referenceable between different frames and even different threads without the need for File I/O (time consuming) and even worse, database hits.
      
      The truth is I can accomplish my needs by just passing the objects through the frame constructors but this makes the code pretty much non-reusable =/
      
      The app I am building goes through multiple frames each time the program runs. New frames do not sit inside a larger frame like most desktop apps (this was a desired spec from the client)
      
      Thanks.