1 / 21

JBoss with CORBA and Oracle combining C++ with Java

JBoss with CORBA and Oracle combining C++ with Java. Jeremy Lemaire April 2007. Purpose of Project. Show Development of a 3-tier client server project. Illustrate EJB 3.0 concepts. Illustrate connectivity to a professional Oracle database.

wanda
Download Presentation

JBoss with CORBA and Oracle combining C++ with Java

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. JBoss with CORBA and Oraclecombining C++ with Java Jeremy Lemaire April 2007

  2. Purpose of Project • Show Development of a 3-tier client server project. • Illustrate EJB 3.0 concepts. • Illustrate connectivity to a professional Oracle database. • Seamlessly integrate different technologies and languages.

  3. Logical Architecture

  4. Development of a 3-tier client server project. • Note the use of both the OmniORB and the JDK ORB to facilitate communication between Java and C++ CORBA clients and servers using a common IDL stub. • Use of a normalized, tuned and documented Oracle database on the backend. • Use of JDBC proxy to facilitate connectivity of the client front-end to the Oracle database

  5. Development of a 3-tier client server project –cont. • The client is created such that any *.sql script stored on the server can be executed and the result will be passed to the client application in the form of a string. • The sample run depicts the PASTDUE.sql script being triggered. This SQL query uses sub queries to select all customers that have a total current balance greater than $100.00 and a past due balance greater than $0.00.

  6. Development of a 3-tier client server project –cont. • In addition to mixed languages, mixed operating systems were also used (i.e. Solaris and Windows). • Use of EJB 3.0 and annotations within persistent objects. • Use of the JBOSS Application Server. • OOUI front-end dumps remote queried data from PASTDUE.sql to a local embedded Hypersonic Database and the re-queries it.

  7. Illustrate EJB 3.0 concepts • The Entity Bean Class • POJO’s (Plain Old Java Objects) • Entities in Java Persistence are POJO’s annotated with Object/Relational mapped meta-data. • Persistence.xml file specifies information for the EntityManager like the database connection url.

  8. EJB 3.0 conceptsThe Bean Class @Entity @Table(name="PASTDUE") public class PastDue implements java.io.Serializable { …

  9. EJB 3.0 conceptsThe Bean Class (continued) @Id @Column(name="ID") public String getId() { return id; } public void setId(String str) { id = str; } …

  10. EJB 3.0 conceptsThe Bean Class (continued) @Column(name="INFO") public String getInfo() { return info; } public void setInfo(String str) { info = str; } }

  11. EJB 3.0 concepts Persistence.xml file <?xml version="1.0" encoding="UTF-8"?> <persistence> <persistence-unit name="verizon"> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> </properties> </persistence-unit> </persistence>

  12. Connectivity to the Oracle database.Database.PROPERTIES file jdbc.drivers=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@prophet.njit.edu:1521:course jdbc.username=jml25 jdbc.password=xxxxxxxx

  13. Illustrate connectivity to a professional Oracle database.Retrieving database.PROPERTIES String drivers = props.getProperty("jdbc.drivers"); if (drivers != null) System.setProperty("jdbc.drivers", drivers); String url = props.getProperty("jdbc.url"); String username = props.getProperty("jdbc.username"); String password = props.getProperty("jdbc.password"); return DriverManager.getConnection(url, username, password);

  14. Connectivity to the Oracle database.Common Cdr.idl file interface Cdr { string executeSQL(in string database, in string statement); };

  15. JDK orbd started on AFS15 and waiting for clients.

  16. The omniOrb C++ CdrServer binding the server to the registry and waiting for clients on AFS15.

  17. The Java ORB CdrProxyServer binding the server to the registry and waiting for clients on AFS15.

  18. JBOSS EJB Application Server running and and waiting for clients on host ma01jlemaire02.

  19. Description for Next Slide • The EJB/CORBA CdrClient running on ma01jlemaire02 in Vermont connecting to the CdrServer running on AFS15 in New Jersey. The console shows the results of the PASTDUE.sql query executed on the CDR_DB running on Prophet.njit.edu. The results from this query are added to the local Hypersonic Database and re-queried using an annotated, persistent, Java Entity Bean named PastDue.

  20. EJB/CORBA Client

  21. Usefull Links • www.jboss.com • http://omniorb.sourceforge.org • http://java.sun.com • http://web.njit.edu

More Related