4 Replies Latest reply on Feb 12, 2013 5:21 AM by mashashi

    Google App Engine Support for EJB

    mashashi Newbie

      Hello.

      I have been testing for the first time enterprise java beans and I have to say I like it mainly because of the simplicity in implementating the logic layer, apart of the model and the view.

       

      But any away...

       

      EJB works on google app engine partially becouse methods on the facelts get invoked but the attributes get lost between page refresh for instances.

       

      I already launch a thread on stack overflow that explains the issue.

       

      http://stackoverflow.com/questions/14740847/session-bean-gets-lost-in-gae-using-jsf-and-primefaces

       

      But the real reason for google app engine to claim oficial that doesn't handle EJB is becouse it can not store java objects in session.

       

      For instances:

       

      cardController = new CardController();

      Card card = new Card();

      cardController.setCard(card);

      req.getSession().setAttribute("cardController", cardController);

       

      this would not save the attribute into session. I suspect that EJB does something that reseambles this.

       

      Ok... So I was thinking if it is possible to serialize the class attributes using for instance JSON as I did in the previous mentioned StackOverflow thread (but in other context), and store the string in session. And retrive the string, parsing and building the Bean when it is necessary...

       

      I don't know if such a think is possible...

       

      Thanks in advance and thank you for your time.