1 / 35

DM203 Enterprise Java Beans in Adaptive Sever Enterprise

DM203 Enterprise Java Beans in Adaptive Sever Enterprise. Girish Vaitheeswaran Senior Software Engineer Database Server Technologies girish@sybase.com. An Introduction to EJB To EJB or not to EJB EJB and ASE what’s the nexus ASE-EJB Architecture ASE-EJB Architecture Components

robyn
Download Presentation

DM203 Enterprise Java Beans in Adaptive Sever Enterprise

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. DM203Enterprise Java Beans inAdaptive Sever Enterprise • Girish Vaitheeswaran • Senior Software Engineer • Database Server Technologies • girish@sybase.com

  2. An Introduction to EJB To EJB or not to EJB EJB and ASE what’s the nexus ASE-EJB Architecture ASE-EJB Architecture Components ASE-EJB Interface Developing and Deploying EJB Components Contents

  3. High Availability Unified Login and Role Mapping Conclusions References Questions Contents

  4. Enterprise Java Beans is a standard server side component model for the development and deployment of distributed enterprise-level applications Applications written using the EJB architecture are scalable, transactional and multi-user secure Write once run anywhere Writing business logic in java helps improve flexibility and ease of writing components Code reuse helps rapid application development What is EJB

  5. Types of EJB’s Session bean An extension of the client application responsible for managing processes or tasks. It models interactions but does not have any persistent state. Example : A Travel agent bean making a reservation for a cruise. What is EJB

  6. Types of EJB’s (cont) 2 types of Session beans Stateful session bean - They maintain in -memory state information of the conversation between the client and the bean Stateless session bean - Do not maintain conversational state hence is more scalable What is EJB

  7. Types of EJB’s (cont) Entity bean These represent persistent records in some kind of database. An entity bean has a persistent state. Example : A customer, a piece of equipment, an item in inventory etc What is EJB

  8. EJB Component development task list JDBC connection to a data source Standard DML operations such as selects, updates, inserts and deletes Develop and Deploy using an IDE or a Systems Management interface for EJB Servers Typically need to have a 3 tier setup with an EJB Server in the middle tier EJB and ASE what’s the nexus

  9. What does all this imply Connections to the database over the network are known to be expensive Data sets being transferred over the network can be large and can cause significant latency Security can be a factor since data is being transferred over the wire Knowledge of new development and deployment tools for component development, deployment and management are required Managing the complexities of a 3 tier architecture EJB and ASE what’s the nexus

  10. Problem definition Performance Impact Security Impact Lack of Flexibility EJB and ASE what’s the nexus

  11. EJB Support in ASE is the solution High Performance Communication High Speed Communication through ASE’s shared memory Secure data transfer No data transfer over the wire Complete Flexibility EJB’s can be deployed either in the middle tier or in the database tier EJB and ASE what’s the nexus

  12. EJB Support in ASE is the solution Consolidation approach where the EJB Server can be managed as part of the Database Server Management using a single interface like Sybase Central plug-in for ASE Simple, easy to use T-SQL interface for performing various system management tasks EJB and ASE what’s the nexus

  13. 3 Tier Architecture Engine 3 JDBC request EJB Request Engine 2 Engine 1 Data Set Response Client EJB Server Database Server

  14. 2 Tier Architecture EJB Server Engine 3 Engine 2 EJB Request Engine 1 Response Client Database Server + EJB Server

  15. Engine 1 Engine 0 2 Tier Architecture.. Details EJB Request EJB Server Response Client High Speed JDBC Driver Database Server

  16. Database Server Responsible for spawning the EJB Server Responsible for responding to isql and ct-lib requests Listens on the TDS port EJB Server Responsible for responding to EJB requests Listens on the IIOP port Responsible for executing component methods ASE-EJB Architecture Components

  17. High Speed JDBC driver Facilitates high speed communication between ASE and the EJB Server This bi-directional communication between ASE and the EJB Server happens through ASE’s shared memory to which the EJB Server is attached to. ASE-EJB Architecture Components

  18. Configuration Parameters New Configuration parameter ‘enable enterprise java beans’ to enable/disable EJB support in ASE with a valid ASE java feature license This is a dynamic option ASE-EJB Interface

  19. Sybase Central plug-in for ASE Used to Configure a new EJB Server Used to specify the logical name, physical name and the port number where the EJB Server would listen Used to deploy components Used to Manage packages, components, listeners, connection caches etc Look and feel similar to Jaguar Manager ASE-EJB Interface

  20. SQL Interface and Stored Procedures sp_extengine: Used to start, stop and query the status of the EJB Server Syntax is as follows sp_extengine @logical_servername, @class, @command @logical_servername is the logical name of the EJB Server ASE-EJB Interface

  21. SQL Interface and Stored Pr. (cont) Syntax (cont) @class is the class of servers, ASEJB is a new class @command is the command to be performed on the EJB Server and includes “start”, “stop” and “status” E.g.. sp_extengine “EJBServer”, “ASEJB”, “start” ASE-EJB Interface

  22. SQL Interface and Stored Pr. (cont) Shutdown automatically shuts down the EJB Server also An EJB Server cannot exist as a stand alone entity and has to have an ASE associated with it ASE-EJB Interface

  23. Shared Memory Driver To use the High Speed Shared Memory driver the following System Property needs to be set SYBSOCKET_FACTORY=com.sybase.shmem.ShmemSocketFactory ASE-EJB Interface

  24. PowerJ The IDE of choice to develop and deploy Enterprise Java Bean applications in ASE Has the option of deploying the EJB either in the middle tier or in the database tier Helps in the generation of stubs and skeletons Developing and Deploying EJB Components

  25. Sybase Central Plug-in for ASE Helps in the generation of stubs and skeleton code and also in the deployment of the components in the EJB Server Developing and Deploying EJB Components

  26. High availability support for session beans is automatic for an ASE/EJB Server pair If EJB Server A and EJB Server B were made part of a cluster, then when EJB Server A fails while executing a session bean, the client EJB request would automatically be serviced by EJB Server B For a stateful session bean, the state of the bean is stored in the database High Availability

  27. For entity bean support, the database being used as a storage for the entity bean, needs to be configured as a proxy database in the companion server High Availability

  28. High Availability EJB Request Primary db Response Primary ASE Client Proxy db Companion ASE

  29. High Availability EJB Request Primary db Response Primary ASE Client Proxy db Companion ASE

  30. High Availability Primary db Primary ASE EJB Request Proxy db Response Client Companion ASE

  31. A Single Login and Password interface is provided to login to both ASE and the EJB Server Role Mapping is done in order to ensure users with the right privileges have the authority to perform the appropriate actions The roles are maintained in ASE Unified Login and Role Mapping

  32. Significant performance benefits when Enterprise Java Beans with a lot of database operations are deployed in ASE Secure communication between ASE and the EJB Server happens through shared memory A Seamless interface can be used to develop, deploy and manage EJB Components Conclusions

  33. Sun’s EJB Specification Enterprise Java Beans by Richard Monson-Haefel References

  34. Questions

  35. Session No. DM203Enterprise Java BeansinAdaptive Sever Enterprise • Girish Vaitheeswaran • Senior Software Engineer • Database Server Technologies • girish@sybase.com

More Related