JBoss framework for analysis

1. Introduction

1.1 JBoss What is this?

JBoss is free, open source implementation of J2EE, which were released through the LGPL license. It provides the basic EJB container and EJB (seems to be J2EE) services, such as: database access JDBC, transactions (JTA / JTS), information system (JTS), naming mechanism (JNDI) and management support (JMX). The current release version 2.2.4, JBoss EJB 1.1 and some achieved the standard EJB 2.0, JMS 1.0.1, Servlet 2.2, JSP 1.1, JMX 1.0, JNDI 1.0, JDBC 1.2 and 2.0 extension (support connection pool (Connection Polling)) , JavaMail / JAF, JTA 1.0 and JAAS 1.0 standards, JBoss is 100% pure Java implementation can run on any platform.

1.2 Motivation

The project's motivation is that we want to analyze the performance of middleware based systems. Based on our previous development experience, we know that different J2EE Application server performance and scalability, has a great difference, and Xiang Xin architecture is carefully designed Jueding similar to the performance and scalability of the important factors such as quality indicators, we want to by analysis of the system to understand how architecture for performance and scalability with the kind of impact. Regardless of the limitations of conceptual models or actual models of behavior for system operation Reflect (reflection) applications, they can still provide us with a comprehensive framework for the entire system of understanding the point of view and meet the basic situation of the analysis model premise.
1.3 Methodology

The structure of large software systems can be divided into two levels: conceptual framework and practical framework. Conceptual framework by subsystem "bundling" analysis and the analysis of subsystems described the system architecture. Each subsystem has a clear and meaningful way, and they include the whole system of special architectural style. The actual structure and conceptual framework with less than up the hierarchy. It expresses the reality of programming planning / model the actual manifestation of it, and imagine there are many different conceptual framework. In this project, we will JBoss conceptual framework and the actual structure of the division. Imagine the conceptual framework model to segment and by reference obtained from our own experience, applications and JBoss configuration online forum. Right now, we start paying attention to the level of each component in the module's functionality, they are not related to each other. The actual structure of the model is comprehensive. We used reversed engineering tool Together 5.5 to turn on the source code into class (class) diagrams and sequence (sequence) map and to model them in an integrated subsystem. Together 5.5 support for application design, implementation, configuration, and a reversal of JBoss projects. It can Java files and class files to get the class diagram. A deeper level, through the use of Together we select the appropriate special methods to obtain sequence diagram. There are two tools can help us to understand the components of behavior, the final actual model and conceptual model comparison. Other than the actual model modules, components and other parts will also be discussed.
1.4 Organization

The report is organized according to the following order: the second part will introduce the overall JBoss architecture design and main components. The third section discusses the conceptual model of JBoss subsystems, namely: container framework and its plug-ins. JBoss Naming Service (JNDI), JBoss container managed persistence (CMP) and the JBoss transaction services. The fourth part, we will dig JBoss subsystems are referred to the actual model and the corresponding between the components of a solid relationship. The fifth part, we come to evaluate the JBoss architecture style and performance, can change the nature, scalability, and a series of quality indicators on the performance. In the sixth section we will discuss our future work and present our final conclusions of the report.
2. 2. JBoss Server Architecture Overview

The framework of JBoss and other J2EE application server architecture has a huge difference. Module JBoss JMX architecture is built on the bottom, the next chart shows the major components and JBoss JMX connection.

Figure 1-1 Overall JBoss Conceptual Model
2.1 JMX - level

JMX is a reusable framework, it is remote (Remote) and local (Local) extends the application of management tools. Its structure is layer-type structure. They realize layer (instrumentation layer), agent layer (agent layer) and the release layer (distribution layer). Among them, the release layer is still waiting for future standardization. Brief statement that users manage Bean, MBean to provide access to appropriate resources to achieve method. Implementation level to achieve the relevant characteristics of resources and it is published in the JMX-related applications, it is the agent layer of control, and release the corresponding agent registered in the MBeanServer the management of resources. .

Figure 2-1 JMX layer model
2.2 JBoss main modules

JBoss main module is available on the MeanServer management MBean. [2]. 1.JBoss EJB container is the core of JBoss server implementation. It has two features, first produced in the run-Stub and Skeleton EJB object class, the second is to support hot deployment.
2.JBossNS JBoss naming service is used to locate objects and resources. It implements the JNDI J2EE specification.
3.JBossTX by the JTA / JTS transactions to support management control.
4. Deployment Support EJB (jar), Web application document (war), and enterprise applications, documents (ears) of the deployment. It always concerned about the situation J2EE application URL, once they are changed or when there will be automatically deployed.
5.JBossMQ to Java Message Specification (JMS) implementation.
6.JBossSX support or not support based on JAAS JAAS security implementation mechanisms.
7.JBossCX realize some functions of JCA. JCA developed a J2EE application components to access the resources based on connections.
8.Web server supports Web container and the Servlet engine. JBoss 2.4.x version supports Tomcat 4.0.1, Tomcat 3.23 and Jetty 3.x services.

