Archive for August, 2007

Friday, August 31st, 2007

JMS is an API for using networked messaging services. A messaging system accepts messages from “producer” clients and delivers them to “consumer” clients. Data sent in a message is often intended as a sort of event notification (for example, an e-mail-handling process may need to be notified when a request is queued). Another common use for messaging (thus, JMS) is for interfacing with remote legacy applications. It can be complex and sometimes risky to use Remote Procedure Call (RPC) or a Java variant such as Remote Method Invocation (RMI) to directly invoke remote applications while a messaging solution can provide an easier and more reliable interconnection. In short, why write remote procedure calls when you have access to an API specifically designed for sending messages across a network from one object to another? JMS calls frequently rely on the Java Naming and Directory Interface (JNDI) to locate message recipients. JNDI is discussed later in this chapter. Java Transaction API Java Transaction API (JTA) provides developers with a mechanism for handling the commit and the rollback of transactions as well as ensuring the ACID (Atomicity, Consistency, Isolation, and Durability) properties of a transaction. JTA is used for managing distributed transactions (e.g., updates to multiple databases that must be handled in a single transaction). JTA is a low-level API and associated coding is complex and error-prone not in the spirit of J2EE! Fortunately, EJB containers or application servers generally provide support for distributed transactions using JTA. For this reason, the EJB developer is able to gain the benefit of distributed transactions, leaving the complex implementation details to the provider of the EJB container. Now, that s more in the J2EE spirit! Java Transaction Services The Java Transaction Service (JTS) provides developers with a means of communicating with transaction monitors and other transaction-oriented resources. Of course, JTS provides high-level support for JTA as well as other transaction services. The Java Transaction Service plays the role of an intermediary for all the constituent components of the EJB architecture. In JTS terminology, the director is called the transaction manager. The participants in the transaction that implement transaction-protected resources such as relational databases are called resource managers. When an application begins a transaction, it creates a transaction object that represents the transaction. You would use JNDI (Java Naming and Directory Interface) to access this transaction object. The application invokes the resource managers to perform the work of the transaction. As the transaction progresses, the transaction manager keeps track of each of the resource managers enlisted in the transaction. Often, JTS assists in managing the activities involved in a two-phase commit. JavaMail The JavaMail API offers a standard Java extension API to talk to all your favorite standard Internet mail protocols. The API provides a platform-independent and protocol-independent framework to build Java technology based mail and messaging applications. Put differently, JavaMail represents a standardized, extensible platform for communicating, presenting, and manipulating all current and future Multipurpose Internet Mail Extension (MIME) types. The JavaMail API is implemented as a Java platform standard extension. Say goodbye to writing your own classes for talking to mail protocols! Say goodbye to learning yet another unique third-party or in-house class library for dealing with e-mail or newsgroups! JavaMail was designed to communicate with popular protocols and MIME types.
Our Colorado hosting facilities are located in Little Rock, Colorado. Colorado web hosting datacenter which we have is linked on five major US backbones which gives you assurance that your site will be online 24/7 a day. More details you can find out in Web Hosting Colorado part.

Thursday, August 30th, 2007

