1 / 19

Giorgia Lodi ( lodig@cs.unibo.it ) Department of Computer Science University of Bologna

JBoss vs. JOnAS: Implementation Issues. Giorgia Lodi ( lodig@cs.unibo.it ) Department of Computer Science University of Bologna V.Ghini, F. Panzieri. JBoss/JOnAS: A Comparison Example of TAPAS Services Implementation Concluding remarks References. Summary.

talisa
Download Presentation

Giorgia Lodi ( lodig@cs.unibo.it ) Department of Computer Science University of Bologna

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 vs. JOnAS: Implementation Issues Giorgia Lodi (lodig@cs.unibo.it) Department of Computer Science University of Bologna V.Ghini, F. Panzieri

  2. JBoss/JOnAS: A Comparison Example of TAPAS Services Implementation Concluding remarks References Summary

  3. Two internal drafts about the comparison Both obsolete! New releases for JBoss (version 4.x) and JOnAS (version 3.2 now available) Main difference: their internal structuring JBoss uses JMX for integrating middleware services, i.e. microkernel structure with JMX as software bus In JOnAS, JMX at the same level of the other middleware services. Each service seen as a Java class JBoss/JOnAS: A Comparison (1/3)

  4. JBoss/JOnAS: A Comparison (2/3) [LP]

  5. JBoss/JOnAS: A Comparison (3/3)

  6. Two kind of sensors: Physical sensors (for physical resources e.g. hosts and networks) Logical sensors (for logical resources e.g. the applications, file system, middleware services) Different implementations for Physical and Software sensors depending on the Application Server used (e.g. JBoss, JOnAS) Sensors Implementation

  7. JBoss Every resource seen as an MBean Sensors can be seen as resources so as to be implemented as MBeans Sensor MBeans registered with the MBeanServer: other middleware services can use them through their interface made available by the MBeanServer JOnAS Standard java object/thread Note: use of other “tools” such as JRes, i.e. a resource accounting interface for Java [JRes98] Evaluation in progress Sensors Implementation: Physical Sensors (1/4)

  8. Example in JBoss publicinterface HostSensorMBean { // standard methods // public String getJndiName() throws Exception; // public void start() throws Exception; // public void stop() throws Exception; // … // Proprietary methods // public RawMetric getRawMetric() throws Exception; // … } publicclass HostSensor implements HostSensorMBean { // implementation of standard methods // implementation of proprietary methods } Sensors Implementation: Physical Sensors (2/4)

  9. Example in JOnAS import org.objectweb.jonas.service.Service; public class HostSensor implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of proprietary methods public RawMetric getRawMetric() throws ServerException { ………… } ……… } Sensors Implementation: Physical Sensors (3/4)

  10. Configuration file in JBoss In …/server/default/conf/jboss-service.xml add: <mbean code = “directory_with_the_code_of_the_sensor” name=“jboss:service=HostSensor”> <attribute …………… ></attribute> </mbean> Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……,HostSensor jonas.services.HostSensor.class a.b.HostSensor Sensors Implementation: Physical Sensors (4/4)

  11. Intercept client/server remote method calls for monitoring applications hosted by the ASP and every kind of logical resource JBoss Adopts the concept of Interceptors, i.e stateless componentsthat realize the implementation of “advices” in Aspect Oriented Programming Interceptors may intercept method invocations, constructor invocations, and field access Interceptors are chained together at EJB container level List of Interceptors with the last one used for invoking methods on EJBs Used to check particular conditions before/after invoking business methods at run-time JOnAS No concept of Interceptors (even for last release 3.2) Possible implementation through proxies Sensors Implementation: Logical Sensors (1/4)

  12. Example in JBoss publicclass MyInterceptor implements Interceptor { public Object invokeHome(Invocation invocation) throws Exception { Object result; // Here evaluation of certain QoS conditions before bean is looked up result = getNext().invokeHome(invocation); // Here evaluation of certain QoS conditions after bean is looked up return result; } public Object invoke(Invocation invocation) throws Exception { Object result; // Here execution of the code we want to be called before the method invocation Method method = invocation.getMethod(); // Here execution of the code we want to be called after the method invocation return result; } // Other standard public methods (getNext, setNext, setContainer, create, start, stop, destroy) } Sensors Implementation: Logical Sensors (2/4)

  13. Example in JOnAS import org.objectweb.jonas.service.Service; public class MyProxy implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of main methods performed by a proxy which intercepts client/server method calls ………… } Sensors Implementation: Logical Sensors (3/4)

  14. Configuration file in JBoss In…/server/conf/all/standardjboss.xmladd: <container-interceptors> <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor> <interceptor>org.jboss.ejb.plugins.MyInterceptor </interceptor> Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……, MyProxy jonas.services.MyProxy.class a.b.MyProxy Sensors Implementation: Logical Sensors (4/4)

  15. Example in JBoss public interface ConfigurationServiceMBean implements MBean { // standard MBean public methods // discovery public availableResource discovery(SLSAppl#, membership) throws Exception; // negotiation public agreedQoS negotiation(SLSAppl#,availableResource) throws Exception; // reservation public void reservation(membership) throws Exception; } public class ConfigurationService implements ConfigurationServiceMBean { // implementation of standard MBean public methods // implementation of discovery, negotiation, reservation } CS Implementation (1/3)

  16. Example in JOnAS import org.objectweb.jonas.service.Service; public class ConfigurationService implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of discovery, negotiation, reservation public availableResource discovery(SLSAppl#, membership) throws ServerException {………… } // negotiation public agreedQoS negotiation(SLSAppl#,availableResource) throws Exception {………… } // reservation public void reservation(membership) throws Exception {………… } } CS Implementation (2/3)

  17. Configuration file in JBoss In …/server/default/conf/jboss-service.xml add: <mbean code = “directory_with_the_code_of_the_CS” name=“jboss:service=ConfigurationService”> <attribute name=“Port”>8080</attribute> </mbean> Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……, ConfigurationService jonas.services.ConfigurationService.class a.b.ConfigurationService ……… CS Implementation (3/3)

  18. We favour JBoss useful notion of interceptors larger number of auxiliary services (e.g., clustering, load-balancing, fail-over, web services) more widely used than JOnAS Concluding remarks

  19. G.Lodi and F.Panzieri “JBoss vs JOnAS: A Comparison ”, TAPAS internal draft, University of Bologna, June 11 2003 W.Beckmann, M.KoBmann “An answer to the JBoss vs JOnAS Comparison ”, TAPAS internal draft, Adesso, June 30 2003 G.Czajkowski and T.Von Eicken “JRes: A Resource Accounting Interface for Java “, In Proceedings of the 1998 ACM OOPSLA Conference, Vancouver, BC, October 1998 http://www.jboss.org/ http://www.objectweb.org/jonas/current/doc/JOnASWP.html Scott Stark and the Jboss Group ``JBOSS Administration and Development Second Edition'', Atlanta, USA, November 10 2002, JBoss Version 3.0.4. References

More Related