2.3 How do they work?

When JBoss is started, it's the first step is to create an MBean server instance. A component-based management mechanism by Mean Server MBean in JBoss is inserted in the register. JBoss implements the dynamic class loading M-Let service, which is the proxy service, M-let allows MBean is registered to the MBean server. Text file-based configuration files in the configuration, the corresponding MBean will be loaded.
JMX MBean server itself does not actually achieve a lot of features. It works like a MBean associated micronuclei in aggregate components replaced by Mbeans up JMX MBean service provides the appropriate function, In other words, the real work is the MBean. JBoss does not follow the overall structure of the document Garlan and Shaw style of strict classification structure to replace it is a component of the plug-in framework. MBean interface is a connector.
In this letter the rest of the report, we chose JBoss JBoss EJB container architecture, JBossNS, JBossTX and JBossCMP subsystems to be learning. Although JBossCMP, Bean's container-managed entity persistence layer is part of the container structure, but we will discuss it separately, because they have their own framework. We only presented in three parts to this project because they are concerned about our JBoss application server performance issues critical point. In this project we use the methodology can be extended to more useful to study subsystem.

3. Conceptual framework model

3.1 The conceptual framework of the container model - Plug-in

JBoss EJB container is the core of JBoss server implementation. Figure 3-1 shows the conceptual model of EJB container. We found that JBoss container architecture is not a strict sense of the layer, must the majority of independent pieces of two-way management, container depends on the more low-level components. In fact, the container and its plug-in instance pool (instance pool), an instance of cache (instance cache), interceptors, sustainable management entity, stateful session persistence management, are based on plug-in framework for the specific EJB to provide appropriate EJB services.

Figure 3-1 Container Conceptual Architecture Model
3.1.1 The main components and interfaces

