Menu

OX with Webservices

2008-04-22
2012-11-26
  • AdamantiumOgre

    AdamantiumOgre - 2008-04-22

    I like the idea of Domain centric Development, which OX brings to the table. Unfortunately we build our persistence behind Web Services. Can I use OX and bind to a web service layer rather than to a database? I understand that this will probably take additional development on our part, but we need to know if it is at least possible.

    Thanks in advance.

    Greg

     
    • Javier Paniza

      Javier Paniza - 2008-04-24

      HI Greg,

      > Can I use OX and bind to a web service layer rather than to a database?
      OpenXava has a pluggable persistence provider.
      Look at the  org.openxava.model.impl package.
      There are a EJB CMP2, Hibernate and JPA persistece provider. You can create
      your own persistence provider, to save and store the data as you want.

      But, there are a little problem. Tabbular data retrieval is done via JDBC.
      That is, additionally you have to write your own TabProvider. Take a look
      at org.openxava.model.tab.impl package.

      It's possible, but not trivial.
      Maybe we can think and a simpler solution for your case.

      Do you have a generic web service for save/read data ?
      Your web service allows you to execute "SQL style" query ?
      Do you have direct access to database ?

      Cheers
      Javi

       
    • AdamantiumOgre

      AdamantiumOgre - 2008-04-30

      The webservices don't allow us to execute a SQL style query. We could potentially access the database directly, but then we lose the benefit of the business rules we built into the web service.

      I will check out the org.openxava.model.impl and org.openxava.model.tab.impl packages and see what I can figure out. I primarily needed a starting point and you've given me that. I'll be back with questions as needed.

      Thanks Javi.

      Greg

       
    • Marcelo Ruiz Camauër

      If you use an ESB like Sun's OpenESB, you could use the JDBC web service, which has insert, update, create and delete operations, generic queries. Other ESBs have similar capabilities.

       

Log in to post a comment.