The code in Listing 2-1 is the functional equivalent to the servlet code shown in Listing 2-2. Note Recall that JSP pages get translated into servlets. However, the servlet code shown in Listing 2-2 is not the result of translating the JSP in Listing 2-1 into a servlet. The JSP translator generates a servlet that performs the same function as the servlet shown in Listing 2-2 but with different Java code . Listing 2-2: A servlet functionally equivalent to the JSP page in listing 2-1 import java.io.*; import javax.servlet.*; public class HeyItsYou extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(”text/html”); HttpSession session = req.getSession( false ) ; PrintWriter out = res.getWriter(); out.println(”“); out.println(”“); out.println (”

Hey, it sey, it s,”); out.print(”String you = “); out.println((String) session.getAttribute( you )); out.println(user); out.println(”

“); out.println(”“); out.println(”“); } } The JSP page is smaller than the servlet, and most users agree that the JSP is easier to understand and maintain. Many others also agree that writing out HTML (or XML, of course) by way of out.println() statements is a major drag because a large page can have hundreds of out.println() statements. Hence, the bottom line is that, while JSPs and servlets often accomplish the same task, you ll still need servlets from time to time to do what JSPs cannot. Enterprise JavaBeans Enterprise JavaBeans (EJB) define an architecture that enables developers to create reusable, server-side components called enterprise beans. Enterprise beans typically reside on the application server or may have their own dedicated server. Of course, you can read much more about EJB in the following chapters. Please note that enterprise beans are not JavaBeans! One difference is that calling a JavaBean (from a servlet or JSP page) involves intra-process communication, whereas calling an EJB (from a servlet or JSP page) involves inter- process communication. You can read about other differences in the following chapters. Java Messaging Services Java Messaging Services (JMS) is an API that invokes asynchronous messaging services such as broadcast and point-to-point (client-to-client) messages.
We know it is important decision to make, effects your wallet, and the quality of your web site, so relax and visit shared web hosting.

Wednesday, August 29th, 2007

CORBA enables the enterprise to use existing software by providing features that developers can use to wrap existing software as CORBA objects. With CORBA, applications written in several languages can happily coexist and communicate with each other. A great deal of Enterprise JavaBeans was derived from CORBA. Indeed, a cursory look at EJB could lead one to think that EJB is a slimmed-down, Java-centric version of CORBA. EJB and CORBA can be used together, specifically when an enterprise bean needs access to code written in another language, or code written in another language needs access to an enterprise bean. Because CORBA is the brainchild of numerous companies, no single company controls CORBA. A committee (the Object Management Group, or OMG) must agree upon changes made to the CORBA specification, which has both positive and negative consequences. On the plus side, you are fairly assured that you are not tied to a single vendor, product, or architecture when using a CORBA implementation. On the minus side, you may have to wait years for the OMG to make decisions on CORBA-related issues. The OMG Interface Definition Language (IDL) defines the interface to objects in the CORBA universe. Although IDL is a language, you, the application programmer, do not necessarily execute IDL code. Rather, you write IDL code and use a code generator to transform IDL into a specific programming language. Java programmers use an IDL-to-Java translator to generate a representation of their IDL as Java. If you re curious, you can take a look at how IDL translates to Java by examining ftp://www.omg.org/pub/docs/format.98-02-29.pdf. JavaServer Pages You ve already read some of the skinny on JavaServer Pages (JSP). Some call JSP the front door to enterprise applications, and with good reason. JSPs enable the enterprise application developer to separate presentation code from business logic code on the server, thereby providing the application with a robust presentation layer. Java Servlets As with JSP, servlets enable developers to dynamically create Web content as well as provide additional functionality to a Web server. If a JSP gets translated into a servlet, why are JSPs important in the J2EE arena? JSP pages are easier to code and maintain than servlets because servlets require the Java programmer to explicitly write out HTML statements to a response object, whereas the Web page developer using JSP merely codes HTML. cross-reference Please refer to Chapter 3, A First Look at JavaServer Pages and Chapter 8, JSP Pages and Servlets Revisited, for more detailed discussions of servlets and their relationship to JSP pages. For example, assuming you is the current Web page viewer below, the following code is a JSP that generates an HTML page that displays the string Yes, it s concatenated with the current user. Listing 2-1: Your first JSP page <%@ page language="java" %>

Yes, it s, <% String you = (String) session.getAttribute( you ); out.println(you); %>


Our company is website hosting provider which offers web hosting services for php, java, mysql, frontpage, dreamweaver and domain name registration. Check more about us on website hosting provider part.

Tuesday, August 28th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. J2EE APIs Sun Microsystems provides a list of technologies that developers use in creating J2EE applications. Most of these technologies have an associated API. A few, notably XML, are used in several J2EE APIs. Here is a list of the J2EE APIs with a brief description: . JavaServer Pages (JSP): Enables developers to dynamically generate Web pages with HTML, XML, and Java code. JSP pages execute on the Web server. . Java Servlets: Enables developers to dynamically create Web content as well as provide additional functionality to a Web server. Java servlets execute on the Web server. . Enterprise JavaBeans (EJB): Defines an architecture that enables developers to create reusable, server-side components called enterprise beans. . Java Messaging Services (JMS): A set of APIs that invoke asynchronous messaging services such as broadcast and point-to-point (client-to-client) messages. . Java Transaction API (JTA): Provides developers with a mechanism for handling the commit and the rollback of transactions as well as ensuring the ACID (Atomicity, Consistency, Isolation, and Durability) properties of a transaction. . Java Transaction Services (JTS): Provides developers with a means of communicating with transaction monitors and other transaction-oriented resources. . JavaMail: Enables a J2EE application to send and receive e-mail. . Java Naming and Directory Interface (JNDI): Provides an interface for accessing name and directory services, such as LDAP directory services and Domain Name Service (DNS). . Java Database Connectivity (JDBC): Provides the J2EE application with a standard interface to databases (usually relational databases). . Remote Method Invocation (RMI/IIOP): Enables a Java application to invoke methods on different Java Virtual Machines. . Interface Definition Language (IDL): Enables J2EE-based applications to use CORBA objects. In the following sections of this chapter, we explore the APIs in the preceding list in greater detail. CORBA at a Glance CORBA, the Common Object Request Broker Architecture, defines a standard for creating distributed object request systems. The CORBA standard is the result of the collaboration of well over a hundred companies. The end result is a standard that is language, platform, and vendor neutral.
Interland Web Hosting is the leader in the industry of discount and affordable web hosting. All plans are feature packed, with 24×7 tech support, automatic backups. You also get visitor statistics, spam filtering, email anti virus, and much more. Web page hosting is generally sufficient only for personal home pages.

Monday, August 27th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Chapter 2: J2EE Component APIs This chapter provides an overview of the J2EE component APIs. As mentioned in Chapter 1, J2EE is a collection of approximately 12 application programming interfaces (APIs) for developing enterprise applications. These APIs define a complete set of services that software engineers use to develop software components. J2EE simplifies the work of an application development team by providing a rich set of services that manage many application details without programming. J2EE API Classifications The J2EE APIs provide numerous services to n-tier application developers. We may group the J2EE APIs into three classifications corresponding to the category of service, or function, the APIs provide to the application development team. The classifications are as follows: . Application components: These include applets, which are Java programs that execute in the client browser; servlets, which execute on the server; and JSP pages, which provide dynamic content to Web pages. J2EE also enables clients to run applications that can access data (by using a database API) without going to a Web server. . Resource managers: These enable customer components to connect to an external component. These external components can be another piece of J2EE, such as JavaMail (for mail messaging) or an IBM mainframe transaction processor (such as IMS or CICS). . Database access: J2EE database access relies on the Java Database Connectivity API or JDBC, which enables a customer container to issue industry-standard SQL. Relational database access in Java also relies heavily on Java Transaction Services, or JTS, and the Java Transaction API. The J2EE APIs work in concert to provide the services mentioned in the aforementioned classifications. For example, a developer would use an application component API, such as JSP, to create a Web interface for an application that accesses data from a relational database using JDBC. In the following section, we ll take a look at J2EE APIs that fall within the preceding classifications.
If hosting is cheap, it doesn’t need to be second-rate. Try us if you don’t believe cheap web hosting we have 30 days money back guarantee.

Sunday, August 26th, 2007

layer than two-tier, thin-client implementations. In general, the isolation of functions in discrete layers, implemented in discrete tiers, means that each tier can be tweaked by using best-of-breed products without much impact on the remaining tiers. As previously mentioned, any technology worth its salt solves old problems while introducing new ones. Some problems caused by implementing applications that follow the n-tier architecture are described below. N-tier architectures are flexible. One result of this flexibility is that the three- or n-tier implementer has to cope with more hardware and software components than its two-tier counterpart. The addition of the application server opens up new system configuration possibilities. While selecting best-of-breed products to implement the system s layers is a good thing, the problems with having a multiple vendor environment, replete with finger pointing, persist. As you might imagine, maintenance costs for a large n-tier system are high. Imagine a large n-tier application, such as a banking/ATM system, with thousands of clients dispersed all over the world securely reading and writing terabytes of data to multiple data stores. The activity between tiers necessary to get the job done must be staggering! The overhead produced by transmitting and receiving all this data across networks that connect hardware and software components that implement the multiple tiers can slow down things, to be sure. The problems I’ve mentioned can be solved for the most part by spending more money for additional hardware not exactly the favorite solution! We ve talked about the benefits of developing software in layers, or tiers. As we ll see here and throughout subsequent chapters, J2EE provides an architecture for constructing n-tier applications. Before we move on to discuss J2EE particulars, we need to take a look at another essential technology instrumental to J2EE application development that has proved its worth in theory and practice: object technology.
As web cam capabilities have been added to instant messaging text chat services such as Yahoo Messenger, AOL Instant Messenger (AIM), MSN Messenger and Skype, one-to-one live video communication over the internet has now reached millions of mainstream PC users worldwide.You can see details on web cam web hosting section.

Saturday, August 25th, 2007

More bad news for adopters of a two-tier architecture follows. In the fat client scenario, any change to the application logic (and you know that there will be changes) involves compiling and installing the changed code on all the clients an expensive proposition. In the thin client scenario, the enterprise usually relies on vendor-specific databases and the vendor s implementation of triggers and stored procedures. Typically, proprietary implementations of DBMS features are not portable to different platforms and usually will not work with different vendor products. Every strain of technology solves some old problems while introducing new ones. Two-tier architectures are certainly no exception; although applications developed with a two-tier architecture achieve some benefits by isolating tasks into separate tiers, the disadvantages of the architecture remain. A sensible question is: Are there ways of exploiting the advantages of these architectures while taking the sting out of their problems? N-tier Architectures in Brief Perhaps I can shed some light on a possible answer to the $64,000 question posed in the previous section by posing another question: What are the root causes of the deficiencies of the two-tier architectures? One cause is the architecture s failure to give the application logic layer its own tier. By trying to divvy up the functionality of the application logic layer, the resulting architecture ties applications to high-maintenance clients, proprietary and nonportable databases, and clogged networks. Why not give the application logic layer its very own tier? You don t have to be a rocket scientist to guess what the architecture is called when the presentation, application logic, and data layers have their own tier. The n in n-tier means that a particular layer (the application logic layer, really) may have more than one physical tier. Whether you re talking about three-tier (a specific case of the more general n-tier) or n-tier, the basic concepts are the same to encapsulate the application logic from the presentation and data layers. What does this buy you? With the computations, business logic code, and other application logic layer tasks isolated in one or more separate tiers, these tasks do not reside in the client, nor do they reside in the database. Put another way, n-tier architectures typically deploy thin clients and DBMSs devoid of application code. There are several paths to the road of three-tier architecture implementation. A popular implementation places the application logic layer on one or more application servers. These servers provide many essential services to a three- tier application, such as transaction management, resource pooling, and security. Rather than allow a fat client or stored procedure laden database to handle transactions (when to commit one or more transactions or when to rollback, for example), a three-tier architecture implementation delegates this vitally important function to the application server. Because business logic dictates what constitutes a transaction, support services dealing with transaction management belong on the application server because the business logic is implemented there. As previously mentioned, a shortcoming of two-tier architectures is the consumption of resources, such as database connections, even when such resources are not needed. A characteristic of two-tier architectures is that each client needs a connection to the databases. Three- or n-tier architecture implementations allow a client to request data from one or more databases by communicating with code in the application logic layer tier. This code can dynamically connect to a database to fetch and return the requested data to the client. Also, this code can queue the data request until a database connection becomes available, and then fetch and return the requested data to the client. Application servers both hardware and software are more secure than desktop client PCs. The hardware that houses the application server usually resides in a physically protected space. Rarely would you worry about stumbling over a power cord for the hardware that houses an application server! On the software side, most server software is built with security in mind unlike client desktop operating systems, such as Windows or Mac OS. Do three-tier architectures solve the problems of two-tier architectures cited above? For the most part, they do. The problems caused by fat clients simply do not apply to n-tier architectures. Thin clients are relatively inexpensive to install and maintain. Application changes will not have much of an impact on thin clients; the application servers take the brunt of the changes. Pulling application logic out of the DBMS by not using stored procedures places less reliance on proprietary stored procedure implementations. Three-tier implementations have a wider choice of DBMS products for use in the data
Please check java servlet web hosting services, here you will find professional-grade java servlet web hosting with the best prices.

