Download presentation
Presentation is loading. Please wait.
Published byLynne Daniel Modified over 8 years ago
1
CONNECT, Non EJB Programming Model.
2
CONNECT Architecture with EJB Current code base is using EJB services implemented by using the JAX-WS. Only session beans are used with EJB-3 POJO + Annotations.
3
CONNECT Architecture with POJO In this approach instead of the EJB based Web Services, POJOs will be used with JAX-WS annotations JAX-WS WS accept requests from service consumers and invoke the business logic that has implemented using POJOs.
4
Converting EJB Webservice to POJO based Web Service WebProject 1 – Open NetBeans IDE and go to File Menu -> New Project… 2 – From Categories select “JavaWeb” from projects select “Web Application”. 3 – Provide the Project Name, Project Location, and Project Folder. Try to maintain names similar to that of the EJB Webservice project by replacing EJB with Web. For example: DocumentRepositoryEJB -> DocumentRepositoryWeb 4 – Select project Right Click mouse button to see pop dialog box and select Others option. 5 - From Categories select “Web Services” from projects select “Web Service from WSDL” click Next button. 6 – Provide “Web Service Name”, “Package” and Select local WSDL file from your file system (C:\projects\NHINC\Current\Product\Production\Common\I nterfaces\src\wsdl) and click on Finish button. 7 – Move the POJO Code from EJB project to this Web project. 8 – Follow the steps to build and deploy a Web application.
5
Tools used for testing Apache Benchmarking tool [ 'ab' tool ] A tool used by WSO2 in there benchmakring analysis. e.i: WSO2 ESB benchmarking article at http://wso2.org/library/1721 Ships with the Apache HTTP Server. More info at http://httpd.apache.org/docs/2.0/programs/ab.html Process Explorer Tool similar to 'Task Manager' with detailed information More info at http://technet.microsoft.com/en- us/sysinternals/bb896653.aspx
6
Testing environment Client node Business Laptop Server node CPU - Intel Core 2Duo, 2.2 GHz Memeory - 2 Gig Client & Server nodes were connected via a router.
7
How the testing was performed Requests were sent from the client machine to the server machine via the network. Different number of requests at different levels of concurrency were sent. e.i: ab -p C:\request.xml -n 100 -c 10 -H "SOAPAction: urn:RespondingGateway_CrossGatewayQuery" -T "text/xml; charset=UTF-8" http://localhost:8080/NhinConnect/NhincProxyDocQuery
8
How the testing was performed cont... Where, -n requests Number of requests to perform -c concurrency Number of multiple requests to make -p postfile File containing data to POST. Remember also to set -T -T content-type Content-type header for POSTing, Default is 'text/plain' -H attribute Add Arbitrary header line, Inserted after all normal header lines. finally, the endpoint under test.
9
How the testing was performed cont... Where, -n requests Number of requests to perform -c concurrency Number of multiple requests to make -p postfile File containing data to POST. Remember also to set -T -T content-type Content-type header for POSTing, Default is 'text/plain' -H attribute Add Arbitrary header line, Inserted after all normal header lines. finally, the endpoint under test. Reference Links: http://httpd.apache.org/docs/2.0/programs/ab.html http://wso2.org/library/1721
10
The services were tested/compare DocumentRepositoryEJB http://localhost:8080/DocumentRepository_Service DocumentRepositoryWeb http://localhost:8080/DocumentRepositoryWeb/Document Repository_Service DocumentRepositoryEJB vs DocumentRepositoryWeb Outputs generated by the Apache benchmarking tool at the client side were compared CPU & Memory utilization values captured at server side were compared
11
The services were tested/compared EntityDocQueryProxyEJB http://localhost:8080/NhinConnect/NhincProxyDocQuery EntityDocQueryProxyWeb http://localhost:8080/NhinConnect/NhincProxyDocQuery EntityDocQueryProxyEJB vs EntityDocQueryProxyWeb Outputs generated by the Apache benchmarking tool at the client side were compared CPU & Memory utilization values captured at server side were compared
12
Performance Test Results Refer the spread sheet
13
What does EJB brings? Programing complexity Additional resource usage Force to use an Application Server with a JEE container Only JEE development community The current session beans are not invoked as a EJB Remote Call. EJB 3.0 annotations get added with the JAX-WS code generation using Netbeans. Does not use EJB transactions, using JDBC TXNs.
14
Programing Model with POJOs Open standards Easy to adopt to future changes Wide developer community Simple programming model Less resource usage at runtime Servlet container with WS runtime Deployment artifact can be a simple war
15
?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.