RoadMapAssembler: A New Pattern-Based J2EE Development Tool

Size: px
Start display at page:

Download "RoadMapAssembler: A New Pattern-Based J2EE Development Tool"

Transcription

1 RoadMapAssembler: A New Pattern-Based J2EE Development Tool Jun Chen and Steve MacDonald School of Computer Science, University of Waterloo, Waterloo, Ontario, CANADA j2chen@uwaterloo.ca, j2chen stevem@uwaterloo.ca, stevem Abstract The quality of a J2EE web application depends on both the correctness of the code as well as the efficiency and flexibility of its architecture. Unfortunately, the design and development process is complex and includes tedious coding details, making it error-prone. Part of the problem lies in the incomplete abstractions provided by the J2EE specification. The artifacts of the distributed system environment are still present in applications and cannot be ignored, notably interfaces for distributed objects, name space information, and deployment information. In this paper, we present the detailed design of our design-pattern-based J2EE development system, RoadMapAssembler. This system shows that a J2EE architectural framework can be generated by assembling a set of design patterns in an incremental fashion, exploiting our knowledge of pattern implementations and inter-pattern relationships. This same knowledge also allows us to generate code for the distributed system artifacts that pollute J2EE applications. We demonstrate these features through the development of an example J2EE application. Keywords: Java 2 Enterprise Edition (Version 2.1), Development tool, Design patterns, Frameworks, Name space, Deployment information. 1 Introduction Java 2 Enterprise Edition (J2EE) is Sun Microsystem s solution for multi-tiered enterprise web ap- Copyright c 2005 Jun Chen and Steve MacDonald. Permission to copy is hereby granted provided the original copyright notice is reproduced in copies made. plications. It simplifies web application development by providing a set of standardized components and services to developers. Using Java Remote Method Invocation, J2EE hides most of the low-level distribution details. However, J2EE is still known for its complexity from both the design and implementation perspectives. Although J2EE is designed to hide the complexity of distributed programming, it still suffers from abstraction overflow at the design level. While J2EE provides important services like persistence and transactions that ease application development, the efficiency of those applications is still left to developers. Sun has published a J2EE framework to help developers address these concerns [19]. J2EE (specifically version 2.1, the target of this research) also suffers from abstraction overflow at the code level. Enterprise Java Beans (EJBs) are the integral building blocks of the business tier. EJBs are intended to give developers the impression of writing sequential code instead of distributed code. Unfortunately, they fail in two ways. First, developers must write access interfaces for each EJB. These interfaces are an artifact of the distributed execution environment and are only used by the J2EE runtime; they are not implemented by any class in the application for reasons described in Section 4.1. The need for these interfaces and their connection to the application code is obscure and easily missed by developers. The second way beans fail to hide distributed code is the need for a name space to locate EJBs. This name space is provided by the Java Naming and Directory Interface (JNDI) service. Before a bean can be used, it must be located by a JNDI lookup and a handle to the bean must be created. In both of these fail-

2 ures, code that handles the distributed aspects of the application has polluted the Plain Old Java Object (POJO) abstraction and the application code. After the application has been developed, it must be deployed. This requires that deployment information be assembled into a deployment descriptor for each EJB. A deployment descriptor describes the bean to the container in which it will run. Writing descriptors manually is tedious, cumbersome, and error-prone. This paper presents RoadMapAssembler (RMA), a new development tool that provides a pattern-based approach to the abstraction overflow problems discussed above. For application developers, RMA incrementally builds up J2EE version 2.1 applications by composing patterns from the J2EE framework in an incremental, bottom-up fashion. From the deployment perspective, we have devised a way to use J2EE patterns to completely hide the deployment logic from application logic. The generated pattern code includes both the pattern implementation and all deployment logic, both internal and external. As a result, users can concentrate on their application code and not on the distributed execution environment. The research contributions of this paper are as follows. First, we use pattern information to generate not only pattern implementation code but also to generate pattern composition code (based on the J2EE framework). An important characteristic of pattern composition in RMA is that it only includes the patterns from the J2EE framework that are needed in the application. Second, RMA is able to generate more pattern implementation code than similar systems, notably method-level code between different patterns. This is a result of our bottom-up development approach, which ensures that the components that a pattern may be composed with must already exist and allows RMA to generate delegating methods. Third, we exploit pattern information to generate deployment descriptors, which must describe not just an individual EJB but also the EJBs with which it collaborates. Finally, we expand the role of an existing J2EE design pattern to completely hide the EJB name space and the process of obtaining handles to remote EJBs. RMA is built as an Eclipse plugin [13]. Eclipse has a built-in Java development environment, and has an open architecture development platform based on plugins to allow new tools and abstractions to be introduced. RMA can leverage existing features, such as refactoring and code completion. This paper is organized as follows. In Section 2, we present a demo application that was developed using our tool. In Section 3, we describe how pattern relationships are realized in RMA. In Section 4, we use our sample application to demonstrate how we hide the deployment logic. Section 5 is an initial evaluation of the benefits of RMA. The architecture of RMA is described in Section 6. Section 7 discusses some related work done in J2EE development tools, especially those done in a pattern-based fashion. Future work and conclusions are summarized in Section 8. 2 A Sample Application To demonstrate how RMA helps incrementally build up a web application and hides the deployment logic from application code, we present a simple web application to lay the ground for further discussion. Our sample code models an online astronomer s club, as shown in Figure 1. It consists of four simple use cases: Login, Register, ChangeInfo and ViewPlanetInfo. This example is simple but captures some essential J2EE patterns. By analysis, we can quickly identify four database tables: Client, Address, Planet, and Satellite. The Login use case accesses the Client table for password verification. The Register and ChangeInfo use cases need to access both the Client and Address tables. The View- PlanetInfo use case displays the contents of Planet and Satellite tables. Login, Register, and ChangeInfo are administrative use cases. We aggregate these use cases into the Admin use case to provide a centralized access point for administrative functions. Both the ChangeInfo and Register use cases need to read and write data from two database tables. However, the data in these tables is logically related so it would be useful present the data as one logical table to these two use cases, hiding the two finegrained databases from clients. In the ViewPlanetInfo use case, the amount of data returned could be large and the user may not view all of it at once. Further, the user could abandon browsing the data at any time. It would be better to deliver content only when it is accessed to reduce network overhead.

3 Login extends ChangeInfo Intercepting Filter Presentation Tier include include Front Controller Composite View Admin ClientTable View Helper include Register AddressTable Front Controller Dispatcher View Front Controller Service To Worker PlanetTable Business Delegate Business Tier Session Facade Service Locator ViewPlanetInfo SatelliteTable Transfer Object Assembler Value List Handler Figure 1: Use Cases for Sample Application 3 Framework Generation The relationship between design patterns and frameworks is intriguing. Both patterns and frameworks capture reusable practices in design. Frameworks are usually larger in scale and more concrete than design patterns. Despite the differences, frameworks and patterns are strongly related. Design patterns act as the micro-architectural units within a framework [10]. Patterns can be divided into three groups: creational patterns, structural patterns, and behavioural patterns [6]. Combining the concepts of framework and patterns, we can speculate if there is a framework that consists entirely of patterns as its subcomponents. The control flow of this framework would be dictated by the behavioural patterns, the structure of the classes and objects would be captured by the relationships between structural patterns, and the process of creating and assembling the framework objects would be dictated by the creational patterns. 3.1 The J2EE Framework Frameworks are partial implementations of the structure of a specific application, with GUIs being the most common example. J2EE also has a framework defined by Sun Microsystems [1], shown in Figure 2. It is split across three tiers to separate different parts of the overall application. The presentation tier provides a web-based user interface and displays the results of calls to the business logic, and is implemented using servlets and JSPs. The business tier, the main focus of this paper, provides business logic that processes client requests, and is usually built using EJBs. The integration tier Composite Entity Service Activator Transfer Object Data Access Object Integration Tier Figure 2: J2EE Framework (simplified from [1]) is primarily for database access. Each tier can be thought of as the first level of components as it may represent a container in which components for that tier run. It is interesting to note that the subcomponents of each tier are patterns. 3.2 Selected J2EE Patterns Before we discuss our pattern assembly process, we provide a brief overview of the important J2EE patterns that we support. These patterns cover the business and integration tier. We concentrate on the patterns that improve the efficiency of distributed code as well as the relationships between the patterns. Additional patterns that improve the abstraction for distribution are discussed in Section 4. More details on these patterns can be found in [1]. Transfer Value Object: The server-side business components access and manipulate business data to satisfy client requests. Clients access these results by invoking accessor methods on the business components. Fine-grained calls between clients and business components should be avoided to reduce network overhead. Rather than returning finegrained data, remote business components may pack their complete state into a single, coarsegrained transfer value object that is returned to the client. Clients can access the data they need with only one remote access. Data Access Object: Many real-world J2EE applications need to access persistent data. The type of the underlying data sources can range from a

