190 likes | 201 Views
GeneXus and J2EE. Ing. Ignacio Roqueta ARTech iroqueta@artech.com.uy. Is GeneXus J2EE?. J2EE. Java 2 Platform, Enterprise Edition Specification defined by Sun to run applications in application servers It defines APIs group Servlets JSP (Java Server Page)
E N D
GeneXus and J2EE Ing. Ignacio Roqueta ARTech iroqueta@artech.com.uy
J2EE • Java 2 Platform, Enterprise Edition • Specification defined by Sun to run applications in application servers • It defines APIs group • Servlets • JSP (Java Server Page) • JDBC (Java Database Connectivity) • EJB (Enterprise Java Beans) • JNDI (Java Naming and Directory Interface) • JMS (Java Messaging Service) • JTA (Java Transaction API)
J2EE • 2 agents • J2EE Application Servers • J2EE Applications
J2EE Application Servers • They implement J2EE specification • They provide a framework to run applications • Examples • Oracle Application Server • WebLogic • Websphere • Sun One • JRun • Jboss • Iplanet
J2EE Applications • Applications that run within a J2EE application server • Web application (WAR) • Enterprise java beans applications (JAR) • Enterprise applications (EAR)
J2EE Compatible? • J2EE compatible Applications Server • When it meets the entire J2EE specification • Sun certifies an application server as J2EE compatible • J2EE compatible Application • When it runs within a J2EE server
Web GeneXus Java Applications • They use • Servlets • JDBC • JNDI • Deployment for J2EE servers • War Deployment
J2EE Compatible? • J2EE and EJBs • A J2EE application does not have to use EJBs • Is GeneXus J2EE? <> Does GeneXus implement EJBs?
Enterprise java beans • Reusable component that runs in a J2EE server • They implement • Business logic • Access to database • They run within container with middleware services • Security • Load balance • Persistency • Pool • They may be used locally or remotely
Enterprise java beans types • Entity beans • They model business data • Session beans • They model business logic • Stateful • Stateless • Message-driven beans • They model business logic • They are asynchronically called
Enterprise java beans types • What will we generate? • Session beans • Stateless • Message-driven beans
Implementation • Main procedures with call protocol • Enterprise java bean • Session bean steteless • Message driven Bean • Business component • Session beans stateless • Interface may be local, remote or both • EAR Deployment • It can be called from GeneXus or from external applications • ¿Session beans stateful? • Data cache • Paging • Call external EJBs • Remote objects shown as EJBs (Rocha)
Demo • Bank Account Application • Bank Account • Id • Owner • Balance • 4 EJBs • Local • getOwner • getBalance • ModifyBalance • Remote • Transfer • It uses getBalance and ModifyBalance
Summary • GeneXus Java Web applications run in J2EE servers GeneXus is J2EE • Being J2EE does not imply using EJBs • EJBs will be generated in the next version