cancel
Showing results for 
Search instead for 
Did you mean: 

Run WebDynpro in Batch Mode from UNIX

Former Member
0 Kudos

Hi

I'm running NW2004 SP14. I need to run a WebDynpro application in batch mode on a UNIX server. Typically, I run JAVA programs in Batch mode from the UNIX command line (java -jar myApp.jar).

Is this possible to run a WebDynpro in batch mode?

Thanks,

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

More clarfication of what I need...

I'm looking for a way that command line statements in a UNIX script can invoke my WebDynpro application.

The reason I need this is that I need for my Scheduling tool to be able to kick off the WebDynpro application using a script file. The job will run twice each day in concert with our complete batch schedule.

Thanks,

Kevin

Former Member
0 Kudos

Kevin,

Probably there is some misundertsnading.

WD is UI presentation technology and invoking UI as "batch script" sounds... well... non-ordinary at least

You might take a look at other J2EE technology available within SAP WebAS: JMX, servlets, JMS, JRA.

As example: consider a servlet end-point that posts messages to JMS queue. Next, some of your MDB-s (Message-Driven Bean-s) peeks up a message end process it. Now UNIX script file may just send HTTP request at regular interval to your servlet.

As another example: consider JMX bean that uses JMX Timer server and implements scheduling on its own. Then it either can just call another JMX bean, or EJB, or POJO JavaBean, or, again, JMS to submit processing request (JMS option is necessary if processing time is less or comparable to minimal schedule intervals). No UNIX script is not necessary at all. Cron is not that complex, it could be done with J2EE stack

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery.

Thank you for your insight.

I need to link and unlink a portal group to a portal role twice each day. In my WebDynpro, I am using the UMFactory and IRoleFactory classes to accomplish this. When deployed as a WebDynpro, I encountered no difficulty with integration with the portal. The statement <b>UMFactory.getRoleFactory(</b>) provides a convenient handle to the portal roles, etc.

However, I need to run this code twice each day, and it definitely needs to be automated. So I began to move my WebDynpro code to the main method of a straight JAVA application--so that I could run the code in batch or background mode. The problem is that integration with the portal is lost. The same statement now returns an error that UMFactory needs to be intiialized.

If not possible to run WebDynpro in batch mode, my next avenue is to figure out how to integrate a straight java application with the portal such that the application has similar integration with the portal. Any ideas on this?

Thanks,

Kevin

Former Member
0 Kudos

Kevin,

The problem with stand-alone Java application is that it uses own UMFactory that is disconnected from one used by portal and running on SAP WebAS.

Try either of the following:

1. Servlet with UME-related code that is deployed to WebAS running portal. Then just invoke servlet from outside (send HTTP request)

2. Stateless session bean with UME-related code that is deployed to WebAS. Then from stand-alone Java application invoke this session bean.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Answers (0)