4 simple file to a full commercial database system, where each source exposes a different API. A data access object (DAO) is used as a kind of adapter to decouple the business components from the data sources they use. In practice, there is a one-toone mapping between DAOs and database tables. A transfer value object containing instance variables for each field in the database table is associated with each DAO. DAOs are accessed directly from any EJB class that needs persistent data. Value List Handler: A query from a client may result in a large set of results being fetched from the database. In general, web applications show large result sets using multiple pages rather than all at once, as is done in search engines. Further, clients typically abandon browsing results if they do not find a good match in the first few results. Thus, it might not be necessary to send all results back to the client in one large message. Rather, it might be better to send them in small batches that are sent when the client accesses them. Further, frequently accessed data can be cached for some period of time to speed up accesses. The value list handler is ideal for both of these purposes. It is also useful for manipulating the result set, including sorting and grouping data items. A value list handler is generally associated with DAOs and EJBs. It manipulates and caches transfer value objects for both. Value Assembler: The value list handler is a homogeneous list of transfer value objects. In contrast, a value assembler aggregates different types of transfer value objects. The need for this pattern arises when the logical data model in one tier is different than the physical data model in the next. The value assembler encapsulates different types of transfer value objects to provide a single, consistent application data model that hides the underlying physical model. It also reduces network traffic as a client no longer has to communicate with several individual components to access different parts of the data model. Session Facade: In J2EE applications, the developer might not want to expose all business components or methods to clients for a variety of reasons. Logically related components can be aggregated into a single, logical component to simplify the interface between tiers and increase the granularity of communication. The session facade pattern provides a means of aggregating several small-grained business components into one larger-grained service. It is also a convenient place to add access control mechanisms for privileged services. The session facade aggregates any server-side objects. It can also be used for integration tier components. For instance, a session facade can combine several DAOs to provide a composite view of fine-grained data. 3.3 Pattern Assembly Process We will now use our sample astronomer s club application to show how patterns can be assembled into a complete application using RMA. Figure 3 shows a simplified class diagram of our example application. To keep the architecture simple, some classes are not shown. In particular, we have removed the low-level implementation details for EJBs. This detail is hidden behind the proxies in the diagram (LoginProxy, ChangeInfoProxy, etc.). These proxies will be discussed in Section Assembling the Sample Application Our construction process is bottom-up, starting at the integration tier and working up toward the presentation tier. The process of creating the astronomer s club application starts with constructing DAOs for the database tables. We create four DAOs: ClientDAO, AddressDAO, PlanetDAO, and SatelliteDAO. For each of these DAOs, RMA automatically creates one transfer value class with appropriate instance variables and accessor methods, and a primary key class for database management. RMA prompts the developer for necessary database connection parameters, such as the JNDI name for connecting the DAO to the underlying database system, connection string, and JDBC library. It also requests the name and type of all fields in the database table, some of which must be marked as the primary key. This information is used to produce code to connect applications to the database. To complete the DAO implementation, the developer inserts appropriate SQL query statements into the generated code. From Figure 1, this application has two main use cases, Admin and ViewPlanetInfo, in the business tier. The Admin use case contains three smaller use cases: Login, Register, and ChangeInfo. The Login case performs a simple validation of a submitted client ID and password matching against data stored in ClientTable. RMA provides a wizard to generate skeleton code for the EJB. The

5 Presentation Tier Business Tier Data Tier LoginProxy ClientTO AdminProxy login(v: ClientTO) : boolean changeinfo(ca: ClientInfoAggregator) : void dologin() : boolean ChangeInfoProxy ClientAddressAssembler ClientDAO ServletController register(ca: ClientInfoAggregator) : void dochangeinfo() : void RegisterProxy ClientInfoAggregator cto : ClientTO ato : AddressTO AddressTO AddressDAO doregister() : void PlanetTO PlanetInfoViewerProxy PlanetVListProxy PlanetDAO sublist(int s, int e)() : void SatelliteTO SatelliteVListProxy SatelliteDAO sublist(s: int,e: int) : List Figure 3: Simplified Architecture for Sample Application developer provides the class name and package, and writes the business methods and any create (or home) methods needed to initialize the EJB. For this example, the business methods in the Login EJB access client information from ClientDAO (using the associated transfer value object) and use it to validate the user. No additional home methods were required. For reasons we will examine later, accessing the ClientDAO to retrieve its transfer value object is simply a matter of calling methods on appropriate objects. The Register use case makes use of the Client- DAO and the AddressDAO, where both of these database tables make up the data model. However, the application model for Register uses one logical table that is the join of these two tables. This is an example of an application model differing from its underlying data model. To convert the data model to the application model, we apply the value assembler design pattern. In the value assembler wizard in RMA, a list of transfer value objects that are in the current application are presented. The developer selects a list of these transfer value objects that need to be aggregated into a new transfer value object. For our example, ClientTO and AddressTO are selected. For each transfer value object, the user also indicates which method in the associated DAO returns the transfer object that we want to aggregate. Note that the selected method may represent a query that returns multiple transfer value objects, forming a 1-to-many relationship. These methods are used by the new value assembler to populate a new transfer value object that is created to provide the application model. The selected accessor methods also make up the interface to the new transfer value object. In addition, the wizard allows the developer to specify the package and class information for both the value assembler class (the assembler class) and the transfer value object class (the aggregator class in Figure 3). Once the developer has completed the wizard for the value assembler, they have complete code for both the assembler and the new transfer value object. No user code is needed to complete the pattern implementation. In the architecture for our example, the results of applying the value assembler are the assembler class ClientAddressAssembler and the transfer value object class ClientInfoAggregator. Finally, the Register use case also requires a new EJB with the registration business methods, which is created just as the Login bean was above. These business methods use the aggregator class created with the value assembler for its application model.

6 The ChangeInfo use case is implemented in a similar manner as the Register case. However, the ChangeInfo use case updates user information. To do this, the developer can augment the value assembler created in the Register case to include accessors that set data in the ClientInfoAggregator class from the ClientAddressAssembler. The updated ClientInfoAggregator can be passed to ClientDAO and AddressDAO to update the registration information. It would be beneficial to have a centralized access point for the three administrative business components (Login, Register, and ChangeInfo). This simplifies the interface between the business and presentation tiers. It can also help increase the granularity of messages to reduce communication costs. To create this centralized access point, we apply the session facade design pattern to create the Admin bean from Figure 3. RMA provides wizards to quickly create a session facade, shown in Figures 4(a) and 4(b). The first wizard shows a list of EJBs that are in the current Eclipse project, and the user selects those that should be centralized in the new facade. For this application, we selected the Login, Register, and ChangeInfo beans. Once the beans are chosen, the user picks the business methods from each bean that the facade should expose. An alternate method name can be provided in the Delegator Name field to resolve any conflicts. The result of applying the session facade pattern is a new facade class, Admin in our example application. This class provides a basic facade, delegating methods to the proper method in the contained beans. This basic code can be augmented by the developer to add security considerations or to add higher-level methods that invoke methods across multiple EJBs contained in the facade. The final use case, ViewPlanetInfo, accesses PlanetDAO and SatelliteDAO. At the presentation tier, our web interface displays information about each planet and its satellites on separate web pages. The pages are displayed from the innermost planet to the outermost. As a result, it makes sense to cache the planet information from the database at the business tier and return the pages one at a time as the user requests them. This way, if the client decides to abandon viewing the information part way through the list of planets, then we have not incurred the overhead of sending the complete result set. To get this caching and incremental sending of results to the client, we apply the value list handler pattern twice, once for PlanetDAO and once for SatelliteDAO. To create the value list handler, an RMA wizard asks the user for the value transfer object to be cached and the accessor in the associated DAO that returns it. For the Planet- DAO portion of our example, we select PlanetTO and the PlanetDAO method that returns this object. From this specification, RMA generates the complete value list handler, PlanetVList in our case. This class is ready to use in an application without the need for additional user code Discussion The application development process with RMA uses an incremental, bottom-up approach. Thus, when developers apply patterns in upper tiers, they already have the lower tier components ready to use. This allows our wizards to collect appropriate information to create these upper tier patterns more easily. Examples of this include the use of the value assembler and the session facade above, where the needed collaborating patterns existed and could be combined as necessary. This feature also allows us to generate more concrete pattern implementation code, including method-to-method associations for both delegating methods between patterns and instantiating necessary collaborating objects. In assembling patterns into a complete application, there are three kinds of relationships that must be considered. First is implicit pattern relationships, such as the one between a transfer value object and its associated DAO, which are handled automatically. When a DAO is created, a transfer value object with instance variables for all fields in the database table is created. Further, the interfaces between components with implicit associations are either fixed or can be determined by examining the components, and the implementation is generally straightforward. These characteristics make it possible to generate source code for these associations, relieving the developer from having to implement trivial and tedious code. Second is explicit pattern relationships, which developers must create using RMA-provided wizards. An example of this relationship is the one between a session facade and the value assembler. More specifically, these are collaborations between patterns that are not always needed in an application. RMA does not require the use of all five of the supported patterns; developers apply only the

