90 likes | 261 Views
Introduction of JBoss. CS775 Rufeng Liu Nov. 03 2003. Overview of JBoss.
E N D
Introduction of JBoss CS775 Rufeng Liu Nov. 03 2003
Overview of JBoss • Jboss is An application server written in Java that can host business components developed in Java. Essentially, JBoss is an open source implementation of J2EE that relies on the Enterprise JavaBeans specification for functionality. • Started in 1999 as an open source EJB container. --Version 2.x(J2EE based server), 3.x(production server) and 4.x(Research) • Most popular app-server: Free Software, #1 position in download, development, OEM/ISV and 25% market share.
Architecture: Mircokernels, services and aspects 1. Microkernel layer. JBoss uses Java Management eXtensions (JMX) implementation as the first layer. It provides a lightweight component model with full hot-deploy on networks and advanced classloading features and lifecycle management. 2. Service Oriented Architecture On top of the microkernel layer, JBoss provides a series of Services. The services can be a transaction monitor or a messaging service, or a mail service, or a database, or a security service or a connection pool. It is extremelly easy to extend JBoss by plugging in Service ARchive. 3. Aspect Layer The aspect layer enables the system to transparently add the behavior provided by the services into any objects. This is how JBoss's EJB container is built, as a pre-packaged set of interceptors. 4. Application Layer The application layer is the 'user-land' of JBoss. This is where your applications live. JBoss has features such as “hot deployment” that make it the server of choice for advanced developers.
Why JBoss • Free Software, even for commercial work. • Light weighted, so less memory usage, starts 10 times faster than Sun’s J2EE. • Very easy to deploy. • High extensibility. • Well supported.
Implementation and configuration • Install Ant • Install JBoss • Create EJB, example: EJB InterestBean.java, Home Interface InterestHome.java, Remote Interface Interest.java. 4. Deployment Descriptor tells the EJB server which classes make up the bean implementation, the home interface and the remote interface.
Deployment descriptor example <?xml version="1.0" encoding="UTF-8"?><ejb-jar> <description>JBoss Interest Sample Application</description> <display-name>Interest EJB</display-name> <enterprise-beans> <session> <ejb-name>Interest</ejb-name> <home>org.jboss.docs.interest.InterestHome</home> <remote>org.jboss.docs.interest.Interest</remote> <ejb-class>org.jboss.docs.interest.InterestBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </session> </enterprise-beans></ejb-jar>
Packaging and deploying the bean 1. Package the interface and EJB classes and the deploy descriptor file into a jar file. 2. Copy the jar file into the deploy directory, the EJB is then ready to use.