Welcome!

Websphere Authors: Carmen Gonzalez, Yeshim Deniz, Pat Romanski, Elizabeth White, Liz McMillan

Related Topics: Websphere

Websphere: Article

Examining the Programming Model Extensions

Within IBM WebSphere Application Server version 6

Back in version 4 of IBM WebSphere Application Server (WAS), IBM released the Enterprise Edition of WAS. In version 5, IBM continued to release the Enterprise Edition (later renamed IBM WebSphere Business Integration Server Foundations in v5.1) with even more functionality. In version 5, the heart of the Enterprise Edition functionality was process choreographer, a Java 2 Enterprise Edition (J2EE)-based workflow engine. However, the Enterprise Edition also contains a slew of other technology sometimes referred to as the WAS Programming Model Extensions (PME). The goal of these programming model extensions is to provide solutions to problems that are difficult and sometimes impossible to solve using existing J2EE technology.

In WAS v5, customers needed to upgrade to the Enterprise Edition to benefit from WAS PMEs, leaving a large portion of WAS developers out of luck. However, in version 6 most of the PMEs have now been included in all editions of WAS. This means that all WebSphere version 6 users can benefit from these extensions without upgrading to a higher end workflow engine.

In this article, I will go over some of these WAS PMEs. I will discuss each PME in terms of the problem it solves. In addition, I'll talk about the work being done to add some of these extensions to future versions of the J2EE specification.

Overview of Extensions

In order to put some structure around this article, I am going to categorize the extensions by their problem space:
  • Multi-threading and scheduling extensions
  • Transactional enhancements and EJB entity bean extensions
  • Other extensions

Multi-threading and Scheduling

In this section, I am going to discuss some of the WAS PME features in the multi-threading and scheduling space.

Asynchronous Beans and CommonJ Work Manager
The J2EE platform shields developers from low-level system coding such as multithreaded programming. For that reason, there are many restrictions in the J2EE programming model when it comes to multithreading. For example, in J2EE 1.4, it is illegal to create your own Java threads in a J2EE container. WAS has no knowledge of these threads so it cannot propagate things such as a security context. In addition, because plain Java threads are random they cannot be managed by a thread pool; without someway to manage these threads, applications can lose control of machine resources. However, there are certain use cases that could benefit from the ability to do work asynchronously. Traditionally in J2EE such use cases are implemented with the Java Messaging Service (JMS). JMS forces you to define destinations, create messages, and code message driven beans to consume messages. JMS is a great platform for doing asynchronous work, especially for integration scenarios, but, in certain situations all a developer wants to do is accomplish concurrent processing. For example, you may have a use case where an application needs to retrieve data from two or three back end independent data sources. In order to speed up performance, the application could run these queries concurrently. With JMS, this is quite complex to write. However, WAS provides a framework (called asynchronous beans) of classes that allow programmers to have work executed on separate threads. In addition, asynchronous beans can also have activities performed in response to alarms or events. At the same time, it ensures that these activities are executed using the "logically correct" J2EE context. This model represents a very interesting compromise between the loosely coupled approach used with messaging and the tightly coupled approach of traditional J2EE programming that requires a single thread of execution.

