EJB - Store procedure support

Discussions

EJB programming & troubleshooting: EJB - Store procedure support

  1. EJB - Store procedure support (3 messages)

    Hi !
    Does EJB support store procedures or not ???

    Thanks
    AJP

    Threaded Messages (3)

  2. EJB - Store procedure support[ Go to top ]

    CMP entity EJBs don't support stored procedure. Stored procedures are not available in all database servers, so they are not portable.

    If you want to call a stored procedure, you may do it from a Statless Session EJB or a Home Method, by calling JDBC directly.
  3. EJB - Store procedure support[ Go to top ]

    "Stored procedures are not available in all database servers, so they are not portable"
    Whenever designing portable code you have to rely on some common denominator. JBCD requires portable JDBC drivers to allow invoking a "callable statement". That is all you need to call stored procedures from your EJB code, and it is portable. How you implement the callable statement is not portable across DB vendors, but the EJB code is.

    Gal
  4. EJB - Store procedure support[ Go to top ]

    We use stored procedures with JDBC (java.sql) extensively in our EJB content management framework - in both session and entity beans. To use stored procedures you have to use BMP entity beans. Portability across Oracle, SQL Server and Sybase is an issue - we need to write different stored procedure, esp. Oracle and SQL Server. I hope this help.

    Kevin Leong
    www.zhanra.com