EJB client can not directly access instance but through the Home (EJBHome) and containers provided by the remote object (EJB Object) interfaces. Container class is to follow the client's call to provide Bean instances and to achieve operation. Container class responsibility to implement the interactive plug-ins for the plug-in providing information to achieve operational and management of Bean's life cycle. Container class has four subclasses (four Bean's type), namely: StatelessSessionContainer, StatefulSessionContrainer, EntityContainer and MessageDrivenContainer. They are made ContainerFactory Bean through corresponding type is created in the deployment period and initialized. ContainerFactory be used to create the EJB container and the container to deploy the corresponding EJB. ContainerFactory be realized as a MBean. This means that JBoss server startup time and the corresponding services are started. It will be the XML definition of EJB-jar file was the appropriate URL. ContainerFactory use EJB-jar XML in the metadata instances and enable them to produce a container that can be invoked in a state of the deployment period, ContainerFactory features include:

Through the EJB deployment descriptor file types to create a subclass of Container, the four sub-class one.
Standardjboss.html file created by jboss.xml and container property.
By defining the contents of the document in standardjboss.html create and add the container interceptors.
Use the application object to contact the appropriate container.
ContainerInvoker is a Java RMI server object. As expressed in his name, ContainerInvoker through the client's request (request) method to call the appropriate container. Client requests and can be seen as the interface between the container, it uses RMI to obtain their effective calls, regardless of the calls from other JVM on the remote client or from the same JVM and other applications on the same EJB Bean. ContainerInvoker work in the communications level, through a special protocol to communicate. If you want to achieve in the JBoss server, the new agreement, the first is the need to provide a realization of the agreement ContainerInvoker. JBoss communication layer back through the Sun RMI's JRMP, ContainerInvoker the RMI version is JRMContainerInvoker. To achieve a ContainerInvoker EJB split in the corresponding communication protocol, this design change of the system increases. JBoss EJB container used in the agreement may be in the corresponding definition of the server configuration file.

EJB object instance is placed in InstancePool period in order to reduce the running cost of creating them. In the Instance Pool in the instance of the EJB object can not, and other exchanges, they are managed by the Instance Pool.

Stateful Session Bean and Entity Bean instance will be cached based, in the life cycle they have the appropriate state. A cache instance through the instance pool access, and special objects they are associated and marked with the corresponding. The state controlled by the InstanceCache, for example, an instance of the state in the cache and the second storage medium in synchronization objects.

EntityPersistenceManager Entity Bean persistence for work.

StatefulSessionPersistenceManager for stateful session Bean's persistent work.

Obtained through the container interceptor corresponding method call. In the container configuration file standardjboss.html, the interceptor is a method call must be defined in one turn. Figure 3-2 shows the method calls through the interceptor logic execution order.

Figure 3-2 interceptor pipeline through method calls this design follows David Garlan and Mary Shaw's "pipes and filters" ("pipe and filter") architecture defined in this definition of the filter prototype is a component, which includes similar to the output data stream and always occurred in the input stream is completely read out after the calculation of the areas of enhancement, the interceptor is a filter and interceptor method calls in a row connectors. Interceptor is part of the whole framework of the advantages:
It is to know the behavior of each pipeline stage.
It is through the module to support reuse and extension, between different interceptors obviously a functional difference. Add a new interceptor, the first is the need to implement the interceptor and he defines the interface to the appropriate container configuration file to support synchronization.
Semantic interpretation with fast fault-tolerant. If the interceptor processing errors or irregularities, will be a corresponding expression.
3.1.2 Dependence

Essentially, InstancePool, InstanceCache, EntityPersistenceManager, StatefulSessionPersistenceManager, are container plug-in interface. Container plug-in implementation of these interfaces a collection of objects. JBoss container does not do too much complex work, it just provides a connection of different plug-in framework.

Containers sent to the interceptor method call message.
Interceptor relies on a session Bean instance InstancePool to access or rely on access entity Bean instance InstanceCahce best time for a free Bean, InstanceCache will interact and InstancePool
InstanceCache dependent on EntityPersistenceManager (or StatefulSessionPersistence Manager) through the data source instance of the state of initialization. .
Interceptor depends on EntityPersistenceManager (or StatefulSessionPersistenceManager) instance of the state through the data source synchronization.
When the implementation of the client request, the container frame depends on other services outside of function blocks, naming services, transaction services, security services and resource management. For example, when a client requests a transaction information will update the database contents, the container will receive the corresponding service by naming the data source and resource management to provide the corresponding data source driver. The whole process within the container, the transaction manager and resource manager to control by the transaction services.

Unlike traditional distributed system architecture, EJB container in the deployment descriptor to declare an external property. Although the containers and metadata, as the central role of information communication, it is shown in the deployment of services in the external independence and other services is still a little different. This means that its information in the deployment phase, when the container was placed.

3. 2 JBoss Naming Service's conceptual model

3.2.1 The main JNDI API

JNDI naming service provides a large number. The main JNDI API is javax.naming.Name, javax.naming.Context and javax.namingInitialContext. Name system is fundamentally a collection of objects and each object has its own name. Context is the client access to naming service interface. InitalContext achieved Context. JBoss naming system is the JBoss JNDI provider. Source code org.jnp package, as we mentioned in the second part of the same, JBoss naming system is implemented as MBean. Figure 3-2 shows the conceptual model of JBoss naming system.

Figure 3-3 JBoss naming service conceptual model
3.2.2 The main components and interfaces

Org.jnp.server package includes naming service MBean, Main packing the Main NamingServer and publish it. NamingServer job is to "name - object" pairs of sequence arrangement.
Org.inp.interface package inherits / implements javax.naming .* interfaces, this is a J2EE specification. The interface can be remote access client. It enables in Naming Server in the Main and naming services to interact, NamingContext implements javax. Naming.Context interface, it is the client and the interface between the JBoss naming service.

3.2.3 dependence

JBossNS no more external dependency.
3.3 JBossCMP conceptual model

3.3.1 Main components and interfaces

JBossCMP JAWS to support by extending the Java memory objects and relational database mapping between the basic storage (an O / R Mapping concepts). JBossCMP includes support for EJB 1.1 container managed persistence (CMP) model components. In CMP entity Bean model, EJB entity persistent state performance is determined by the container. Container to access the database is an entity Bean's behavior. Figure 3-4 shows the conceptual model of JBoss CMP service.

Figure 3-4 JBoss CMP Services Conceptual Model
EntityContainer dependent EntityPersistenceManager management interface for persistence entity Bean.
CMPPersistenceManage achieved EntityPersistenceManager interfaces. As we mentioned earlier, container managed instance of the state. EJB1.1CMP semantics are callback methods, ejbLoad, ejbStore, ejbActivate, ejbPassivate, ejbRemove provides examples of state of the container point of view expressed. In fact, it is CMPPesistenceManager doing a job: an instance of the underlying database and the cache status of the synchronization. For example: When a Bean cache data is loaded, CMPPersistenceManager Bean instance will call the container callback methods ejLoad. When the cache data need to update the database, ejbStore method will be called to prepare the corresponding cache data, so CMPPersistenceManager will focus on updating the database.
EntityPersistenceStore interface implementation is concerned that the specific details of physical storage. CMPPersistenceManager entity authorized to conduct on EntityPersistenceStore the actual contents of persistent storage. Note EntityPersistenceStore is an interface, it keep persistence to achieve the customized storage space, eg. File-based storage or database storage.

3.3.2 Dependence

JBossCMP not and JBossNS is implemented as a MBean service. In fact, it was included in the EJB container package org.jboss.ejb through the container to interact with other plug-ins. The surface, JBossCMP is dependent on JbossNS to obtain the corresponding data source called Bean instances in the persistent storage of data.
3. 4 JBossTX conceptual model

3.4.1 Main components and interfaces

JBossTX architecture can be achieved using any standard JTA transaction management. In a distributed transaction of the key players include::
1. Transaction Manager: it provides appropriate services and management methods to support transaction demarcation, the transaction resource management, content distribution and transaction synchronization functions. Javax.transaction.TransactionManager interface for use by RMI to export transaction management.
2. Application Server: an application server (or the TP monitor) provides the infrastructure to support run-time environment, the transaction state management applications. Examples of the application server is: EJB server / container.
3. Resource Manager: Resource Manager to provide access to other resources functions. Explorer example: relational database server.
4. Transaction details: the transaction to determine the content of a particular transaction.
5. Trading clients: trading in a single transaction the client can call one or more trading partners.
6. Trading partners: the behavior of trading partners is the operation of the content from the transaction to decide. Most of the EJB Bean is a transaction object.

Figure 3-5 JBossTX conceptual architecture model
3.4.2 dependence

JBossTX architecture is designed to be implemented using any JTA javax.transaction. TransactionManager interface, transaction management, JBoss transaction management will be seen as an MBean, and can be output through the RMI as a service of its own.
Transaction management services are the basic requirements of service management in the JBoss server startup directory through JNDI name bound to achieve it. Therefore, JBossTX appears to be dependent on the JBossNS's.
4.4. The actual structure of model

The actual structure of the model is reversed by engineering tools available through the JBoss source code. We chose TogetherSoft's Together 5.5. Together 5.5 is a Case IDE tool, which can or jar file through the source code to generate the corresponding class diagram. It also supports tracking the corresponding class diagram to create the corresponding sequence diagram of the method, the user can select the visual interface. Here is an overview of how it works.
When the developer noted that a group of files the package has the same functionality, we found that the level of the source code package is very similar to the conceptual model. We will be in different source code packages to follow our conceptual model of the rearrangement of the corresponding group, and import them into the Together 5.5.
Actual structure model and we look forward to understanding the conceptual model is essentially the difference. Some components and associated performance is quite special, and some do not do any of that. This is because the actual model and compared with the conceptual model is closer to the realization of the concept of run-time behavior. In this chapter, we will discuss container, naming services, container-managed persistence (CMP) services and transaction services to the actual model.
4.1 containers real model

4.1.1 Method of access to comprehensive practical model

Figure 4-1 shows the container and its plug-independent map. We Together 5.5 on the actual structure model and our model of the brain inherent understanding of the concept differs significantly, which is a layer structure model is implemented in the top plug-in implementation component, the container is in the middle layer, insert Interface at the bottom. Interceptors and the relationship between the persistence manager is not visible, it is calculated based on instinct JBoss documentation. We find it due to the relationship between the type Together 5.5 visual trap. Components at the same level association are ignored, for example, the entity instances and entity entity interceptor. To solve this problem, we use the following steps:
1. Rearrangement container source code and its plug-in interface, according to Bean type to achieve. Import them into Together 5.5 project.
2. Analysis of component dependencies and inherent connection.
3. As a key component of the selection of key approach, tracing the method call to generate the message view.
4. Repeat steps 1,2,3 to synthesize the actual model of the container structure.
Figure 4-1,4-2,4-3

Figure 4-1 container dependecy diagram

Figure 4-2 container inherence diagram

Figure 4-3 method invocation message diagram
4.1.2 Non-formal components and dependence

Here we only discuss the framework model of the container entity. In the appendix we show StatelessSessionContainer and StatefulSessionContainer actual architecture model.

Figure 4-4 solid container frame model is based on the actual dynamic proxy container design EJB specification, EJBHome realized Bean's local interface, EJBObject realized Bean's remote interface. EJB client view EJBObject and interact. Container Provider's responsibility is to produce javax.ejb.EJBHome and javax.ejb.EJBObject. JBoss EJB Container Design of view is better here, this is not the object of achieving EJBHome and EJBObject here by the dynamic proxy mechanism to access EJBHome and EJBObject role. (JBoss is based on Dynamic Proxy mechanism Auspic is based on the automatic code generation mechanism.) Dynamic proxy mechanism is an object, it can run a series of interfaces period to achieve a specific mechanism to implement through the java reflection.
Deployment of ContainerFactory create and initialize the appropriate container. Home object is to use a dynamic loading mechanism to create JRMP ContainerInvoker, we will discuss it the following article. InvocationHandler replaced by HomeProxy class, now he can be defined in the deployment descriptor file and is specified as a JNDI name bound in the JNDI naming tree.

Proxy is serializable, which means it can be sent through the network to the remote client where to go. When a client through JNDI to find EJBHome, the local proxy instance is serialized. The client, the local proxy instance is deserialized. Because the proxy implements Bean's local interface, it can be used as a local interface to capture and use.
When the client use the local object reference reference to request the appropriate EJBObject.EJBObject the dynamic proxy will be automatically generated by the above code. InvocationHandler one EJB object will be replaced by proxy, that is, based on the type of Bean's StatefulSessionProxy, StatelessSessionProxy and EntityProxy to get. Local agents have in common, EJB proxy object can be serialized and sent over the network to the remote client.
Finally, the client access to EJB object's handle, and use it to call the server-side deployment of the Bean's methods. Local and dynamic proxy object by calling the client InvocationHander.
EJB proxy
StatefulSessionProxy, StatelessSessionProxy and EntityProxy achieved InvocationHandler interfaces. As they pointed out that the same name, in the container in which they work like a proxy. They first focus on methods of dealing with client requests. If the method is deployed in the server side to achieve the remote method call, then call will be converted to RemoteMethodInvocation object, then the packaging will be MarsharlledObject pass through the RMI JRMPContainerInvoker.
JRMPContainerInvoker
Back to the 3.1.1 section, ContainerInvoker is a container transport handle, JRMPContainerInvoker realized RMI / JRMP Transfer Protocol. It achieved ContainerRemote interface by receiving remote method calls to the output of its own, to achieve ContainerRemote interfaces inherited java.rmi.Remote.JRMPContainerInvoker, through the implementation of the invoke () and invokeHome () two methods to obtain optimal. The first use of MarshalledObject parameter (the value of call) and other parameters using the method of reflection type (Reference call), if the container invoker from the same VM, call the device will choose to ignore MarshalledObject Reference call sequence, otherwise, method Call information will be MarshalledObject EJB method calls by the original (such as security and transaction content) of attributes unpack. Then, it is converted to written MethodInvocation pass through the container.
EntityContainer and its interceptors in the deployment period container type is specified by the type of Bean. ContainerFactory create and initialize it. In addition, for each Bean type, standardjboss.xml are defined using the containers and they call the order of the interceptors. Interceptor can be created and initialized, each container maintains a set of interceptors. It contributes to the sequence for the first interceptor method call, which is through the invoke () method implementation. First deal with the corresponding interceptor by calling their call and invoke () method to trigger the next interceptor, the last one interceptor is ContainerInterceptor, its job is to delegate method calls to the Bean instance.
Dependence
We re-arrange the structure model in order to facilitate the practical and conceptual model is easier to compare. As we described in section 3.1.1 InstancePool, InstanceCache, Intercptor and are inherited in ContainerPlugin PersistenceManager interface. In the actual model, the container plug-in layer is replaced by the actual realization of components. These components to achieve the plug-in interface, so EntityContainer level in the plug-in interface to control flow to be entrusted to the actual realization of the current component. The relationship between the plug interface, such as InstanceCache and InstancePool actual implementation in the current component in the control flow,, EntityInstance and EntityInstancePool.
An entity Bean's persistence management, there are two types, Bean Managed Persistence (BMP) and container-managed persistence (CMP). BMP programmers as you need to be very concerned about the Bean cache state and the synchronization between the underlying database. Using CMP, the container will have a corresponding code to handle this kind of thing, which would relax the programmer. Between the performance of their not discuss the content of this article, we will discuss that later JBossCMP structure.
Each interceptor interceptor interfaces are implemented, they are all container plug-ins. And entities, like Bean, EntityInstanceInterceptor, EntityLockInterceptor and EntitySynchronizationInterceptor Bean instance using BeanLockManager for current control.
The implementations of each ContainerPlugin and EntityContainer related, it will know which container is being setContainer () and getContainer () method call.
ContainerInvoker and Container exchange is necessary, for example a Session Bean Entity Bean can call the method. ContainerInvoker is a container interface, which uses Containernvoker.JRMPContainerInvoker and ContainerInvokerContainer correlated, ContainerInvokerContainer is actually the EntityContainer.
MethodInvocation network access in all components. All of the components and its associated.. MethodInvocation dependent on EnterpriseContext, EnterpriseContext and and lifetime of the instance of the Bean instance is associated. Bean model, the entity, the entity Bean is a Java object and the performance of the underlying database. CacheKey is for the PrimaryKey component package, EntityEnterpriseContext dependent on CacheKey to get entity objects EntityProxy container as an entity through CacheKey parameters.
Summarized and compared to the conceptual model, some special relationship between the components and their display of the special features of the JBoss EJB container. Dynamic proxy mechanism design and pre-compiled container design was essentially between the different techniques used in many pre-compiled to be tested to achieve the EJB container (for example: WebLogic, etc.). Appendix -3 shows the EJB container conceptual model of test equipment. JBoss document declared that the dynamic proxy-based design EJB container to container design easier. It will affect the quality attributes, such as the actual model can not be directly observed performance problems. It must go through stringent quality tests, it will be our future work.
EJB containers EJB container plug-in framework allows flexibility and scalability to become better. If you need to change just to write a specific implementation of the new structure can be.
4.1.3 Entity Bean container sample and its implementation method calls the plug-in

Figure 4-5 shows the client and the EJB container / server interactive situation. We analyze the actual EJB container model can help us understand the behavior of the container.

Figure 4-5 Client and EJB containers interact with hands
1. In the deployment phase, EJB local object will be bundled in the JBoss JNDI naming service tree, and assigned a JNDI name.
2. JNDI first contact with the client to get the EJB local naming service object.
3. The client by using the EJB local object Reference to a request to the EJB object.
4.EJB local objects to create (or find) a reference to its EJB object and returned to the client.
5. EJB client access to an object reference, and in the remote interface, call the appropriate method.
6. Containers under way to intercept the call and its delegate to the Bean instance, the corresponding instance of the remote interface will return the result value to the client.
7.LogInterceptor to record the call log.
8.TxInterceptor through XML deployment descriptor, follow the call method to decide how to manage transactions.
9.SecuirtyInterceptor through XML deployment descriptor to verify whether the call can do.
10. Container in his call to Bean's business methods must be an instance when, EntityInstanceInterceptor by giving a primary key to call InstanceCache this to get the appropriate entity Bean instance.
11. If the cache did not provide consistent examples of the primary key, it will notify InstancePool get a free instance and the associated primary key.
12.InstanceCache now call the PersistenceManager, it is by calling ejbActivate () method to get an instance has been activated.
13.EntitySynchronizationInterceptor was EntityInstanceInterceptor call, to handle instance and database synchronization. It has several options, each option defines an interceptor, loadEntity () method will be called in EntityPersistanceManager.
14.ContainerInterceptor is the last in the chain of interceptors, it is added by the container itself, rather than the container factory, the business method call has now been delegated to the EJB instance.
15. Examples of some of the work achieved and returns the results.
16.EntitySynchronizationInterceptor selected examples of the current state of storage into the database, PersistenceManager's storeEntity () method will be called.
17. Instances will be returned into the cache. When the transaction is invoked at run time, instances, and this transaction will be locked so no other period in the trading transaction can use this instance.
18.TxInteceptor follow the appropriate method of handling transactions, and set against the current choice to commit or rollback transactions.
19. Container return mechanism activated to return the results to the client.
4.2 JBoss Naming Service actual model

4.2.1 the relationship between specific components and

Figure 4-2 is the actual JBoss naming service architecture model. As a practical model of the container, here with special components and dependencies between components, similar to NamingService MBean and its associated subsystems and org.jnp, in the following section, we will show the details.

Figure 4-2 JBoss Naming Service actual model
Org.jboss.naming.NamingService be realized as a MBean. It provides a JNDI naming service, the NamingService created the Main MBean and manage their condition. When a NamingService start, it will initialize and start the Main MBean. NamingService the corresponding functions for the commission to the Main MBean. Copy MBean in line with our conceptual model, however, is back in the representation of the JNDI naming service JBoss is implemented into a standalone application. NamingService MBean by creating a new instance of the insertion Main MBean. Benefits of this design is that if the JNDI VM and the JBoss Server VM line, then, JNDI operation will be connected through the socket to reduce the corresponding costs.

4.2.2 EJB client access to examples of local objects

To better understand the JBoss naming service architecture, we give an example and to track the call process. For example, when a client wanted to call a Bean's methods, it had to first locate Bean Home, as it is for the client needs to create Bean instance handle. JNDI name of the local object is defined in the deployment period in the deployment descriptor file. Client running period by using the JNDI name to access the naming service to obtain the corresponding object.

1. When the JBoss server startup, NamingService MBean will be registered and waiting for calls.
2.NamingService initialization Main MBean and making the appropriate naming service through listening Socket port ready to be called.
3. A naming service provides the client environment configuration.
4. A client to create a new IntialContext, which is used to create a new NamingContext NamingContextFactory the stimulation device.
5. A client by providing the JNDI name in the JNDI naming service to locate the corresponding local object. NamingContext connect the appropriate name server for the appropriate position.
4.3 JBossCMP actual model

Figure 4-6 shows that we have obtained through the Together 5.5 JBossCMP associated and inherent content. JBossCMP actual model is very similar to our conceptual model. This particular subsystem is JWAS.
Figure 4-6 JBossCMP dependent and associated graph
4.3.1 special components and connections

Org.jboss.ejb.plugin.jwas package includes the JBoss in the CMP entity Bean O / R Mapping tool, the default implementation. It uses the JDBC database as its persistence store.
EntityPersistenceStore the default implementation of a JAWSPersistenceManager.
CMP Entity Bean persistence store customized to achieve the EntityPersistenceStore the interface methods. JAWSPersistenceManage its subclass by calling the execute () method to implement, for example, JDBCActivateEntityCommand JMPActivateEntityCommand through its interface methods, JAWSPersistenceManager database-based storage. If there are other storage media, it needs to provide an interface to achieve a JMPXXXCommand package.

Figure 4-7 JBossCMP Table 4-1 shows the actual model EntityPersistenceStore the interface method, in org.jboss.ejb.plugin.jwas package interface is implemented to achieve the EntityPersistenceStore the JAWSPersistenceManager use, and in those interface is relatively low level implementation.
EntityPersistenceStore interface name in the method name of method to achieve
createEntity JMPCreateEntityCommand JDBCCreateEntityCommand the time when the entities called
findEntity JMPFindEntityCommand JDBCFindEntityCommand was found as a single entity called
findEntities JMPFindEntitiesCommand JDBCFindEntitiesCommand collection was discovered when the entity called
activateEntity JMPActivateEntityCommand JDBCActivateEntityCommand when the entity is activated when the call
loadEntity JMPLoadEntityCommand JDBCLaodEntityCommand loaded when the entity is called when the underlying storage
loadEntities JMPLoadEntitesCommand JDBCLoadEntitesCommand when a group of entities to be called when the underlying store pre-loaded
storeEntity JMPStoreEntityCommand JDBCStoreEntityCommand when the entity needs to be written called when the underlying storage
passivateEntity JMPPassivateEntityCommand JDBCPassivateEntityCommand when the entity is called when passivation
removeEntity JMPRemoveEntityCommand JDBCRemoveEntityCommand when the entity was removed from the underlying storage when the call

4.4 JBoss Transaction Management Entity model

Figure 4-8 shows that we obtained from the Together 5.5 JBossTx association and inherent information map. So far, we have not from the UML diagram surprised to find some special components and related, we ordered again the key components and relationships of the association and the collection so that we can draw the actual model integrated.
Figure 4-8 JBossTx dependency and inherency diagram
4.4.1 special components and associated

We are concerned about JBossTx conceptual model, JBossTx is implemented as MBean to be released by RMI. Through RMI / JRMP content distribution deal is designed to be two interfaces, TransactionPropagationContextImpoter interface, its implementation has been used to spread Exchange trading of imported content, TransactionPropagationContext Factory interface, its implementation has been used to spread from the client access to the contents of transaction . When the transaction manager is started, its first task is familiar with the JNDI location to bind TransactionManager, TransactionPropagationContext Impoter and TransactionPropagationContextFactory.
TxManager achieved javax.transaction.TransactionManager and its upper two interfaces. It is managed by the TransactionManagerService. TxManager rely TransactionImpl to achieve trading operations, similar to the statement of the transaction begin, commit, rollback method. Interestingly, TransactionImpl just a lightweight front TxCapsule. TxCapsule method calls through TransactionImp be controlled. TxCapsule controls all information about a transaction. In this class implements the callback and synchronization, it is to tell them apart by XidImpl transactions.
Session Bean in JTA transactions through management conceptual model called Bean. In this model, javax.transaction.UserTransaction is required. JBossTx by a subsystem implements UserTransaction interface, located in org. Jboss.tm.usertx package. Usertx divided into two subsystems, the client and server side, they interact through the interface.
This is a very pure layer structure. ClientUserTransaction UserTransaction implementation of the client. It commissioned by UserTransactionSession all the UserTransaction interface, to call the appropriate server. UserTransactionSessionImpl the server side to achieve a UserTransactionSession interfaces. This is so not in the same location as transaction management, remote client VM. When a client running on the same server VM, ServerVMClientUserTransaction is a client of Usertransaction achieved, it will delegate all the UserTransaction calls to the server-side TransactionManager. And JBoss, like most of the services, UserTransaction's used as a MBean to implement and manage. It is bound by JNDI name UserTranaction the corresponding position in the JNDI.

Figure 4-9 JBossTx actual model
5.JBoss architecture scalability

Through the above discussion for the JBoss architecture, we can see in the JBoss architecture of the two important features, first is to use JMX as a software bus vertical throughout its entire service, through the new service components to follow JMX standard mount on the "bus" to make the system easier to expand existing services. May be plug-in framework is widely used in the service implementation. Developers can select the services they need to Di and to prepare accordingly they need to achieve, by defining the deployment descriptor In , let JBoss server know. Another is the container is designed to be dynamic proxy mechanism to enable the container to achieve such a simple and allows developers to avoid the laborious pre-compiled jar file to get the stub and skeleton code. But this potential problem is the performance and scalability, because we know that java reflection mechanism will lead to performance losses. JBoss exist in the corresponding optimization program and the research in the future, we will discuss the optimization method to work when and how to work.
6. Conclusion

In this article, we discussed the conceptual framework model and the actual JBoss architecture model. Through use of reverse engineering tools and manual methods of tracking the source code to create a comprehensive real model, we find the actual model and conceptual model based on the document is a considerable difference. This is why the actual model is what it is to achieve levels closer to "real story." Actual model shows the unique JBoss application server, a special design. We tried this method of detection available to the J2EE product and going. Unfortunately, the source code is not always effective and the results of reverse engineering is not completely effective, this will lead to misleading, and we can do JBoss architecture model and conceptual model comparison.
Although, in this article we analyze the structure of the way JBoss is very exciting, but this contact is limited. We still do not get some structure factors for the quality of the conclusions, such as performance, because it depends on the operational life of the diversity of components and subsystems. From the actual model, we obtain the static analysis, a solution is to analyze the possibility of the corresponding source code and its components in the running period to track and test its performance. Here, the conceptual framework model and the model with mapping software, the corresponding node will be the performance of the functions of software components, the corresponding process will be the performance of control flow. Model the actual structure will be mapped into the system execution model, it will reflect the network queue is similar to a key computer resources. Therefore, it is a framework for analysis based on a viable method of JBoss performance testing. Our work is to analyze the JBoss framework to enable us to better understand the system. Next thing to do is get through this analysis to a preliminary analysis JBoss application model to analyze the code is a viable test method Bingke test its performance.
7. Reference

1.JBoss Home Page http://www.jboss.org/
2.JBoss Documentation http://www.jboss.org/doco.jsp
3.JBoss Quick Techincal Overview http://www.ejbean.com/resources/free-open/jboss. Html
4.Prof. Richard C. Holt 's Home Page http://plg.uwaterloo.ca/ ~ holt /
5.Ivan T. Bowman, Richard C. Holt and Neil V. Brewster, Linux as a Case Study: Its Extracted Software Architecture, ICSE 99, Los Angeles, May 99.
6.How do I deploy Enterprise JavaBean to JBoss http://otn.oracle.com/products/jdev/ howtos / appservers / deploy_to_jboss.html
7.The art of EJB deployment http://www.javaworld.com/javaworld/jw-08-2001/jw- 0803-ejb_p.html
8.Superior app management with JMX http://www.javaworld.com/javaworld/jw-06- 2001/jw-0608-jmx_p.html
9.DynaServer: System Support for Dynamic Content Web Servers http://www.cs.rice. Edu / CS / Systems / DynaServer /
10.MTE Project http://www.cmis.csiro.au/adsat/mte.htm
11.TogetherSoft Home Page http://www.togethersoft.de/downloads/down_index.html
12.David Garlan and Mary Shaw, An Introduction to Software Architecture, CMU Software Engineering Institute Technical Report, 1994
13.Loyd G. Williams, Connie U. Smith, Performance Evaluation of Software Architecture, WOSP 98, Santa Fe.NM
14.Felix Bachman, Len Bass, Charles Buhman, Santiago Comella-Dorda, Fred Long, John Robert, Robert Seacord, Kurt Wallnau, Technical Concepts of Component-based Software Engineering, Technical Report, CMU/SEI-2000-TR-008 ESC -TR-2000-007

8. Data Dictionary

[J2EE] Java 2 Enterprise Edition from Sun MicroSystem. It is a web operationg system

[JMX] the Java Management eXtension (TM) to offer standard interfaces to the management of its components as well as the applications deployed on it.

[JAWS] Just Another Web Storage

[JCA] The J2EE Connector Architecture

[JNDI] Java Naming and Directory Interface

[RMI] Remote Method Invocation. It is Sun's object request broker (ORB).

[JRMP] Java Remote Method Protocal.

[JTA] Java Transaction API.
Appendix-1

Figure Appendix-1 StatelessSessionContainer Concrete Architectual Model
Appendix-2

Figure Appendix-2 StatefulSessionContainer Concrete Architectual Model
Appendix-3
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of JBoss framework for analysis

  • Software Performance

    1.1 Software Performance In general, the performance is an indicator that the software system or component to its timeliness requirements in line with the level; followed by software performance, are an indicator can be used to measure time. Performa ...

  • What is the JPA

    Same, JDO, also started compatible JPA. At the field of ORM, it seems that JPA is a benevolent government, is the normative specification. At the support of major manufacturers, JPA use became widespread. 2 Spring Spring + Hibernate often referred to as t

  • J2EE Architect road

    J2EE Architect road Looking casual, working into the fifth year, the discovery came from the Java programmer to architect J2EE course. Found that computer to install a wide range of J2EE tools: JBuilder, WSAD, Eclipse, Rose, Together, Weblogic, Jtest, Opt

  • Spring + Hibernate to use Glassfish Database Connection Pool

    applicationContext.xml file content <? xml version = "1.0" encoding = "UTF-8"?> <beans xmlns = " http://www.springframework.org/schema/beans " xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " ...

  • JAVA EE JSP_JNDI

    dsfdsa http://lindows.javaeye.com/admin/blogs/213348 Tomcat 6 with the connection pool data source configuration http://www.blogjava.net/ec2008/archive/2008/07/19/216063.html project: test Driver path: D: \ workspace \ test \ WebRoot \ WEB-INF \ lib ...

  • Hibernate connection pool configuration

    Hibernate connection pool configuration <! - Jdbc -> <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property> <property name="connection.url"> jdbc: oracle: thin: @ 10.203.14.132:15

  • Hibernate.cfg.xml configuration file (including the primary key generation strategy Introduction)

    Hibernate.cfg.xml configuration file: <? xml version = "1.0" encoding = "utf-8"?> <! DOCTYPE hibernate-configuration PUBLIC "- / / Hibernate / Hibernate Configuration DTD / / EN" "hibernate-configuration-2.0.dtd

  • The EJB3 Persistence

    EJB3 persistence with Hibernate is very similar to the mechanism: Environment: Server: JBOSS5.0 Database: MySQL5.0 1. Set up a data source First of all, in jboss-5.0.0.GA \ server \ default \ deploy, the establishment of a database used to connect the dat

  • spring struts2.0 hibernate environmental structures .. despair carried out more than one hour only with good.

    http://www.qqread.com/java/2008/06/f413762.html Look here. . Note added myeclipse support spring when necessary add the commons-dbcp database connection pool package. And to add hibernate support. . Finally add struts2 support. . Oh the lazy point. . . fu

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries