Accessing the WorkArea service

Why and when to perform this task

The WorkArea service provides a JNDI binding to an implementation of the UserWorkArea interface under the name java:comp/websphere/UserWorkArea. Applications that need to access the service can perform a lookup on that JNDI name, as shown in the following code example:

Example

import com.ibm.websphere.workarea.*;
import javax.naming.*;

public class SimpleSampleServlet {
  ...

  InitialContext jndi = null;
  UserWorkArea userWorkArea = null;
  try {
     jndi = new InitialContext();
     userWorkArea = (UserWorkArea)jndi.lookup(
        "java:comp/websphere/UserWorkArea");
  }
  catch (NamingException e) { ... }
}

What to do next

The next step is to use the begin() method to create a new work area and associate it with the calling thread, as described in the topic Beginning a new work area.

Related concepts
WorkArea service - Overview
Related tasks
Managing the work area service



Searchable topic ID:   twa_binding
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/workarea/tasks/twa_binding.html

Library | Support | Terms of Use | Feedback