7 (a) Session facade: Selecting EJBs. (b) Session facade: Selecting facade methods. Figure 4: Wizards for the session facade. subset that are relevant to their application. This is important as it has been shown that the indiscriminate use of patterns can lead to performance problems [17]. Using the information gathered by the wizards, RMA is able to generate source code implementing these explicit collaborations as well, further simplifying the development process. As well, providing developers with the ability to incrementally add relevant patterns provides them with the flexibility needed to construct an efficient application architecture. The final relationship we can consider is application-specific collaborations between objects based on business logic. The association between the Register bean and ClientAddressAssembler in Figure 3 is an example. These relationships are not based on pattern relationships but rather on application needs. As a result, there is little code that can be generated to maintain these relationships beyond adding an instance variable and possibly accessor methods. As this code is part of the application, it is necessarily left to the developer. Pattern assembly can also be considered as the process of selecting patterns to play roles and fulfill constraints dictated by the J2EE framework [3]. RMA uses this idea to generate code to fulfill constraints when the code is either static boilerplate code or when the code can be generated based on user input or on context information derived from the patterns involved. 4 Hiding Deployment Logic After constructing an efficient architecture, we now concentrate on how to provide additional abstractions to hide the distributed nature of J2EE programs. Although J2EE version 2.1 hides some of the low-level details of distributed programming using Java RMI, its solution is incomplete. Some distributed aspects must still be addressed by developers. There are two types of deployment information that developers must consider: EJB definition and referencing, and deployment descriptor generation. This section describes these two problems and examines our solution that frees the developer from these details. 4.1 EJB Definition and Referencing The J2EE EJB architecture is based on Java RMI. As a result, EJBs require interfaces to export methods to remote clients. More specifically, an EJB consists of the following parts: an EJB bean class, a home interface, and a business interface. The EJB class provides the implementation of the business logic that makes up the application. The home interface exposes factory methods for creating and initializing bean instances. In a given application, there may be two home interfaces: one for local objects and one for remote clients. The business interface exposes the business logic implemented