WAS developers can create asynchronous beans instead of Java threads. Asynchronous beans allow a developer to code the work to be done on a separate thread. (It is important to note that because of work being done to standardize asynchronous beans, the asynchronous bean framework is also referred to as CommonJ WorkManager. This means that there are two APIs, one in com.ibm package referred to as asynchronous bean API, and the other in the commonj package referred to as CommonJ WorkManager API. For the purpose of this article we will refer to asynchronous beans and CommonJ WorkManager interchangeably; they are both configured the same way.) There are three types of asynchronous beans:

  • Work objects: Instances of classes that implement a special work interface. Essentially, the Work interface is the same as the Java runnable interface. However, Work instances can be submitted to a WorkManager (discussed below) for asynchronous execution. Unlike a plain runnable, Work inherits the J2EE context of their creator rather than the J2EE context of the thread pool where they actually run. Works allow a J2EE component to run operations in the background and asynchronously. The code that runs in the background behaves as if it were part of the J2EE application that instantiated the work.
  • Event listeners: These listeners are also asynchronous by nature. An application can create an event listener and subscribe to events. When the event occurs, the listener will be notified and will run the logic to handle the event. The problem with listeners in a J2EE container is that, since the listener runs asynchronously in its own thread, it won't be able to use the J2EE context of the subscriber. The asynchronous beans provide a generic notification framework that allows a J2EE component to subscribe a listener to generic events and have the listener execute its logic under the same J2EE context of the subscriber.
  • Timer listeners: (Not to be confused with EJB timers described later.) Special listeners that will be fired when a timer goes off. In the asynchronous bean framework, a timer can be created by a J2EE application. The listener will be invoked on a separate thread and it will inherit the same J2EE context as the timer creator. The code sample below shows an example of a timer.

    
    public class StockQuoteTimerListener implements TimerListener {
    	String context; 
    	String url;
    	  public StockQuoteTimerListener(String context, String url){
    	     this.context = context;
    	     This.url = url;
    	  }
    	  public void timerExpired(Timer timer) {
    	     System.out.println("Timer fired. Context ="+ 
    		 ((StockQuoteTimerListener)timer.getTimerListener()).getContext());
    
    	}
    	   public String getContext() {
    	    return context;
    	   }
    	}
    

    Timers are not persistent in WAS. If you need persistent services, the WAS scheduler or EJB timer service should be used. (In version 5, the Enterprise Edition provided alarms instead of timers. Timers are a replacement for alarms but the alarms are still supported.)

    As I mentioned, the J2EE context can flow from one J2EE component to another as long as they are called on the same thread. The asynchronous bean framework makes it possible to transfer all or some of the context to separate threads. The administrator can also configure which parts of the context are going to be transferred when a WorkManager is created. The following contexts can optionally be configured to propagate:

    • Security (J2EE security context)
    • Work area (another WAS PME explained later in this article)
    • Internationalization context (another WAS PME explained later in this article)
    • Application profiling definitions (another WAS PME explained later in this article)
    In addition, the java:comp/env local namespace is always passed along with asynchronous beans.

    Due to the asynchronous nature of this programming model, transactional contexts are not passed to the asynchronous beans. The asynchronous beans get their own local transaction, or they can start global transactions if XA resources are involved.

    Asynchronous beans should stay away from caching connections. They can cache connection factories and then get a connection, use it, and release it at the end of the asynchronous execution. That way connection pooling is used correctly.

    The WorkManager is the heart of the asynchronous bean framework. A WorkManager is essentially a thread pool. It runs Work instances asynchronously and controls the transfer of J2EE contexts to those threads. The WorkManager is the anchor point that allows developers to create asynchronous beans. Applications will look up the WorkManagers using JNDI. Once an application has obtained a WorkManager, it can use it, for example, to submit Work instances. The WorkManager returns a WorkItem to the application, which can use it to monitor the progress of the work. Applications can define resource references to work managers.

    For timers, timer managers are configured on the server much the same way as work managers (see Figure 1).

    The asynchronous bean framework is the basis for two new JSRs which have been submitted jointly by IBM and BEA. These are JSR 236 (Timers for Application Servers) and JSR 237 (Work Managers for Application Servers).

    For further information on asynchronous beans, see the following link: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.nd.doc/info/ae/ae/welc6tech_asb.html.

    Scheduler Service
    Prior to J2EE 1.4, the J2EE specification defined no solution for scheduling. Applications that required scheduling to run batch jobs or scheduled events needed to do so outside the application server. In version 5, WAS introduced the scheduler service in the Enterprise Edition. Applications could now write batch jobs and scheduled events that ran inside an application server. Batch applications could now benefit from container managed transactions and J2EE security. A developer just had to provide a stateless session bean class and use the provided home and remote interface. A scheduler would then be configured administratively. Tasks could be scheduled using the scheduler API either in Java code or wsadmin. The scheduler service continues to function in WAS Application Server version 6. Figure 2 shows the administrative console screen for creating a scheduler.

    Applications can then treat the scheduler as a resource and create tasks as shown:

    	
    //lookup Scheduler as a Resource
    context = new InitialContext();
    
    Object schedulerObj =
    context.lookup("java:comp/
    env/scheduler/MyScheduler");
    
    scheduler = (Scheduler) schedulerObj;
    
    //Lookup Task Handler as an EJB
    Object taskHandlerObj = context.lookup("java:comp/
    env/ejb/StockTickerPublisher");
    taskHandlerHome =
    (TaskHandlerHome) PortableRemoteObject.narrow(
    taskHandlerObj,
    TaskHandlerHome.class);
    //Create Task
    taskInfo = scheduler.createBeanTaskInfo();
    //Associate TaskHandler with Task
    taskInfo.setTaskHandler(taskHandlerHome);
    taskInfo.setStartTimeInterval(startInterval
    + "minutes");
    taskInfo.setRepeatInterval(repeatInterval + "minutes");
    taskInfo.setNumberOfRepeats(repeats);
    taskInfo.setName(taskName);
    //Create Task in Scheduler
    TaskStatus status = scheduler.create(taskInfo);
    

    WAS provides the home and remote interface for the task handler object. Developers only need to provide a bean class with a special process method:

    
    //Example task handler
    public void process(TaskStatus taskStatus)
    {
    	try
    	{
    		publisherBO.publishStockTicker();
    	}
    	catch (StockException e)
    	{
    		throw new EJBException(e.getLocalizedMessage(),e);
    	}
    }
    

    In J2EE 1.4, the EJB timer service is introduced to the specification. The EJB timer service allows any EJB component that implements the TimerObject interface to be called by some scheduling component. Any EJB type can be used (session bean, entity bean, or message driven bean) as a timed object. The timer service also defines a standard interface called TimerService for scheduling events. In version 6, the EJB timed objects is a special type of WAS TaskHandler. So the EJB timed components build upon the same scheduling infrastructure provided in version 6. By default, an internal scheduler instance is used to manage those tasks, and they are persisted to a Cloudscape database associated with the server process.

    The EJB timer service can be configured on the desired server (see Figure 3).

    You can choose to use the default pre-configured scheduler or your own (see Figure 4).

    Any EJB type can implement the TimedObject interface and implement the ejbTimeout() method:

    
    import javax.ejb.Timer;
    import javax.ejb.TimedObject;
    import javax.ejb.TimerService;
    
    public class MyBean implements SessionBean, TimedObject {
    
      // This method is called by the EJB container upon Timer expiration.
      public void ejbTimeout(Timer theTimer) {
    
        // Any code typically placed in an EJB method can be placed here.
    
         String whyWasICalled = (String) Timer.getInfo():
         System.out.println("I was called because of"+ whyWasICalled);
      } // end of method ejbTimeout
    

    Keep in mind that you cannot use the scheduler API to schedule tasks for EJB-based timers or use the TimerService API to configure WAS TaskHandlers.

    For further information on the scheduler service, see the following URL: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.express.doc/info/exp/ae/welc6tech_sch.html.

    Transactional Enhancements and EJB Entity Bean Extension

    In this section I will discuss some extensions that deal with transactions, such as single phase resources inside an XA transaction. I will also discuss some extensions to entity beans, such as dynamic query and application profiles.

    Last Participant Support
    One of the major motivations behind J2EE application servers is the ability to provide enterprise applications with a transaction manager that can coordinate transactions across multiple resources. J2EE application server can coordinate transactions across multiple resources as long as they support the XA specification. In a perfect world, all back end resources would have support for XA. However, since this is not a perfect world, this is not the case. There are some back end systems that do not support XA. For example, distributed platforms often communicate with legacy systems that do not support XA, such as IBM? CICS? systems.

    Ordinarily, all participants in a two-phase commit process must be two-phase commit-capable. With the last participant support (LPS), you can use a single one-phase commit (1PC)-capable resource with any number of two-phase commit (2PC)-capable resources in the same global transaction. The global transaction commit processing still takes place in two phases. In phase one, all the two-phase commit resources are prepared using the two-phase commit protocol. During phase two, the one-phase commit resource is called to commit first if all the two-phase resources successfully prepared. This way, if the 1PC resource fails, WAS can simply roll back the other resources. On the other hand, if the 1PC commit resource succeeds, WAS can commit the remaining resources. Figure 5 illustrates the process.

    Keep in mind that LPS is not a complete substitute for using a resource that fully supports 2PC. It should only be used when you want to commit a one-phase capable resource (that has no 2PC support) with other 2PC resources and you want to get as close to 2PC as possible. LPS introduces a hazard of a mixed commit result because 1PC resources can't completely participate in the 2PC protocol. For example, if the WAS doesn't get a response from the 1PC resource, it has no way of knowing the status. Thus, WAS can't know whether the 1PC resource committed or not and thus does not know how to proceed. In this case, manual intervention will be required to resolve the state of the data in the 1PC resource. No special programming is needed to use LPS; it only needs to be enabled using WebSphere Application Server administration.

    For more information on last participant support, see http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.express.doc/info/exp/lao/ref/rla_rlinks.html.

    Activity Sessions
    With LPS, you can only have at most one nonphase capable resource in your XA transaction. However, if you have multiple one-phase capable resources and you need some level of coordination between them, WAS provides the activity session service. Activity sessions extend the JTA transaction model by providing an alternative unit of work to deal with 1PC. Activity sessions provide several features:

    1.  Client-side demarcation of and coordination of multiple one-phase units of work: The activity session service captures the commit operations of each local and global transaction and upholds them. At the end of the activity session, the container will go back and commit (or roll back) each individual transaction. Keep in mind that the activity session, like LPS, is no substitute for two-phase commitment control, when it comes to data integrity. An activity session may result in a mixed outcome, if some of the single phase resources successfully get committed before another resource fails to commit. In that case, the activity session service will allow the programmer to retrieve the list of resources that were committed and those whose state is uncertain.
    2.  Distributed context distribution using the OMG activity service: In order to support a declarative model, activity sessions define propagation of activity sessions from one component to another. The activity session context propagates according to the standards defined by the OMG activity service. See JSR 95 description at www.jcp.org/en/jsr/detail?id=95.
    3.  Extensions to local transaction support: WebSphere Application Server supports the notion of local transaction containment (LTC), which allowed the container to deal with unresolved resource manager local transactions and the resources associated with them. An LTC is created by default when an XA transaction is absent. Activity sessions can be used to extend the life of an LTC.
    4.  Extended entity bean life cycle support: The entity EJB can then be configured to be activated at the activity session boundaries, rather than at the transaction boundaries. The container will then keep the entity EJB active for the duration of the activity session - which corresponds to the duration of the unit of work - but no global transaction is needed to achieve this result. We often refer to this scenario as the "Commit option C plus" in that it offers a nice compromise between option C and option A by allowing the client to closely control the activation boundaries without resorting to XA transactions all the time.
    5.  Association of activity session with HttpSession to scope contexts to the life cycle of HTTP clients: You can scope an activity session to an HTTP session to help scope the life of activity sessions in Web applications. This is a powerful concept that allows you to mimic user level transactions which are made up of multiple resource transactions. Combined with the extended dntity bean life cycle support, you can interact with entity bean data without them reloading for the life of an activity session. This technique makes it possible to implement some long-running transaction semantics.

    There are two approaches to implementing activity sessions in your applications: the declarative (or container-managed) approach and the programmatic (or bean managed) approach. The programming model for activity sessions and the terminology which relates to the activity session service closely resemble the standard definitions that apply to transaction management, making it simple for a J2EE programmer to become familiar with the activity session semantics. Activity session scopes can be defined either through declarations that apply to EJB methods invocations (in a very similar way as for declarative demarcation of transactions) or servlets - or programmatically, using the UserActivitySession APIs - which are semantically very similar to the standard UserTransaction APIs.

    Figure 6 shows an example of a scenario. Here you have two different entity beans each mapped to a different 1PC resource. The EJB methods are demarcated much like you would regular transactions only using ActivityService demarcations.

    Activity sessions are not just bound to local resources. They can even be used to group multiple 2PC.

    Activity sessions are being worked on for future versions of J2EE as JSR 95: J2EE TM Activity Service for Extended Transactions (URL).

    For more information on the activity service, see: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.express.doc/info/exp/ae/welc6tech_as.html.

    Other Entity Bean Enhancements
    Websphere Application Server v6 adds some enhancements to entity beans:

    1.  Dynamic query support: The current EJB 2.1 specification only allows you to define EJB QL statically in the EJB deployment descriptor. However, there are times when an application needs to construct a query dynamically. The dynamic query service provides an API you can use to pass EJB QL at runtime. The dynamic query service is automatically deployed on WAS as a stateless session bean with a local and remote interface. Dynamic queries is being worked on as part of EJB 3.0.

    For more information on dynamic query, see: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.express.doc/info/exp/ae/welc6tech_que.html.
    2.  Extensions to EJB QL: WAS version 6 provides several extensions to EJB QL to meet real application requirements. Some examples include: querying business bean methods, dependent values, and multiple element selects.
    3.  Application profiles: WAS uses the notion of access intents on entity beans to define things such as isolation level and lazy loading of collection-based data. In WASv5, an entity bean method could only be assigned one access intent. If an entity bean needed to be accessed by different session beans that had different access intent requirements, you needed to define multiple methods that access the same data or sometimes even create new entity beans mapped to the same data with different access intents. Application profiles allow me to create multiple access intents on the same entity bean method and mark the calling session beans with a particular task. Based on the container task of the session bean, the entity bean will use the correct access intent for the particular use case. This allows entity beans to be more reusable across various data access requirements.

    For more information on application profiles, see: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.express.doc/info/exp/ae/welc6tech_appprof.html.

    Other PMEs

    We will briefly review some more WAS 6 PMEs and provide links where you can find more information.

    WorkArea Service
    The J2EE specification defines a component style of development. Components share data by passing information through well defined interfaces. Certain information, however, gets passed automatically. For example, transactional components such as Enterprise JavaBean components pass a transactional context to each other. Another example is a servlet that can propagate a security context to a stateless session bean. Developers do not have to pass transactional or security handles from one component to another, even when calling remote session beans. J2EE application servers pass this information along transparently. However, most other data traditionally needs to be passed through interfaces. Certain data, however, could benefit from automatic propagation. Usually any data that is needed by many components (for example, profile data about a user) is a good candidate for automatic propagation. Rather than populating every interface with the same information, it would be nice if you could propagate this frequently used information using some J2EE context.

    WAS version 6 provides this function through the WorkArea service. By using a simple API, components can pass context information from component to component without passing it directly through programmatic interface. The WorkArea service will propagate to local components using thread local storage and it will pass data to remote components through IIOP. Work areas can be nested as well to allow flexibility of layering your code correctly.

    A client component can create a UserWork area:

    	
    //Lookup UserWorkArea
    UserWorkArea workArea =  (UserWorkArea) ctx.lookup("java:comp/websphere/UserWorkArea");
    
    //create workArea
    workArea.begin("Profile");
    workArea.set("Name","Luke Skywalker");
    workArea.set("Age",new Integer(28));
    
    //call component
    myEJB.callService(params);
    
    //complete workArea
    workArea.complete();
    

    The target component can then access the UserWorkarea to obtain the information.

    
    void callService() throws SomeException
    {
    InitialContext ctx = new InitialContext();
    	//lookup WorkArea
    UserWorkArea workArea =
    (UserWorkArea) ctx.lookup("java:comp/websphere/UserWorkArea");
    
    	//Access Data
    System.out.println("Work Area");
    	System.out.println("Name : " + workArea.get("Name"));
    	System.out.println("Age : " + workArea.get("Age"));
    }
    

    IBM is leading JSR 149 for adding WorkArea support to the J2EE specification.

    You can find more information about the WorkArea service at: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.base.doc/info/aes/ae/welc6tech_wa.html.

    Internationalization Service
    Many applications require Internationalization(i18n) support. In most cases, developers can rely on using resource bundles to display data in different languages or regions. However, some i18n requirements are more than just displaying data; applications may need to alter business logic depending on the locale of the user. For example, based on what country you logged in on, an application may need to provide different tax rules. In order to be able to do this, an application would need to get some information about the locale or time zone of the user to properly handle the logic correctly. One could use the WorkArea service to pass i18n, however, having i18n data passed in a special way can benefit greatly. Consider another case where a company needs to develop an internationalized application that is meant to be deployed in various countries. Depending in which country the application is deployed, applications require certain portions of the application to run logic differently. Rather than maintaining different code bases, the i18n service can also be used to determine the locale of the server. This allows applications to deal with both their local i18n context and the caller's i18n context separately. The i18n service allows applications to access both the caller's i18n information as well as the local servers transparently.

    The i18n service in WAS 6 allows applications to access the i18n context of the caller:

    
    UserInternationalization i18nService = (UserInternationalization) ctx.lookup("java:comp/websphere/UserInternationalization");
    
    Internationalization callerI18n = i18nService.getCallerInternationalization();
    

    The i18n service also allows applications to access the i18n context of the running environment:

    
    UserInternationalization i18nService =
    (UserInternationalization) ctx.lookup(
    "java:comp/websphere/UserInternationalization");
    
    InvocationInternationalization invI18n =
    i18nService.getInvocationInternationalization();
    

    IBM is working on standardizing the i18n service through JSR 150.

    More information can be found at: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.base.doc/info/aes/ae/welc6tech_in.html.

    Object Pools
    J2EE application servers provide pooling for Enterprise JavaBean components as well as resources such as JDBC connections. However, there are times when applications need to pool plain Java objects. Many times developers spend time developing their own object pools or invest in some third party library. WAS provides an object pool that can pool any arbitrary set of objects. The object pool can be configured through the WAS administrative console or through any supported WAS administrative client.

    More information about object pools can be found at: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.base.doc/info/aes/ae/welc6tech_objp.html.

    Startup Beans
    Most applications require some sort of initialization. For example, an application may need to cache some read only data for fast access. This data can be initialized at start up. In the Web container, this can be done by marking a servlet for start up in the web.xml file. However, in the EJB container, start up logic can be challenging. The J2EE specification does not define a way to handle start up logic in the EJB container. WAS provides startup beans that can be used to accomplish start up logic in the EJB container.

    More information can be found about startup beans at: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.base.doc/info/aes/ae/welc6tech_sub.html.

    Dynamic Cache
    The dynamic cache service is a whole caching infrastructure. It is a large topic and requires its own paper. My book (referenced at the end of this article) has a whole chapter on this topic. In short, the dynamic cache service improves performance by caching the output of servlets, commands, Web services, and JSP files. Dynamic caching features include replication of cache entries, cache disk offload, Edge-Side Include caching, Web services, and external caching.

    More information on dynamic cache service can be found at: http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/ com.ibm.websphere.base.doc/info/aes/ae/welc6tech_dyn.html.

    Conclusion

    This article provided an overview of many of the WAS programming model extensions. There are certainly other extensions not addressed in this article. For example, there are more extensions in the area of SOA, such as the Web Service Gateway or Service Data Objects (SDO). This article tries to provide the PMEs that were previously only available in the Enterprise Edition (WBI SF) of WAS. Now, all WebSphere Application Server customers can use these enterprise class PMEs to fulfill their enterprise requirements.

    Acknowledgments

    Thanks to Billy Newport, Chris Johnson, and Bruce Clay for reviewing this document.

    References

  • IBM WebSphere: Deployment and Advanced Configuration (by Roland Barcia, Tom Alcott, Bill Hines, and Keys Botzum) www.amazon.com/exec/obidos/tg/detail/-/0131468626/qid=1106108458/ sr=1-1/ref=sr_1_1/103-0795483-2226208?v=glance&s=books
  • Migrating WebLogic Startup Code to WebSphere Application Server www-106.ibm.com/developerworks/websphere/library/ techarticles/0401_beaton/0401_beaton.html
  • Specifications: service data objects, work managers, and timers www-128.ibm.com/developerworks/java/library/j-commonj-sdowmt/index.html
  • Introduction to service sata objects: www-128.ibm.com/developerworks/java/library/j-sdo/index.html
  • Static and dynamic caching in WebSphere Application Server: www-128.ibm.com/developerworks/websphere/techjournal/0405_hines/0405_hines.html
  • More Stories By Roland Barcia

    Roland Barcia is a consulting IT specialist for IBM Software Services for WebSphere in the New York/New Jersey Metro area. He is the author of one of the most popular article series on the developerWorks WebSphere site, www-106.ibm.com/developerworks/websphere/techjournal/0401_barcia/barcia.html, and is also a coauthor of IBM WebSphere: Deployment and Advanced Configuration. You can find more information about him at http://web.njit.edu/~rb54

    Comments (2) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    Simon Birch 04/07/08 01:16:28 AM EDT

    Good article, but is the statement, "it is illegal to create your own threads in a J2EE container", 100% correct? I am not saying that it's not - I would just like to know the answer. I have heard many people say that J2EE applications should not spawn threads, but I can not find any documentation stating this in the Java 2 Platform Enterprise Edition Specification. The Enterprise JavaBeans Specification, Version 2.1, does explicitly say that an enterprise bean must not attempt to manage threads. So, this would lead me to believe that a J2EE application can spawn threads.

    Simon Birch 04/07/08 01:15:35 AM EDT

    Good article, but is the statement, "it is illegal to create your own threads in a J2EE container", 100% correct? I am not saying that it's not - I would just like to know the answer. I have heard many people say that J2EE applications should not spawn threads, but I can not find any documentation stating this in the Java 2 Platform Enterprise Edition Specification. The Enterprise JavaBeans Specification, Version 2.1, does explicitly say that an enterprise bean must not attempt to manage threads. So, this would lead me to believe that a J2EE application can spawn threads.

    Also, if you must have a reason why threads would be used, then imagine that ten calls must be made to a server to retrieve values that are not dependent on each other. It would make sense to do these ten calls asynchronously.

    @ThingsExpo Stories
    DevOps Summit 2015 New York, co-located with the 16th International Cloud Expo - to be held June 9-11, 2015, at the Javits Center in New York City, NY - announces that it is now accepting Keynote Proposals. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development cycles that produce software that is obsolete at launch. DevOps may be disruptive, but it is essential.
    “In the past year we've seen a lot of stabilization of WebRTC. You can now use it in production with a far greater degree of certainty. A lot of the real developments in the past year have been in things like the data channel, which will enable a whole new type of application," explained Peter Dunkley, Technical Director at Acision, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that Windstream, a leading provider of advanced network and cloud communications, has been named “Silver Sponsor” of SYS-CON's 16th International Cloud Expo®, which will take place on June 9–11, 2015, at the Javits Center in New York, NY. Windstream (Nasdaq: WIN), a FORTUNE 500 and S&P 500 company, is a leading provider of advanced network communications, including cloud computing and managed services, to businesses nationwide. The company also offers broadband, phone and digital TV services to consumers primarily in rural areas.
    The major cloud platforms defy a simple, side-by-side analysis. Each of the major IaaS public-cloud platforms offers their own unique strengths and functionality. Options for on-site private cloud are diverse as well, and must be designed and deployed while taking existing legacy architecture and infrastructure into account. Then the reality is that most enterprises are embarking on a hybrid cloud strategy and programs. In this Power Panel at 15th Cloud Expo (http://www.CloudComputingExpo.com), moderated by Ashar Baig, Research Director, Cloud, at Gigaom Research, Nate Gordon, Director of T...
    The Internet of Things is not new. Historically, smart businesses have used its basic concept of leveraging data to drive better decision making and have capitalized on those insights to realize additional revenue opportunities. So, what has changed to make the Internet of Things one of the hottest topics in tech? In his session at @ThingsExpo, Chris Gray, Director, Embedded and Internet of Things, discussed the underlying factors that are driving the economics of intelligent systems. Discover how hardware commoditization, the ubiquitous nature of connectivity, and the emergence of Big Data a...

    ARMONK, N.Y., Nov. 20, 2014 /PRNewswire/ --  IBM (NYSE: IBM) today announced that it is bringing a greater level of control, security and flexibility to cloud-based application development and delivery with a single-tenant version of Bluemix, IBM's platform-as-a-service. The new platform enables developers to build ap...

    "BSQUARE is in the business of selling software solutions for smart connected devices. It's obvious that IoT has moved from being a technology to being a fundamental part of business, and in the last 18 months people have said let's figure out how to do it and let's put some focus on it, " explained Dave Wagstaff, VP & Chief Architect, at BSQUARE Corporation, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that IDenticard will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. IDenticard™ is the security division of Brady Corp (NYSE: BRC), a $1.5 billion manufacturer of identification products. We have small-company values with the strength and stability of a major corporation. IDenticard offers local sales, support and service to our customers across the United States and Canada. Our partner network encompasses some 300 of the world's leading systems integrators and security s...
    "People are a lot more knowledgeable about APIs now. There are two types of people who work with APIs - IT people who want to use APIs for something internal and the product managers who want to do something outside APIs for people to connect to them," explained Roberto Medrano, Executive Vice President at SOA Software, in this SYS-CON.tv interview at Cloud Expo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
    Nigeria has the largest economy in Africa, at more than US$500 billion, and ranks 23rd in the world. A recent re-evaluation of Nigeria's true economic size doubled the previous estimate, and brought it well ahead of South Africa, which is a member (unlike Nigeria) of the G20 club for political as well as economic reasons. Nigeria's economy can be said to be quite diverse from one point of view, but heavily dependent on oil and gas at the same time. Oil and natural gas account for about 15% of Nigera's overall economy, but traditionally represent more than 90% of the country's exports and as...
    The Internet of Things is a misnomer. That implies that everything is on the Internet, and that simply should not be - especially for things that are blurring the line between medical devices that stimulate like a pacemaker and quantified self-sensors like a pedometer or pulse tracker. The mesh of things that we manage must be segmented into zones of trust for sensing data, transmitting data, receiving command and control administrative changes, and peer-to-peer mesh messaging. In his session at @ThingsExpo, Ryan Bagnulo, Solution Architect / Software Engineer at SOA Software, focused on desi...
    "At our booth we are showing how to provide trust in the Internet of Things. Trust is where everything starts to become secure and trustworthy. Now with the scaling of the Internet of Things it becomes an interesting question – I've heard numbers from 200 billion devices next year up to a trillion in the next 10 to 15 years," explained Johannes Lintzen, Vice President of Sales at Utimaco, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
    "For over 25 years we have been working with a lot of enterprise customers and we have seen how companies create applications. And now that we have moved to cloud computing, mobile, social and the Internet of Things, we see that the market needs a new way of creating applications," stated Jesse Shiah, CEO, President and Co-Founder of AgilePoint Inc., in this SYS-CON.tv interview at 15th Cloud Expo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that Gridstore™, the leader in hyper-converged infrastructure purpose-built to optimize Microsoft workloads, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Gridstore™ is the leader in hyper-converged infrastructure purpose-built for Microsoft workloads and designed to accelerate applications in virtualized environments. Gridstore’s hyper-converged infrastructure is the industry’s first all flash version of HyperConverged Appliances that include both compute and storag...
    Today’s enterprise is being driven by disruptive competitive and human capital requirements to provide enterprise application access through not only desktops, but also mobile devices. To retrofit existing programs across all these devices using traditional programming methods is very costly and time consuming – often prohibitively so. In his session at @ThingsExpo, Jesse Shiah, CEO, President, and Co-Founder of AgilePoint Inc., discussed how you can create applications that run on all mobile devices as well as laptops and desktops using a visual drag-and-drop application – and eForms-buildi...
    We certainly live in interesting technological times. And no more interesting than the current competing IoT standards for connectivity. Various standards bodies, approaches, and ecosystems are vying for mindshare and positioning for a competitive edge. It is clear that when the dust settles, we will have new protocols, evolved protocols, that will change the way we interact with devices and infrastructure. We will also have evolved web protocols, like HTTP/2, that will be changing the very core of our infrastructures. At the same time, we have old approaches made new again like micro-services...
    Code Halos - aka "digital fingerprints" - are the key organizing principle to understand a) how dumb things become smart and b) how to monetize this dynamic. In his session at @ThingsExpo, Robert Brown, AVP, Center for the Future of Work at Cognizant Technology Solutions, outlined research, analysis and recommendations from his recently published book on this phenomena on the way leading edge organizations like GE and Disney are unlocking the Internet of Things opportunity and what steps your organization should be taking to position itself for the next platform of digital competition.
    The 3rd International Internet of @ThingsExpo, co-located with the 16th International Cloud Expo - to be held June 9-11, 2015, at the Javits Center in New York City, NY - announces that its Call for Papers is now open. The Internet of Things (IoT) is the biggest idea since the creation of the Worldwide Web more than 20 years ago.
    As the Internet of Things unfolds, mobile and wearable devices are blurring the line between physical and digital, integrating ever more closely with our interests, our routines, our daily lives. Contextual computing and smart, sensor-equipped spaces bring the potential to walk through a world that recognizes us and responds accordingly. We become continuous transmitters and receivers of data. In his session at @ThingsExpo, Andrew Bolwell, Director of Innovation for HP's Printing and Personal Systems Group, discussed how key attributes of mobile technology – touch input, sensors, social, and ...
    In their session at @ThingsExpo, Shyam Varan Nath, Principal Architect at GE, and Ibrahim Gokcen, who leads GE's advanced IoT analytics, focused on the Internet of Things / Industrial Internet and how to make it operational for business end-users. Learn about the challenges posed by machine and sensor data and how to marry it with enterprise data. They also discussed the tips and tricks to provide the Industrial Internet as an end-user consumable service using Big Data Analytics and Industrial Cloud.