In real-world scenarios, a BPEL (Business Process Execution Language) business process will often have to connect to an existing application or system. Of particular interest here is connectivity to J2EE artifacts, such as Java classes, Enterprise JavaBeans (EJBs), Java Message Service (JMS), enterprise resource planning systems accessible through Java Connector Architecture (JCA), Java Database Connectivity databases, or other Java resources.
It is possible to convert these resources to a Web service, but that approach has several disadvantages:
- The performance overhead of invoking Web service operations is several orders of magnitude larger than that of invoking native Java classes, and an order of magnitude larger than that of invoking EJBs or other native Java resources.
- Web services invocations lack the important capability to propagate contexts during transactions. In contrast, when using Java resources directly, transaction context can be propagated automatically if the Java resource provides such support (as EJB and JCA do, for example).