1 / 20

Sergio Ferreira IIUG

I16. How to call Informix 4gl code from J2EE. Sergio Ferreira IIUG. Thrsday, October 12, 2006 • 10:30 a.m. – 11:30 a.m. Platform: Informix. Why call 4gl from java. The software evolves over time along with changes in the business. It supports the business needs.

kort
Download Presentation

Sergio Ferreira IIUG

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. I16 How to call Informix 4gl code from J2EE Sergio Ferreira IIUG Thrsday, October 12, 2006 • 10:30 a.m. – 11:30 a.m. Platform: Informix

  2. Why call 4gl from java • The software evolves over time along with changes in the business. • It supports the business needs. • normally its based on “old” technologies • The temptation is to fully rewrite everithing • What about new technologies ? • We need to use new technologies to adress today's needs (web applications, web services, integration with new systems)

  3. What is J2EE • A platform to create applications in Java • Defined by a standard specification • It is based on the existence of an application server • Includes specifications for a lot of enterprise requirements: • User interface (JSP, portlets, JSF, servlets) • Business Rules – EJB(s) • Database access – JDBC • Legacy integration – JCA • XML • Web services • Directory services • Transaction management • Authentication and Authorization • The compliant AS implement the specifications

  4. The Application Server • A Java server that offers : Containers, api(s), managers, admin tools

  5. Why not a native call to 4gl • It can cause problems in the Application Server • Even when the native code is working properly it is always suspected when problems occur. • 4gl does not work on a multi-threaded environment • The function call stack is static • The connection mechanism is based on ESQL/C that works on MT but not on generated 4gl.

  6. The solution • Use JCA • Create a way to spawn 4gl processes • Comunicate between the Resource adapter and the 4gl process

  7. What is JCA • JCA stands for Java Connection Architecture • JSR 112 • It is part of J2EE • It is a standard for connecting Java Application Servers and Enterprise Information Systems (EIS) • Defines an interface called Resource Adapter • JDBC could be (and some times is) seen as a Relational Resouce Adapter

  8. Connections Contracts JCA

  9. What doesn't it solve (yet ) • Interactive programs

  10. What do we need • Develop a JCA resource adapter • Create the comunication mechanism between the 4gl process and the Resource Adapter • Develop a C library to handle the comunication between the AS and the specific function in the 4gl process • Execute the calls to the remote functions from the java side using the JCA interface (javax.resource.*)

  11. What do we gain • Reuse of legacy business rules • Less problems • Much lower cost than redeveloping • Fast productivity (making the business rules in much higher level language)

  12. How it works

  13. What will be nice to have • Automation of the exporting process to expose 4gl functions as Stateless Session Beans • It is very important avoid high cost in exporting the functions • It could be made in severall ways from a simple script to a complete 4gl parsing process

  14. Automatic generation

  15. Using SOA • Oasis definition: • “Service Oriented Architecture is a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations. • With this architecture you can have level 1 and 4 imediatly implemented (in seconds or minutes). • You can also easily generate web services based on the 4gl function calls • It enables one of the SOA goals : loosely coupled and interoperable services

  16. Next steps • Call Java and web services from 4gl • Solve the interaction problem (if possible)

  17. Important • Calling 4gl from J2EE its not a product. • It is a pattern using standards • Its not dependent on a specific technology • I use it every day with : Websphere ; Jboss ; WebLogic

  18. Conclusion • If you need to call Informix 4GL programs from Java use a JCA

  19. Questions

  20. Session I16 How to call Informix 4gl code from J2EE Sergio Ferreira IIUG sergio@iiug.org

More Related