Friday, August 24th, 2007

Two-Tier Architectures in Brief Some two-tier architectures combine most of the application logic layer tasks with the presentation layer, while others combine most of the application logic layer with the data layer. A two-tier architecture could have one tier consisting of client PCs containing application logic code and database access routines and the other tier consisting of one or more databases. This arrangement is often referred to as a fat client. Another way to implement the two-tier architecture is placing the application logic layer with the data layer to form a tier and having the presentation layer in the other tier. Here, the database would rely on stored procedures and triggers to implement most of the application logic. This arrangement is often referred to as a thin client. Figure 1-1 shows the differences between fat and thin client arrangements. Figure 1-1: Fat and thin clients compared and contrasted As you can see in Figure 1-1, the fat client architecture containing application logic code is a combination of the functionality of the presentation and application logic layers. The thin client architecture has the application logic code buried within the DBMS in the form of stored procedures (code stored within the database that performs some application-specific task) and triggers (a feature of a DBMS that executes stored procedures based on one or more conditions). Most two-tier architectures fall somewhere in between these extremes. The dashed line represents the tier boundary. Conventional wisdom these days is that two-tier architectures can satisfactorily handle a hundred or so users. For larger numbers of users, performance may start to degrade because of the client s need to maintain a connection to the server. These constant connections drain network bandwidth and use scarce database connections. This problem is more severe in the fat client than in the thin client scenario. For the fat client implementation, every request for data requires reaching across the network, dipping into the database, and returning data to the client. For the thin client implementation, one request for data can trigger a DBMS stored procedure that executes on the server. This stored procedure could return the same data that a fat client would need multiple requests for. Although using stored procedures helps alleviate the bandwidth problem, the thin client still requires the database connection.
Interland Web Hosting is the leader in the industry of discount and affordable web hosting. All plans are feature packed, with 24×7 tech support, automatic backups. You also get visitor statistics, spam filtering, email anti virus, and much more. Web page hosting is generally sufficient only for personal home pages.

Thursday, August 23rd, 2007

