Click here to close now.

Welcome!

IBM Cloud Authors: Carmen Gonzalez, AppDynamics Blog, Liz McMillan, Elizabeth White, Pat Romanski

Related Topics: IBM Cloud

IBM Cloud: 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
    Building low-cost wearable devices can enhance the quality of our lives. In his session at Internet of @ThingsExpo, Sai Yamanoor, Embedded Software Engineer at Altschool, provided an example of putting together a small keychain within a $50 budget that educates the user about the air quality in their surroundings. He also provided examples such as building a wearable device that provides transit or recreational information. He then reviewed the resources available to build wearable devices at home including open source hardware, the raw materials required and the options available to power s...
    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.
    SYS-CON Events announced today that BMC 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. BMC delivers software solutions that help IT transform digital enterprises for the ultimate competitive business advantage. BMC has worked with thousands of leading companies to create and deliver powerful IT management services. From mainframe to cloud to mobile, BMC pairs high-speed digital innovation with robust IT industrialization – allowing customers to provide amazing user experiences with optimized IT per...
    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...
    How do APIs and IoT relate? The answer is not as simple as merely adding an API on top of a dumb device, but rather about understanding the architectural patterns for implementing an IoT fabric. There are typically two or three trends: Exposing the device to a management framework Exposing that management framework to a business centric logic Exposing that business layer and data to end users. This last trend is the IoT stack, which involves a new shift in the separation of what stuff happens, where data lives and where the interface lies. For instance, it's a mix of architectural styles ...
    Connected devices and the Internet of Things are getting significant momentum in 2014. In his session at Internet of @ThingsExpo, Jim Hunter, Chief Scientist & Technology Evangelist at Greenwave Systems, examined three key elements that together will drive mass adoption of the IoT before the end of 2015. The first element is the recent advent of robust open source protocols (like AllJoyn and WebRTC) that facilitate M2M communication. The second is broad availability of flexible, cost-effective storage designed to handle the massive surge in back-end data in a world where timely analytics is e...
    Collecting data in the field and configuring multitudes of unique devices is a time-consuming, labor-intensive process that can stretch IT resources. Horan & Bird [H&B], Australia’s fifth-largest Solar Panel Installer, wanted to automate sensor data collection and monitoring from its solar panels and integrate the data with its business and marketing systems. After data was collected and structured, two major areas needed to be addressed: improving developer workflows and extending access to a business application to multiple users (multi-tenancy). Docker, a container technology, was used to ...
    The true value of the Internet of Things (IoT) lies not just in the data, but through the services that protect the data, perform the analysis and present findings in a usable way. With many IoT elements rooted in traditional IT components, Big Data and IoT isn’t just a play for enterprise. In fact, the IoT presents SMBs with the prospect of launching entirely new activities and exploring innovative areas. CompTIA research identifies several areas where IoT is expected to have the greatest impact.
    2015 predictions circa 1970: houses anticipate our needs and adapt, city infrastructure is citizen and situation aware, office buildings identify and preprocess you. Today smart buildings have no such collective conscience, no shared set of fundamental services to identify, predict and synchronize around us. LiveSpace and M2Mi are changing that. LiveSpace Smart Environment devices deliver over the M2Mi IoT Platform real time presence, awareness and intent analytics as a service to local connected devices. In her session at @ThingsExpo, Sarah Cooper, VP Business of Development at M2Mi, will d...
    The Industrial Internet revolution is now underway, enabled by connected machines and billions of devices that communicate and collaborate. The massive amounts of Big Data requiring real-time analysis is flooding legacy IT systems and giving way to cloud environments that can handle the unpredictable workloads. Yet many barriers remain until we can fully realize the opportunities and benefits from the convergence of machines and devices with Big Data and the cloud, including interoperability, data security and privacy.
    Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In this session, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, will describe how to revolutionize your architecture and...
    We’re entering a new era of computing technology that many are calling the Internet of Things (IoT). Machine to machine, machine to infrastructure, machine to environment, the Internet of Everything, the Internet of Intelligent Things, intelligent systems – call it what you want, but it’s happening, and its potential is huge. IoT is comprised of smart machines interacting and communicating with other machines, objects, environments and infrastructures. As a result, huge volumes of data are being generated, and that data is being processed into useful actions that can “command and control” thi...
    The Internet of Things is tied together with a thin strand that is known as time. Coincidentally, at the core of nearly all data analytics is a timestamp. When working with time series data there are a few core principles that everyone should consider, especially across datasets where time is the common boundary. In his session at Internet of @ThingsExpo, Jim Scott, Director of Enterprise Strategy & Architecture at MapR Technologies, discussed single-value, geo-spatial, and log time series data. By focusing on enterprise applications and the data center, he will use OpenTSDB as an example t...
    All major researchers estimate there will be tens of billions devices - computers, smartphones, tablets, and sensors - connected to the Internet by 2020. This number will continue to grow at a rapid pace for the next several decades. With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo, June 9-11, 2015, at the Javits Center in New York City. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be
    We are reaching the end of the beginning with WebRTC, and real systems using this technology have begun to appear. One challenge that faces every WebRTC deployment (in some form or another) is identity management. For example, if you have an existing service – possibly built on a variety of different PaaS/SaaS offerings – and you want to add real-time communications you are faced with a challenge relating to user management, authentication, authorization, and validation. Service providers will want to use their existing identities, but these will have credentials already that are (hopefully) i...
    SYS-CON Events announced today that MetraTech, now part of Ericsson, 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. Ericsson is the driving force behind the Networked Society- a world leader in communications infrastructure, software and services. Some 40% of the world’s mobile traffic runs through networks Ericsson has supplied, serving more than 2.5 billion subscribers.
    Scott Jenson leads a project called The Physical Web within the Chrome team at Google. Project members are working to take the scalability and openness of the web and use it to talk to the exponentially exploding range of smart devices. Nearly every company today working on the IoT comes up with the same basic solution: use my server and you'll be fine. But if we really believe there will be trillions of these devices, that just can't scale. We need a system that is open a scalable and by using the URL as a basic building block, we open this up and get the same resilience that the web enjoys.
    Thanks to widespread Internet adoption and more than 10 billion connected devices around the world, companies became more excited than ever about the Internet of Things in 2014. Add in the hype around Google Glass and the Nest Thermostat, and nearly every business, including those from traditionally low-tech industries, wanted in. But despite the buzz, some very real business questions emerged – mainly, not if a device can be connected, or even when, but why? Why does connecting to the cloud create greater value for the user? Why do connected features improve the overall experience? And why do...
    SYS-CON Events announced today that O'Reilly Media has been named “Media 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 City, NY. O'Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O'Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying "faint signals" from the alpha geeks who are creating the future. An active participa...
    Imagine a world where targeting, attribution, and analytics are just as intrinsic to the physical world as they currently are to display advertising. Advances in technologies and changes in consumer behavior have opened the door to a whole new category of personalized marketing experience based on direct interactions with products. The products themselves now have a voice. What will they say? Who will control it? And what does it take for brands to win in this new world? In his session at @ThingsExpo, Zack Bennett, Vice President of Customer Success at EVRYTHNG, will answer these questions a...