2 Replies Latest reply on Sep 1, 2008 2:33 AM by Sankar Kethineni

    Flex with Hibernate using HTTP

    Sankar Kethineni Level 1
      Hi All,

      am new to Flex. Can any one post a simple code on Flex with Hibernate using HTTP , i mean connecting to database using Hibernate and invoking the hibernate by using the HTTP service.

      can we have a sequence like Flex(MXML)->JSP->Hibernate->Database .Is it possible?

      Thanks in Advance
        • 1. Re: Flex with Hibernate using HTTP
          atta707 Level 2
          > can we have a sequence like Flex(MXML)->JSP->Hibernate->Database .Is it possible?

          That's exactly what you're going to have and it certainly is possible. (Replace the JSP with Servlet, Struts Action, JSF or whatever)

          Usually you'll send data back -- output to JSP or write to HttpServletResponse object -- in XML or JSON format. The data would be delivered to the result event of the HTTService in Flex. If it fails for some reason, the fault event of HTTService class would be invoked.

          The important thing to realize about Flex is that it cannot directly connect to a DB; you need a server side action that would get data from wherever write it to response. It's more like Ajax calls to a JSP/Servlet.

          ATTA
          • 2. Re: Flex with Hibernate using HTTP
            Sankar Kethineni Level 1

            Ok, right now am comfortable with getting data from the database(mysql) and all other operations(delete,insert etc) using JSP(which is deployed in the tomcat server), in which i have written JDBC code to connect to DB and am invoking this JSP page using HTTPService in Flex.

            Now i want to use Hibernate and we can't invoke Hibernate related code directly from Flex right? That's why am planning go with above mentioned sequence.

            somewhere else i have seen one example on Flex with Hibernate and they stated that we need LCDS (LiveCycle Data Services).Is it true and without LCDS we can't write Hibernate?