packs to the video card on the desktop may be purchased from different vendors. The modern computing environment clearly shares the characteristics of today s diverse corporation doing business in today s diverse world. The challenges facing systems professionals tasked with developing enterprise applications are legion. How have today s systems folk risen to the challenge? Two powerful technologies developed over the past few decades have proven instrumental in developing applications that allow the modern corporation to conduct its business. These technologies are client-server architectures and object technologies. Client-server architectures describe how to partition the major functions of an application in layers. Object technologies deal with constructing software systems as groups of communicating objects; each object has a set of well-defined behaviors (called methods) and comes with its own data (called properties). Developing Applications in Layers In the days of bell-bottoms and disco music, companies used networks primarily to connect mainframes using dedicated hardware and proprietary software and protocols. In the 1980s, companies started to use UNIX servers and the TCP/IP protocol, which quickly became an industry standard. In response to servers not adequately scaling to meet the needs of ever-increasing numbers of users, those in charge of the shop began to shift processing power from centralized servers to the network. The era of client-server computing had begun. Developing client-server applications is different from developing applications that run on green-screen, glass house systems. The distributing of processing power between client and server demands that client-server software be developed to reflect this division. One strategy devised to develop client-server applications is to write the software in layers. A layer is a logical level that deals with related application tasks. The basic idea is to develop the software to implement the layer s functions independently of features in other layers. By partitioning software into layers, application developers could concentrate on the features and problems peculiar to a particular layer. Division of application features among layers meant division of development responsibility. In addition, the marketplace started to offer tools to support this software development strategy. The layers commonly used to abstract a software system these days are a presentation layer, an application logic layer, and a data layer. Each layer is responsible for functions not found in the other layers: . The presentation layer is responsible for user interface tasks. These tasks include accepting user input, performing various edit checks on input, and displaying relevant application output. . The application logic layer is responsible for tasks that execute the algorithms that solve business problems. These tasks include performing calculations, handling security, and accessing data. The application logic layer contains most of the code for the application. . The data layer is responsible for tasks that maintain permanent data stores in the form of one or more databases. These tasks include data locking, data integrity support, and transaction support. Code that implements tasks within a layer communicates with code in adjacent layers only. For example, code within the presentation layer communicates with code within the application logic layer but does not communicate with code within the data layer. To implement a layered application, you need an architecture that describes the physical boundaries between the above layers. The components that reside within the physical boundaries of the layers are called tiers. A summary of two common client-server architectures, called two-tier and three-tier (or n-tier) architectures, follows. Note The term architecture as used throughout this chapter refers to a partitioning strategy and a coordination strategy. The partitioning strategy leads to dividing the entire system in discrete, non-overlapping parts or components. The coordination strategy leads to explicitly defined interfaces between those parts.
If you need complete reliable cheap web hosting package, you come to right place. We offer all you need just check our cheap web hosting package section.

Wednesday, August 22nd, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Chapter 1: Enterprise Computing Concepts JavaServer Pages (JSPs) and Enterprise JavaBeans (EJBs) are part of a server-side application development specification called the Java 2 Platform, Enterprise Edition (J2EE). Before you jump into the specifics of JSPs or EJBs, some background on enterprise application development, J2EE, and how JSP and EJB fit into J2EE is in order. This chapter sets the stage with information on the characteristics of a typical computing environment found in a modern corporation. Next, you read about two significant advancements in computer science that provide application developers with the means to satisfy their customers demands for computing services. You get a high-level look at J2EE and see how J2EE addresses the needs of application developers. You read about the components of J2EE, which include JSP and EJB. The chapter closes with a short discussion on the roles that JSPs and EJBs play in developing enterprise applications with the J2EE specification. The Enterprise Computing Environment Today s corporate computing environment is a different animal from its ancestors. Typically, enterprise computing environments are: . Data-Obsessed: These days, the modern company is addicted to its data. With storage costs low, companies are less likely to purge data stores today than in years past. Some industries, such as brokerage and insurance, keep decades worth of data and subject their data to intense analysis. The astute corporate mavens realize that corporate data is an asset worth exploiting. Those in charge look to their computing professionals to provide tools that exploit this valuable asset. . Distributed: Today s enterprise computing environment has grown beyond the scenario of a single machine in an air-conditioned room, with rows and rows of storage devices, serving hundreds or thousands of dumb green screens. The more likely scenario for today s environment is one of networked servers in diverse geographical locations that serve data to hundreds or thousands of comparatively smart GUI clients. . Secure: A good deal of corporate data must be kept from the prying eyes of the pesky, prying employee itching to know who got the biggest raise in the department, the dementedly disgruntled employee looking to vend proprietary information, and the capriciously curious employee trying to learn about various systems and applications. . Scalable: The environment that serves the needs of one hundred may be inadequate to serve the needs of one thousand. As the number of users increases, resources, such as bandwidth or database connections, have a bad habit of thinning out to unacceptable levels or simply running out. . Fault tolerant: With the computing environment distributed among many parts, the possibility of any single part failing increases with the number of parts. The company cannot afford to have its systems crash and burn every time a server winks out or a data store goes offline. . Heterogeneous: The days of a company using products from a single vendor are gone. More likely, a company uses a mix of hardware and software from several competing vendors. Today, everything from the physical disk
Need a managed web hosting provider to help maintain your website? Our web hosting service is the preferred choice of thousands of demanding customers.