cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I find the BASELIBS.SCA (need timeout servcie)

Former Member
0 Kudos

I want to use the timeout service and apparently, I need to import the BASELIBS.SCA compartment in my Development Configuration. The problem is that we cannot find this archive/compartment anywhere. Does anybody know where we can find it or alternatively, where we find the timeout service jars and dependants so we can access them from our DCs?

For reference, I found the above information in a post by Valdimir in the forums:

"In the NWDS, in the Development Configurations Perspective you have to import the configuration you want to use (e.g. BasicMS_dev or BasicMS_cons). Then you'll see all the compartments in this configuration, including the BASELIBS compartment, and you'll be able to add tc/je/timeout to the Used DCs of your application DC. When you try to build your DC (or Sync Used DCs), all necessary jars will be downloaded and automatically added to the build path of your project."

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

OK, solved it my own. I simply extracted the timeout.jar from the J2E engine library and added it to my library of developement time jars.

Now, to use the timeout service turned out to be really easy. I simply created a servlet that load on startup and retrieves the TimeouManager through JNDI lookup.

/**

  • @return

*/

private TimeoutManager getTimeoutManager() throws NamingException {

TimeoutManager timeManager = null;

InitialContext ctx = new InitialContext();

final String TIMEOUT_JNDI_NAME = "timeout";

timeManager =

(TimeoutManager) ctx.lookup(TIMEOUT_JNDI_NAME);

return timeManager;

}

You then register jobs as so:

/**

*/

private void scheduleJobsWithTimeoutService() {

try {

TimeoutManager timeManager = getTimeoutManager();

LOG.info("\n -- TimeoutManager: " + timeManager);

timeManager.registerTimeoutListener(new MyTimeoutListener(), 10, 5000);

} catch (Exception e) {

LOG.error(e);

}

}

where MyTimeoutListener implements TimeoutListener

I added a reference to the timeout service in the EAR (application-j2ee-engine.xml) and my WAR DC "uses" the kernel.sda DC...