8 by the bean. As with home interfaces, there can be local and remote business interfaces. Unfortunately, the interfaces have several characteristics that are counter-intuitive and make writing them error-prone. Most of these problems revolve around the fact that the EJB bean class does not implement these extra interfaces. This has several ramifications. First, it can be difficult for developers new to J2EE programming to understand the need or relationship between these classes since there is no explicit association. Second, since the bean class does not implement the interfaces, we cannot rely on compile-time checking for consistency. The obvious solution is for the bean class to implement the interfaces, but this is only possible for the local business interface. The remote interfaces add the checked exception RemoteException to the list of exceptions each method can throw, so any class implementing these interfaces must also add it. The bean class does not throw these remote exceptions and so cannot implement these interfaces. The home interfaces cannot be implemented by the bean class because the method names do not match. The bean class implements a set of methods with the name ejbcreate with different initialization arguments, where the home interfaces export the same set of methods renamed create. The mapping between the methods in the implementation class and those defined in the interfaces is done by the J2EE container. Developers must be aware of this mapping and be sure to use the correct names for the methods while still ensuring the remainder of the signatures match. This last characteristic can be particularly problematic. Once EJBs are correctly implemented, they must obtain references to each other in order to collaborate. Developers have to go through several steps, including a JNDI lookup, to get this reference. Figure 5 shows this process in detail. The code is straightforward but tedious as it must be done to obtain each EJB reference (though a reference can be cached for later use). However, it also requires the developer to manage the JNDI name space for the beans in the application. As a J2EE application grows in size, managing this name space can become cumbersome. The first way RMA improves EJB development is to free developers from writing the extra interfaces. We use Java reflection to extract the method signatures from the EJB class. Using EJB interface information as well as method naming convenprivate Client getclientbean(string jndihomename, String homeclassname) { ClientHome remotehome = null; Object objref, obj; Client cbean=null; // 1. Set up initial context for the name space. InitialContext initialcontext = new InitialContext(); try{ // 2. Look up EJB object using JNDI. objref = initialcontext.lookup(jndihomename); // 3. Check for compatibility. obj = PortableRemoteObject.narrow(objref, homeclassname); // 4. Downcast home object. remotehome = (ClientHome) obj; // 5. Initialize the bean. // There can be several create() methods with // different arguments to initialize the bean. cbean = remotehome.create(); catch (NamingException nex){ nex.printstacktrace(); catch(remoteexception rex){ rex.printstacktrace(); return cbean; Figure 5: Code for Accessing an EJB tions/requirements 1, we can easily identify EJBspecific methods. These are methods that are required by the J2EE container and should not be exported to clients. All methods named ejbcreate are used to construct the home interface with the appropriate method name mapping. All other public methods that are not EJB-specific are added to the business interface, though the user can change the interface to remove methods that they do not wish to export to remote users. This reflectionbased approach saves users from having to add tag information into method comments. Now that we have freed developers from having to create and maintain the extra interfaces, we can concentrate on simplifying the process of finding EJB references and managing the JNDI name space. Before doing this, we need to discuss an important design pattern that was not included in Sec- 1 In cases where an EJB-specific method is not part of the common EJB interface, the method must follow naming guidelines so the EJB container can locate it. For instance, since there are several ejbcreate methods with different arguments this method cannot be part of any interface, but the name must follow the guideline to be used by the container.

9 tion 3: the service locator. This pattern, which is defined in the J2EE framework blueprint, is used to cache JNDI names and handles to EJBs and other remote resources. In the case of EJBs, the service locator caches JNDI-name-to-EJBHome mappings for each EJB. That is, it caches the mapping between the name and the home object from step 3 in Figure 5. This home object is an object generated by the J2EE runtime that implements the home interface. The service locator, in its most common form, returns the EJB home object as a generic instance of Object and requires the application code to perform steps 4 and 5 in Figure 5. To completely hide the JNDI name space, the service locator pattern, and the extra interfaces from developers, we use a proxy solution [6] shown in Figure 6. In our solution, we use the standard version of a single service locator but with some small modifications. Our service locator maintains a separate accessor method for each EJB bean that must be managed. The method encapsulates the JNDI name so the user does not have to manage the set of names. Instead, when a new EJB is created in RMA, a new accessor method is automatically added to obtain a reference to it. This method can be deleted if the EJB is later removed. These accessor methods encapsulate an automaticallygenerated default JNDI name for that EJB, which can be as simple as replacing. with in the fully-qualified class name. The return type of these accessor methods is the downcast EJB home object, from step 4 in Figure 5. In addition, when a new EJB is created in RMA, a new proxy class is generated. The proxy class includes identical versions of the business methods for the EJB, which are delegated to the EJB bean object reference. To obtain that bean reference, the proxy class includes a constructor for each create method in the home interface, with the same arguments. The constructors use our service locator to obtain the home object for the bean and then call the corresponding create with the constructor arguments to get the bean reference. That is, the constructors implement the complete process in Figure 5, where steps 1 through 4 are done in the service locator and step 5 is done in the proxy constructor. Remote exceptions are caught in the proxy, making it look like a local object. All of the necessary information about the EJB can be derived using reflection in a similar manner to generating the home and business interfaces. Thus, an EJB reference is obtained by instantiating the proxy class. The service locator object encapsulates the JNDI name space and the proxy encapsulates the home and business interfaces and remote exceptions. As a result, the proxy appears as a normal, local POJO object. The developer can use the proxies, and hence the EJBs, without knowledge of the underlying distributed environment. Encapsulating remote exceptions in the proxy has a potential drawback in that applications cannot handle these exceptions if necessary. Some applications, like financial transaction systems or safety-critical software, need to respond to failures resulting from the distributed environment to provide their service. For now, RMA assumes that the J2EE runtime provides sufficient fault tolerance for the application. However, more precise exception handling can be implemented in the proxy code. Our proxy solution is similar to the proxy-based business delegate pattern [4] in the J2EE framework. The business delegate is used between the presentation tier and the business tier to hide the complexity of EJB lookups across the two tiers. The proxy generated by RMA can fulfill the role played by the delegate object, and can be used in place of the delegate. RMA has expanded the use of this proxy solution to simplify the process of obtaining references to EJBs throughout the complete application. We feel that all developers will benefit from this abstraction. 4.2 Descriptor Generation To deploy an EJB, the container in which it will run needs information about both the bean and any other beans it references. This information, or deployment descriptor, includes the home and business interfaces of the beans and their JNDI names. Our proxies hide these during development, so exposing them for deployment is unacceptable. Instead, RMA maintains a deployment file for each EJB in the application. When an EJB adds a reference to another, the deployment file is updated. When RMA generates an association between EJBs as a result of applying a pattern, it automatically updates the deployment files with necessary information about JNDI names and interfaces. The user can also add references between EJBs outside of pattern assembly using a wizard provided by RMA, which allows the user to add references based on proxy name. RMA can generate a proxy

10 Client use boolean dologin(string id, String pwd) { LoginBeanProxy login = new LoginBeanProxy(); return(login.login(id,pwd); LoginBeanProxy LoginBeanProxy(): LoginBeanProxy login(string id,string pwd): boolean ServiceLocator query jndinames: String getloginbeanremotehome(): LoginBeanRemoteHome public class LoginBeanProxy { public LoginBeanProxy() try { LoginBeanRemoteHome home = ServiceLocator.getLoginBeanRemoteHome(); bean = home.create(); catch(exception e) { e.printstacktrace(); use use manage LoginBeanRemoteInterface login(string id,string pwd): boolean LoginBeanRemoteHome create(): LoginBeanRemoteInterface public boolean login(string id,string pwd) { try { return bean.login(id,pwd); catch(remoteexception re) { re.printstacktrace(); LoginBeanRemoteInterface bean; Figure 6: POJO Proxy Pattern for EJBs imported from external libraries, so using proxies does not limit the use of legacy code. The individual files are assembled at packaging time to create a complete deployment file. 4.3 Combining the Abstractions We can assemble an application as a set of patterns with or without known pattern relationships among them. Each instance of a pattern is used in a POJO fashion. We hide the distributed nature of the application through code generation. The extra interfaces needed for an EJB class are automatically constructed by RMA. The EJB proxies hide these interfaces and the process of obtaining EJB references, including the service locator. In turn, the service locator hides the JNDI name space. To avoid exposing these generated elements at deployment time, we generate deployment descriptors for the application using captured or known pattern relationships to obtain the necessary information. This seamless combination of abstractions completely removes deployment logic from the development process and the application code. In the end, RMA produces an EAR file (a Java archive file) that is ready to be deployed. 5 Initial Evaluation of RMA Table 1 breaks down the code for our example application by pattern. Overall, RMA generates 1507 lines of code of the 2039 that make up the complete application, about 74%. Note that this percentage is a function of the problem and not an inherent property of the generated code, but it does suggest a reduction in development effort. Of the 532 lines of code supplied by the user, over 80% (438 lines) is needed for the data access objects. This code is responsible for constructing database queries and is necessarily application-specific. The transfer object assembler and value list handler needed code to initialize the database search criteria. The code in the session facade was needed to coordinate method invocations. Finally, where possible we generate stubs for business components to save some user effort. The last entry in the table reflects the code that the user had to insert. The pattern assembly process requires less than 10 minutes of supplying data to RMA wizards. The rest of the applications was completed in under two hours. A breakdown of the code generated for application deployment, totaling 660 lines, is shown in Figure 2. The code for the service locator is identical to that in Table 1. The interfaces for EJBs takes 139 lines. The largest portion, 377 lines (57%) of the deployment code is the proxy code. This generated code all shares the characteristic of being straightforward to write but are unavoidable as there is no single, reusable version. Being able to automatically generate this code, while guaranteeing its correctness, removes a significant burden from developers. To get a better sense of the benefits of RMA, we would like to better understand how the proportion of generated code against the total amount of code in an application changes as the complexity of an application increases. It would still be safe to deduce that as the complexity of the business logic increases, the percentage of generated code will fall. But we believe generating code is worthwhile for the following reasons. First, the generated code

11 Table 1: Code generated for J2EE patterns. The values are the sum for all pattern instances. Pattern Generated LOC User LOC Total Percent of user code Transfer Value Object % Data Access Object % Transfer Object Assembler % Value List Handler % Session Facade % Service Locator % Business Delegate % Business Components % Total % Table 2: Code generated for J2EE deployment. Category Lines of Code Percentage Service Locator Code % Interfaces Code % Proxy Code % Total % guarantees correctness, especially for pattern assembly. Second, as the code becomes more complicated, it will have more EJBs and DAOs in the application. Our simple example requires about 125 lines of transfer object code for each DAO and 90 lines of deployment code for all EJBs in the application. As the application becomes more complicated, these numbers will only grow because they are closely related to factors like the size of the database tables (number of elements in the tuples) and their number, and the number of business methods and variables in the classes. The total amount of time saved by not having to write this code in a large application that incorporates hundreds of EJBs and tables will be significant. In addition, it would be better to measure the difference in development time to understand how much effort is saved using RMA. 6 RMA Architecture RMA is implemented as a set of plugins in the Eclipse development environment. We chose Eclipse as our development platform because of its ubiquity, its flexibility in integrating new features as plugins, and its rich support for Java application development. RMA users can leverage features from other Java plugins, such as refactoring, code completion, and the task view 2 [13]. In its implementation, RMA was also able to leverage several Eclipse plugins. RMA extends and uses the Java Development Toolkit (JDT) [13] and Standard Widget Toolkit (SWT) [13] to provide support for J2EE application development. SWT provides a framework for creating and using wizards, the idiom used by Eclipse plugins to gather user input. JDT provides a complete Java development environment for editing, compiling, debugging, and testing applications. It also provides an API for parsing Java source files into a Document Object Model (DOM) tree so the Eclipse GUI can access and manipulate the different elements in a Java class. The DOM API also allows plugins to traverse and modify the tree, which can be used to manipulate Java source code. We use another Eclipse plugin called Java Emitter Templates (JET) to generate code and deployment descriptors [15]. Finally, we use the task view to highlight places in the generated code where the user may need to insert application-specific code. The architecture and work flow for RMA is shown in Figure 7. RMA provides a set of wizards that run in the Eclipse workbench. These wizards solicit information needed to construct an instance of a J2EE design pattern. Since RMA development is bottom up, the wizards generally present a list of existing methods and classes to the user, who must then select those that are needed to complete the desired design pattern. Where possible, RMA queries the workspace to create a list of valid selections for 2 The task view in Eclipse shows a list of outstanding development tasks to the user. The list can be used to quickly navigate to the relevant section of code. These may consist of compiler errors that need to be fixed or a to-do list. The latter is demarked by comments starting with the word TODO.

12 a given wizard. The dialogs in Figures 4(a) and 4(b) show the wizard for the session facade pattern. A session facade aggregates EJB classes and exports business methods. RMA uses this information to list only EJB classes in the first wizard and to list only business methods in the second. (Section 4.1 explained how to identify the business methods.) Other wizards gather relevant information for the other patterns from Section 3.2. The Artifact Extractor system combines the user input with information derived from the application code to construct a description of a concrete implementation of the selected pattern. This description is then passed to the Code Generator (implemented using JET) to produce both architectural Java code and deployment descriptors. For some patterns, the generated architectural code is incomplete and must be augmented with application-specific code by the user. The places where such code may be needed are marked with a special Eclipse task with the tag EJB-TODO. An extension to the basic Eclipse task view recognizes these new tags and places them in the list. Using a distinct tag allows users to easily distinguish RMArelated tasks from other tasks. The single service locator class is updated using the DOM tree API in JDT. RMA monitors the Eclipse workspace. When a new EJB is created, a new lookup method is added to the DOM tree for the service locator. Similarly, when an EJB is removed the lookup method can be deleted from the tree. The DOM tree is then used to generate the service locator class. Updates to EJBs must be reflected in the interfaces and descriptors. RMA uses listeners provided by Eclipse to note any changes to a bean class. The interfaces and descriptors are then refreshed to ensure they are consistent with the implementation. Eclipse compiles Java source files when they are created and modified. The complete application, consisting of the class files and the descriptor files, is assembled by the Packager component. The result is the EAR file that is ready to be deployed. 7 Related Work We can broadly categorize J2EE development tools as being either code-centric or architecture-centric. Code-centric tools focus on generating code for individual components without any regard for how they will be integrated or deployed. Examples include JBuilder [11] and WebSphere [8]. They produce stub EJB classes from bean interfaces, which the user must assemble into a complete application. XDoclet is an improvement in code-centric tools. Users add Javadoc-style tags that provide additional information needed by the J2EE runtime [18]. These tags indicate can indicate properties like which classes represent EJBs, which methods are creation and business methods, and which fields represent other EJBs. These tags are processed to produce the appropriate interfaces and deployment descriptors. However, the user must maintain these tags in their application, and they provide no help for creating an efficient architecture. Work is underway on a new J2EE specification, Version 3.0, that addresses some of the limitations in J2EE Version 2.1 programming [5]. This new specification takes advantage of metadata annotation facilities that are a new feature in Java [9], making it similar to the tag-based XDoclet above. In particular, home interfaces have been removed entirely; references to other beans are attained through dependency annotations. The developer can create a business interface to a bean if desired, but a default containing all public methods is created if no interface is provided. The interface no longer includes remote exceptions, so the bean class can safely implement it for compile-time checking. Deployment descriptors are also generated based on metadata annotations. Developers can override annotations by supplying XML-based descriptors where necessary. The code-centric efforts focus on removing the distributed artifacts in J2EE applications. RMA also provides support for creating an efficient architecture based on the proven strategies in the J2EE design patterns. Furthermore, RMA obviates the need to insert and maintain the tags that many codecentric tools require. Though these tags are an improvement over manual coding of the artifacts, they still represent some additional developer effort. Architecture-centric tools not only generate EJBs but also integrate them into larger architectural units. One example is Struts [2], which generates a Model-View-Controller architecture for the presentation tier. However, Struts only supports the presentation tier. Another example is Fred [7]. Fred uses roles and constraints (mentioned in Section 3.3.2) to maintain a list of outstanding tasks, similar to the task view in Eclipse [13]. This list

13 DAO + Transfer Value Object Wizard Session Facade + EJBs Wizard user input Roles & Some derivable constraints Value List Handler + DAO Wizard Transfer Value Assembler + DAO Wizard Eclipse IDE Pattern Wizards (Eclipse Plugin) produces Role-Class Matches Concrete Role Information produces Artifact Extractor (Java Reflection) uses produces Code Generator (JET Emitter) uses Known Pattern Relationship Constraints Legends: user input Architectural Code (.java) produces intermediate results uses javac Deployment Descriptor Files (.xml) process implemented by the third party produces Class Files uses uses Packager produces process implemented by us outputs Deployable Application EAR, JAR. produces inputs Figure 7: The architecture of RMA

14 guides the developer through the implementation of the J2EE framework. Other architecture-centric approaches are based on the Model Driven Architecture (MDA) specification from OMG [12]. These tools separate application code from the middleware that will execute it. Examples include realmethods [16], EclipseJ2EE [14], and OptimalJ [4]. Of these, EclipseJ2EE is the most ad-hoc; the user is responsible for creating the architecture. The other two allow applications to use J2EE patterns. These tools have a number of recurring problems. First, they only capture class-level relationships, ignoring method-level ones. The patterns in the J2EE framework are generally not useful in isolation; their composition creates a sound architecture. Ignoring method-level relationships limits the amount of concrete pattern code that can be generated, which requires more code from the user. Second, it is not clear if the user has access to the generated code. Though not addressed in this paper, we believe that such access is an important part of a good programming system. Complicating this is the automated application of design patterns by OptimalJ. We are concerned that this could make it difficult for developers to understand the complete architecture and work with it if necessary. RMA incorporates the advantages of both codecentric and architecture-centric approaches. From the code-centric perspective, we construct EJB classes, interfaces, and deployment information from the application code rather than from interface specifications as done in JBuilder and Web- Sphere. From the architecture-centric perspective, RMA uses roles and constraints to generate implementation code, unlike Fred which guides the user. This means the user concentrates on the application, which is likely their area of expertise, rather than on additional language artifacts needed to support the J2EE runtime. From the architecturecentric perspective, our pattern generation and assembly includes method-level associations, allowing us to generate more concrete code. Work is underway on a new J2EE specification, Version 3.0, that addresses some of the limitations in J2EE Version 2.1 programming [5]. This new specification takes advantage of metadata annotation facilities that are a new feature in Java [9]. In particular, home interfaces have been removed entirely; references to other beans are attained through dependency annotations. The developer can create a business interface to a bean if desired, but a default containing all public methods is created if no interface is provided. The interface no longer includes remote exceptions, so the bean class can safely implement it for compile-time checking. Deployment descriptors are now generated based on metadata annotations included in the source code, a new feature in Java 1.5 [9]. Developers can override annotations by supplying XMLbased descriptors where necessary. 8 Conclusions In this paper, we presented RoadMapAssembler, our J2EE development tool that incrementally constructs a pattern-based J2EE web application. We have shown that incremental construction can make use of more application and design pattern knowledge and produce more concrete code than the topdown MDA approach. RMA has distinguished itself from other pattern-based J2EE tools in that it places more emphasis on capturing pattern relationships than static code generation. We take advantage of these pattern relationships to hide the distributed nature of J2EE application development at both the architectural and code levels, hiding extra interfaces and the JNDI name space. We have also shown that pattern information can be used not just to produce a better application architecture, but also to free the developer from deployment logic. With tool support for J2EE patterns, deployment can be handled automatically. By removing the distributed aspects of J2EE development, developers can focus on their applications and not on the J2EE execution environment. Future work for RMA includes adding presentation tier patterns, evaluating usability, and extensibility. The omission of the presentation tier in RMA means that presentation tier developers do not benefit from our deployment descriptor generation. This also exposes the JNDI name space and access interfaces. Incorporating the presentation tier (by either adding the necessary patterns or adding an existing tool like Struts) will complete the development process. The sample astronomer s club application provides a simple example for discussion, but we need to implement larger applications to evaluate the benefits of using RMA to develop J2EE applications. Like other pattern-based programming tools, RMA will suffer if the set of

RMA: A Pattern Based J2EE Development Tool

RMA: A Pattern Based J2EE Development Tool RMA: A Pattern Based J2EE Development Tool by Jun Chen A thesis presented to the University of Waterloo in fulfilment of the thesis requirement for the degree of Master of Mathematics in Computer Science

More information

DESIGN PATTERN - INTERVIEW QUESTIONS

DESIGN PATTERN - INTERVIEW QUESTIONS DESIGN PATTERN - INTERVIEW QUESTIONS http://www.tutorialspoint.com/design_pattern/design_pattern_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Design Pattern Interview Questions

More information

NetBeans IDE Field Guide

NetBeans IDE Field Guide NetBeans IDE Field Guide Copyright 2005 Sun Microsystems, Inc. All rights reserved. Table of Contents Extending Web Applications with Business Logic: Introducing EJB Components...1 EJB Project type Wizards...2

More information

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently. Gang of Four Software Design Patterns with examples STRUCTURAL 1) Adapter Convert the interface of a class into another interface clients expect. It lets the classes work together that couldn't otherwise

More information

Chapter 6 Enterprise Java Beans

Chapter 6 Enterprise Java Beans Chapter 6 Enterprise Java Beans Overview of the EJB Architecture and J2EE platform The new specification of Java EJB 2.1 was released by Sun Microsystems Inc. in 2002. The EJB technology is widely used

More information

COURSE 9 DESIGN PATTERNS

COURSE 9 DESIGN PATTERNS COURSE 9 DESIGN PATTERNS CONTENT Applications split on levels J2EE Design Patterns APPLICATION SERVERS In the 90 s, systems should be client-server Today, enterprise applications use the multi-tier model

More information

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP 2013 Empowering Innovation DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP contact@dninfotech.com www.dninfotech.com 1 JAVA 500: Core JAVA Java Programming Overview Applications Compiler Class Libraries

More information

Appendix A - Glossary(of OO software term s)

Appendix A - Glossary(of OO software term s) Appendix A - Glossary(of OO software term s) Abstract Class A class that does not supply an implementation for its entire interface, and so consequently, cannot be instantiated. ActiveX Microsoft s component

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: WSAD. J2EE business topologies. Workbench. Project. Workbench components. Java development tools. Java projects

More information

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

BEAAquaLogic. Service Bus. Interoperability With EJB Transport BEAAquaLogic Service Bus Interoperability With EJB Transport Version 3.0 Revised: February 2008 Contents EJB Transport Introduction...........................................................1-1 Invoking

More information

InsECTJ: A Generic Instrumentation Framework for Collecting Dynamic Information within Eclipse

InsECTJ: A Generic Instrumentation Framework for Collecting Dynamic Information within Eclipse InsECTJ: A Generic Instrumentation Framework for Collecting Dynamic Information within Eclipse Arjan Seesing and Alessandro Orso College of Computing Georgia Institute of Technology a.c.seesing@ewi.tudelft.nl,

More information

"Web Age Speaks!" Webinar Series

Web Age Speaks! Webinar Series "Web Age Speaks!" Webinar Series Java EE Patterns Revisited WebAgeSolutions.com 1 Introduction Bibhas Bhattacharya CTO bibhas@webagesolutions.com Web Age Solutions Premier provider of Java & Java EE training

More information

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1 Umair Javed 2004 J2EE Based Distributed Application Architecture Overview Lecture - 2 Distributed Software Systems Development Why J2EE? Vision of J2EE An open standard Umbrella for anything Java-related

More information

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes Java CORE JAVA Core Java Programing (Course Duration: 40 Hours) Introduction to Java What is Java? Why should we use Java? Java Platform Architecture Java Virtual Machine Java Runtime Environment A Simple

More information

BEAWebLogic. Server. Programming WebLogic Deployment

BEAWebLogic. Server. Programming WebLogic Deployment BEAWebLogic Server Programming WebLogic Deployment Version 10.0 Revised: March 30, 2007 Contents 1. Introduction and Roadmap Document Scope and Audience............................................. 1-1

More information

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format. J2EE Development Detail: Audience www.peaksolutions.com/ittraining Java developers, web page designers and other professionals that will be designing, developing and implementing web applications using

More information

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics Spring & Hibernate Overview: The spring framework is an application framework that provides a lightweight container that supports the creation of simple-to-complex components in a non-invasive fashion.

More information

Java EE Patterns 176

Java EE Patterns 176 Java EE Patterns 176 What are Java EE Patterns?! " A collection of Java EE based solutions to common problems! " Address reoccurring problems found in enterprise class systems! " Intended to meet quality

More information

Java Training For Six Weeks

Java Training For Six Weeks Java Training For Six Weeks Java is a set of several computer software and specifications developed by Sun Microsystems, later acquired by Oracle Corporation that provides a system for developing application

More information

Supports 1-1, 1-many, and many to many relationships between objects

Supports 1-1, 1-many, and many to many relationships between objects Author: Bill Ennis TOPLink provides container-managed persistence for BEA Weblogic. It has been available for Weblogic's application server since Weblogic version 4.5.1 released in December, 1999. TOPLink

More information

Lightweight J2EE Framework

Lightweight J2EE Framework Lightweight J2EE Framework Struts, spring, hibernate Software System Design Zhu Hongjun Session 4: Hibernate DAO Refresher in Enterprise Application Architectures Traditional Persistence and Hibernate

More information

IBM Workplace Software Development Kit

IBM Workplace Software Development Kit IBM Workplace Software Development Kit Version 2.6 User s Guide G210-2363-00 IBM Workplace Software Development Kit Version 2.6 User s Guide G210-2363-00 Note Before using this information and the product

More information

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java EJB Enterprise Java EJB Beans ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY Peter R. Egli 1/23 Contents 1. What is a bean? 2. Why EJB? 3. Evolution

More information

Course Content for Java J2EE

Course Content for Java J2EE CORE JAVA Course Content for Java J2EE After all having a lot number of programming languages. Why JAVA; yet another language!!! AND NOW WHY ONLY JAVA??? PART-1 Basics & Core Components Features and History

More information

IBM Workplace Collaboration Services API Toolkit

IBM Workplace Collaboration Services API Toolkit IBM Workplace Collaboration Services API Toolkit Version 2.5 User s Guide G210-1958-00 IBM Workplace Collaboration Services API Toolkit Version 2.5 User s Guide G210-1958-00 Note Before using this information

More information

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module Java Platform, Enterprise Edition 5 (Java EE 5) Core Java EE Java EE 5 Platform Overview Java EE Platform Distributed Multi tiered Applications Java EE Web & Business Components Java EE Containers services

More information

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI BEAWebLogic Server and WebLogic Express Programming WebLogic JNDI Version 10.0 Document Revised: March 30, 2007 Contents 1. Introduction and Roadmap Document Scope and Audience.............................................

More information

Using JNDI from J2EE components

Using JNDI from J2EE components Using JNDI from J2EE components Stand-alone Java program have to specify the location of the naming server when using JNDI private static InitialContext createinitialcontext() throws NamingException {

More information

Enterprise JavaBeans (I) K.P. Chow University of Hong Kong

Enterprise JavaBeans (I) K.P. Chow University of Hong Kong Enterprise JavaBeans (I) K.P. Chow University of Hong Kong JavaBeans Components are self contained, reusable software units that can be visually composed into composite components using visual builder

More information

Advanced Java Programming

Advanced Java Programming Advanced Java Programming Length: 4 days Description: This course presents several advanced topics of the Java programming language, including Servlets, Object Serialization and Enterprise JavaBeans. In

More information

/ / JAVA TRAINING

/ / JAVA TRAINING www.tekclasses.com +91-8970005497/+91-7411642061 info@tekclasses.com / contact@tekclasses.com JAVA TRAINING If you are looking for JAVA Training, then Tek Classes is the right place to get the knowledge.

More information

Work groups meeting 3

Work groups meeting 3 Work groups meeting 3 INF5040 (Open Distributed Systems) Sabita Maharjan sabita@simula.no Department of Informatics University of Oslo September 07, 2009 Design Patterns J2EE Design Patterns Outline EIS

More information

Patterns Of Enterprise Application Architecture

Patterns Of Enterprise Application Architecture Patterns Of Enterprise Application Architecture Lecture 11-12 - Outlines Overview of patterns Web Presentation Patterns Base Patterns Putting It All Together References Domain Logic Patterns Domain Model

More information

What Is Needed. Learning the technology is not enough Industry best practices Proven solutions How to avoid bad practices? a Real-life Example.

What Is Needed. Learning the technology is not enough Industry best practices Proven solutions How to avoid bad practices? a Real-life Example. 1 Push J2EE your Best development Practices further using a Real-life Example. Casey Chan nology Evangelist casey.chan@sun.com Push ebay your Architecture: development furtherhow to Go From there Microsoft

More information

~ Ian Hunneybell: CBSD Revision Notes (07/06/2006) ~

~ Ian Hunneybell: CBSD Revision Notes (07/06/2006) ~ 1 Component: Szyperski s definition of a component: A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can

More information

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java COURSE DETAILS: CORE AND ADVANCE JAVA Core Java 1. Object Oriented Concept Object Oriented Programming & its Concepts Classes and Objects Aggregation and Composition Static and Dynamic Binding Abstract

More information

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve Enterprise Java Introduction Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve Course Description This course focuses on developing

More information

Advanced Topics in Operating Systems

Advanced Topics in Operating Systems Advanced Topics in Operating Systems MSc in Computer Science UNYT-UoG Dr. Marenglen Biba 8-9-10 January 2010 Lesson 10 01: Introduction 02: Architectures 03: Processes 04: Communication 05: Naming 06:

More information

Java J Course Outline

Java J Course Outline JAVA EE - J2SE - CORE JAVA After all having a lot number of programming languages. Why JAVA; yet another language!!! AND NOW WHY ONLY JAVA??? CHAPTER 1: INTRODUCTION What is Java? History Versioning The

More information

Advanced Topics in WebSphere Portal Development Graham Harper Application Architect IBM Software Services for Collaboration

Advanced Topics in WebSphere Portal Development Graham Harper Application Architect IBM Software Services for Collaboration Advanced Topics in WebSphere Portal Development Graham Harper Application Architect IBM Software Services for Collaboration 2012 IBM Corporation Ideas behind this session Broaden the discussion when considering

More information

A domain model-centric approach to J2EE development. Keiron McCammon CTO Versant Corporation

A domain model-centric approach to J2EE development. Keiron McCammon CTO Versant Corporation A domain model-centric approach to J2EE development Keiron McCammon CTO Versant Corporation 1 Patterns of Enterprise Application Architecture Martin Fowler, at. al. Overview What is a domain model centric

More information

Fast Track to EJB 3.0 and the JPA Using JBoss

Fast Track to EJB 3.0 and the JPA Using JBoss Fast Track to EJB 3.0 and the JPA Using JBoss The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity

More information

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town!

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town! CHAPTER 6 Organizing Your Development Project All right, guys! It s time to clean up this town! Homer Simpson In this book we describe how to build applications that are defined by the J2EE specification.

More information

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject

More information

JBoss SOAP Web Services User Guide. Version: M5

JBoss SOAP Web Services User Guide. Version: M5 JBoss SOAP Web Services User Guide Version: 3.3.0.M5 1. JBoss SOAP Web Services Runtime and Tools support Overview... 1 1.1. Key Features of JBossWS... 1 2. Creating a Simple Web Service... 3 2.1. Generation...

More information

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA Web Application Development Using JEE, Enterprise Java and JPA Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.

More information

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6 Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6 Some Terms: Architecture the manner in which the components of a computer

More information

(9A05803) WEB SERVICES (ELECTIVE - III)

(9A05803) WEB SERVICES (ELECTIVE - III) 1 UNIT III (9A05803) WEB SERVICES (ELECTIVE - III) Web services Architecture: web services architecture and its characteristics, core building blocks of web services, standards and technologies available

More information

Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat

Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat Universita degli Studi di Bologna Facolta di Ingegneria Anno Accademico 2007-2008 Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat http://www lia.deis.unibo.it/courses/tecnologieweb0708/

More information

Software Components and Distributed Systems

Software Components and Distributed Systems Software Components and Distributed Systems INF5040/9040 Autumn 2017 Lecturer: Eli Gjørven (ifi/uio) September 12, 2017 Outline Recap distributed objects and RMI Introduction to Components Basic Design

More information

Skyway Builder 6.3 Reference

Skyway Builder 6.3 Reference Skyway Builder 6.3 Reference 6.3.0.0-07/21/09 Skyway Software Skyway Builder 6.3 Reference: 6.3.0.0-07/21/09 Skyway Software Published Copyright 2009 Skyway Software Abstract The most recent version of

More information

Application Servers in E-Commerce Applications

Application Servers in E-Commerce Applications Application Servers in E-Commerce Applications Péter Mileff 1, Károly Nehéz 2 1 PhD student, 2 PhD, Department of Information Engineering, University of Miskolc Abstract Nowadays there is a growing demand

More information

Agent-Enabling Transformation of E-Commerce Portals with Web Services

Agent-Enabling Transformation of E-Commerce Portals with Web Services Agent-Enabling Transformation of E-Commerce Portals with Web Services Dr. David B. Ulmer CTO Sotheby s New York, NY 10021, USA Dr. Lixin Tao Professor Pace University Pleasantville, NY 10570, USA Abstract:

More information

MyEclipse EJB Development Quickstart

MyEclipse EJB Development Quickstart MyEclipse EJB Development Quickstart Last Revision: Outline 1. Preface 2. Introduction 3. Requirements 4. MyEclipse EJB Project and Tools Overview 5. Creating an EJB Project 6. Creating a Session EJB -

More information

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p. Acknowledgments p. xvi Introduction p. xvii Overview p. 1 Overview p. 3 The Motivation for Enterprise JavaBeans p. 4 Component Architectures p. 7 Divide and Conquer to the Extreme with Reusable Services

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 0 0 DEPARTMENT OF COMPUTERAPPLICATIONS QUESTION BANK V SEMESTER MC70- Web Application Development Regulation 0 Academic Year 07 8 Prepared by Mr.M.AsanNainar,

More information

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc. purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc. Agenda The Problem Data Access in Java What is purequery? How Could purequery Help within My Data Access Architecture?

More information

A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology

A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology International Workshop on Energy Performance and Environmental 1 A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology P.N. Christias

More information

POJOs to the rescue. Easier and faster development with POJOs and lightweight frameworks

POJOs to the rescue. Easier and faster development with POJOs and lightweight frameworks POJOs to the rescue Easier and faster development with POJOs and lightweight frameworks by Chris Richardson cer@acm.org http://chris-richardson.blog-city.com 1 Who am I? Twenty years of software development

More information

Distributed Multitiered Application

Distributed Multitiered Application Distributed Multitiered Application Java EE platform uses a distributed multitiered application model for enterprise applications. Logic is divided into components https://docs.oracle.com/javaee/7/tutorial/overview004.htm

More information

EINDHOVEN UNIVERSITY OF TECHNOLOGY

EINDHOVEN UNIVERSITY OF TECHNOLOGY EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics & Computer Science Exam Programming Methods, 2IP15, Wednesday 17 April 2013, 09:00 12:00 TU/e THIS IS THE EXAMINER S COPY WITH (POSSIBLY INCOMPLETE)

More information

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA Web Application Development Using JEE, Enterprise Java and JPA Duration: 5 days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options.

More information

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints Active Endpoints ActiveVOS Platform Architecture ActiveVOS Unique process automation platforms to develop, integrate, and deploy business process applications quickly User Experience Easy to learn, use

More information

J2EE Application Deployment Framework. (Author: Atul Singh Chauhan) June 12, 2007

J2EE Application Deployment Framework. (Author: Atul Singh Chauhan) June 12, 2007 WHITE PAPER J2EE Application Deployment Framework (Author: Atul Singh Chauhan) June 12, 2007 Copyright 2007 and HCL proprietary material. All rights reserved. No part of this document may be reproduced,

More information

Overview p. 1 Server-side Component Architectures p. 3 The Need for a Server-Side Component Architecture p. 4 Server-Side Component Architecture

Overview p. 1 Server-side Component Architectures p. 3 The Need for a Server-Side Component Architecture p. 4 Server-Side Component Architecture Preface p. xix About the Author p. xxii Introduction p. xxiii Overview p. 1 Server-side Component Architectures p. 3 The Need for a Server-Side Component Architecture p. 4 Server-Side Component Architecture

More information

jar command Java Archive inherits from tar : Tape Archive commands: jar cvf filename jar tvf filename jar xvf filename java jar filename.

jar command Java Archive inherits from tar : Tape Archive commands: jar cvf filename jar tvf filename jar xvf filename java jar filename. jar & jar files jar command Java Archive inherits from tar : Tape Archive commands: jar cvf filename jar tvf filename jar xvf filename java jar filename.jar jar file A JAR file can contain Java class files,

More information

AppDev StudioTM 3.2 SAS. Migration Guide

AppDev StudioTM 3.2 SAS. Migration Guide SAS Migration Guide AppDev StudioTM 3.2 The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2006. SAS AppDev TM Studio 3.2: Migration Guide. Cary, NC: SAS Institute Inc.

More information

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST III

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST III http://www.tutorialspoint.com DESIGN PATTERNS MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Design Patterns Framework. You can download these sample

More information

UNIT-III EJB APPLICATIONS

UNIT-III EJB APPLICATIONS UNIT-III EJB APPLICATIONS CONTENTS EJB Session Beans EJB entity beans EJB clients EJB Deployment Building an application with EJB. EJB Types Types of Enterprise Beans Session beans: Also called business

More information

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1

CSCI Object Oriented Design: Frameworks and Design Patterns George Blankenship. Frameworks and Design George Blankenship 1 CSCI 6234 Object Oriented Design: Frameworks and Design Patterns George Blankenship Frameworks and Design George Blankenship 1 Background A class is a mechanisms for encapsulation, it embodies a certain

More information

Page 1

Page 1 Java 1. Core java a. Core Java Programming Introduction of Java Introduction to Java; features of Java Comparison with C and C++ Download and install JDK/JRE (Environment variables set up) The JDK Directory

More information

Development of E-Institute Management System Based on Integrated SSH Framework

Development of E-Institute Management System Based on Integrated SSH Framework Development of E-Institute Management System Based on Integrated SSH Framework ABSTRACT The J2EE platform is a multi-tiered framework that provides system level services to facilitate application development.

More information

IBM Rational Application Developer for WebSphere Software, Version 7.0

IBM Rational Application Developer for WebSphere Software, Version 7.0 Visual application development for J2EE, Web, Web services and portal applications IBM Rational Application Developer for WebSphere Software, Version 7.0 Enables installation of only the features you need

More information

Enterprise Java and Rational Rose -- Part I

Enterprise Java and Rational Rose -- Part I Enterprise Java and Rational Rose -- Part I by Khawar Ahmed Technical Marketing Engineer Rational Software Loïc Julien Software Engineer Rational Software "We believe that the Enterprise JavaBeans component

More information

Oracle 10g: Build J2EE Applications

Oracle 10g: Build J2EE Applications Oracle University Contact Us: (09) 5494 1551 Oracle 10g: Build J2EE Applications Duration: 5 Days What you will learn Leading companies are tackling the complexity of their application and IT environments

More information

object/relational persistence What is persistence? 5

object/relational persistence What is persistence? 5 contents foreword to the revised edition xix foreword to the first edition xxi preface to the revised edition xxiii preface to the first edition xxv acknowledgments xxviii about this book xxix about the

More information

Using JBI for Service-Oriented Integration (SOI)

Using JBI for Service-Oriented Integration (SOI) Using JBI for -Oriented Integration (SOI) Ron Ten-Hove, Sun Microsystems January 27, 2006 2006, Sun Microsystems Inc. Introduction How do you use a service-oriented architecture (SOA)? This is an important

More information

JavaEE Interview Prep

JavaEE Interview Prep Java Database Connectivity 1. What is a JDBC driver? A JDBC driver is a Java program / Java API which allows the Java application to establish connection with the database and perform the database related

More information

Oracle Service Bus. Interoperability with EJB Transport 10g Release 3 (10.3) October 2008

Oracle Service Bus. Interoperability with EJB Transport 10g Release 3 (10.3) October 2008 Oracle Service Bus Interoperability with EJB Transport 10g Release 3 (10.3) October 2008 Oracle Service Bus Interoperability with EJB Transport, 10g Release 3 (10.3) Copyright 2007, 2008, Oracle and/or

More information

Sun Java Studio Creator. Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan)

Sun Java Studio Creator. Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan) Sun Java Studio Creator Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan) Agenda Background Developer characteristics Corporate developers Sun Java Studio Creator

More information

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution: Whitepaper The Challenge: Enterprise JavaBeans (EJB) represents a new standard in enterprise computing: a component-based architecture for developing and deploying distributed object-oriented applications

More information

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version : SUN 310-052 Sun Certified Enterprise Architect for J2EE 5 Download Full Version : http://killexams.com/pass4sure/exam-detail/310-052 combination of ANSI SQL-99 syntax coupled with some company-specific

More information

TUTORIAL: WHITE PAPER. VERITAS Indepth for the J2EE Platform PERFORMANCE MANAGEMENT FOR J2EE APPLICATIONS

TUTORIAL: WHITE PAPER. VERITAS Indepth for the J2EE Platform PERFORMANCE MANAGEMENT FOR J2EE APPLICATIONS TUTORIAL: WHITE PAPER VERITAS Indepth for the J2EE Platform PERFORMANCE MANAGEMENT FOR J2EE APPLICATIONS 1 1. Introduction The Critical Mid-Tier... 3 2. Performance Challenges of J2EE Applications... 3

More information

CAS 703 Software Design

CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments: Material based on Software by Tao et al. (Chapters 9 and 10) (SOA) 1 Interaction

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: The IDE: Integrated Development Environment. MVC: Model-View-Controller Architecture. BC4J: Business Components

More information

J2EE AntiPatterns. Bill Dudney. Object Systems Group Copyright 2003, Object Systems Group

J2EE AntiPatterns. Bill Dudney. Object Systems Group Copyright 2003, Object Systems Group J2EE AntiPatterns Bill Dudney Object Systems Group bill@dudney.net Bill Dudney J2EE AntiPatterns Page 1 Agenda What is an AntiPattern? What is a Refactoring? AntiPatterns & Refactorings Persistence Service

More information

J2EE Technologies. Industrial Training

J2EE Technologies. Industrial Training COURSE SYLLABUS J2EE Technologies Industrial Training (4 MONTHS) PH : 0481 2411122, 09495112288 Marette Tower E-Mail : info@faithinfosys.com Near No. 1 Pvt. Bus Stand Vazhoor Road Changanacherry-01 www.faithinfosys.com

More information

Work groups meeting 3

Work groups meeting 3 Work groups meeting 3 INF5040 (Open Distributed Systems) Amir Taherkordi amirhost@ifi.uio.no Department of Informatics University of Oslo September 18, 2008 Design Patterns J2EE Design Patterns AntiPatterns

More information

Borland Application Server Certification. Study Guide. Version 1.0 Copyright 2001 Borland Software Corporation. All Rights Reserved.

Borland Application Server Certification. Study Guide. Version 1.0 Copyright 2001 Borland Software Corporation. All Rights Reserved. Borland Application Server Certification Study Guide Version 1.0 Copyright 2001 Borland Software Corporation. All Rights Reserved. Introduction This study guide is designed to walk you through requisite

More information

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java. [Course Overview] The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming,

More information

X-S Framework Leveraging XML on Servlet Technology

X-S Framework Leveraging XML on Servlet Technology X-S Framework Leveraging XML on Servlet Technology Rajesh Kumar R Abstract This paper talks about a XML based web application framework that is based on Java Servlet Technology. This framework leverages

More information

Incorporating applications to a Service Oriented Architecture

Incorporating applications to a Service Oriented Architecture Proceedings of the 5th WSEAS Int. Conf. on System Science and Simulation in Engineering, Tenerife, Canary Islands, Spain, December 16-18, 2006 401 Incorporating applications to a Service Oriented Architecture

More information

Java SE7 Fundamentals

Java SE7 Fundamentals Java SE7 Fundamentals Introducing the Java Technology Relating Java with other languages Showing how to download, install, and configure the Java environment on a Windows system. Describing the various

More information

Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture

Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture Objectives Look at common patterns for designing Web-based presentation layer behavior Model-View-Control

More information

Incremental improvements for the Spring Framework

Incremental improvements for the Spring Framework Incremental improvements for the Spring Framework I am working as an architect for a middle-sized software development company, where we have been actively using J2EE extension frameworks for the last

More information

Deccansoft Software Services. J2EE Syllabus

Deccansoft Software Services. J2EE Syllabus Overview: Java is a language and J2EE is a platform which implements java language. J2EE standard for Java 2 Enterprise Edition. Core Java and advanced java are the standard editions of java whereas J2EE

More information

Java Programming Language

Java Programming Language Java Programming Language Additional Material SL-275-SE6 Rev G D61750GC10 Edition 1.0 D62603 Copyright 2007, 2009, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary

More information

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

Software Paradigms (Lesson 10) Selected Topics in Software Architecture Software Paradigms (Lesson 10) Selected Topics in Software Architecture Table of Contents 1 World-Wide-Web... 2 1.1 Basic Architectural Solution... 2 1.2 Designing WWW Applications... 7 2 CORBA... 11 2.1

More information

J2EE Application Development : Conversion and Beyond Osmond Ng

J2EE Application Development : Conversion and Beyond Osmond Ng IBM Software Group J2EE Application Development : Conversion and Beyond Osmond Ng IBM Software Group Practitioner View Point IBM Rational Application Developer J2EE/EJB Tooling J2EE construction tools

More information

JBuilder. Getting Started Guide part II. Preface. Creating your Second Enterprise JavaBean. Container Managed Persistent Bean.

JBuilder. Getting Started Guide part II. Preface. Creating your Second Enterprise JavaBean. Container Managed Persistent Bean. Getting Started Guide part II Creating your Second Enterprise JavaBean Container Managed Persistent Bean by Gerard van der Pol and Michael Faisst, Borland Preface Introduction This document provides an

More information