cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment takes long time

Former Member
0 Kudos

Hi All,

I have a WDJ app, where i have called a java method to execute a system commant "cmd /c nbtstat -a ipadd" . It takes 10 mins to get deployed on the server.PLease advice how the response time can be reduced.

Regards

Ishita

Accepted Solutions (1)

Accepted Solutions (1)

srinivas_sistu
Active Contributor
0 Kudos

Hi,

While deploying you code , server dont run the code what you wrote inside you program, what it will do is it just builds your code and checks for any build time errors. So when you say deploying is taking time means

there might be 2 causes.

1. May be you have a very huge amount of UI or java code is there to build you application and deploy.

2. If you are deploying through SDM, please ask you basis guy to remove the unwanted .ear temp files in the server.

This delay in deployment happened with me also. In my case my webdynpro project had 10 applications with around 40 views. So it used to take 3 to 10 mins.

Regards,

SrinivaS

Answers (2)

Answers (2)

former_member185086
Active Contributor
0 Kudos

Hi

Some point form my side

1.You have called that method at wdDoinit() of Component Controller .please avoid this by create a method at CC and call it at point where actually it require (Reason is let our presentation come first then only Business logic and its control , most of the cases which I found is initialize the UI logic at CC is OK and I prefer this unless & until it require).

2. If java code is big enough then create one java class at directory and use the method .

Hope it help you to resolve the issue.

Best Regards

Satish Kumar

Former Member
0 Kudos

Hi All,

Thank You very much for your answers.I think the issue was with the server.No action was required from my side . Now its working fine.

Regards

Ishita

Edited by: Ishita Shah on Oct 23, 2009 9:45 AM

Edited by: Ishita Shah on Oct 23, 2009 10:37 AM

former_member185086
Active Contributor
0 Kudos

Hi

Plz put the code specific ot that java method.

BR

Satish Kumar

Former Member
0 Kudos

HI

This is the code from where i call the java code from the controller wdDoinit()

IWDRequest req = WDProtocolAdapter.getProtocolAdapter().getRequestObject();

machinename = req.getClientHostAddress();

// wdContext.currentContextElement().setMachname(machinename);

IWDClientUser clientUser = WDClientUser.getLoggedInClientUser();

String username="" ;

username = GetInfo.userinfo(machinename); // Java method called to execute the command

mgr.reportSuccess("Hostname :"+ username);

mgr.reportSuccess("IP :"+ machinename);

This the Java code

package user_pwd_comp;

import java.io.BufferedReader;

import java.io.InputStreamReader;

import java.net.InetAddress;

import com.sap.tc.webdynpro.services.sal.adapter.api.IWDRequest;

import com.sap.tc.webdynpro.services.sal.adapter.api.WDProtocolAdapter;

/*

  • Created on Oct 14, 2009

*

  • To change the template for this generated file go to

  • Window>Preferences>Java>Code Generation>Code and Comments

*/

/**

  • @author Ishita.Shah

*

  • To change the template for this generated type comment go to

  • Window>Preferences>Java>Code Generation>Code and Comments

*/

public class GetInfo {

public static void main (String args[]) throws Exception{

String ip = GetInfo.userinfo("192.168.100.229");

System.out.println(ip);

}

public static String userinfo(String ipadd) throws Exception {

InetAddress local = InetAddress.getLocalHost();

String ip = ""+local;

System.out.println(ip);

System.out.println(ipadd);

Runtime rt = Runtime.getRuntime();

ipadd = "cmd /c nbtstat -a " + ipadd;

Process pr = rt.exec(ipadd);

BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));

String line=null;

String result = null;

int i = 0;

while((line=input.readLine()) != null) {

if(i==14)

{

result = line.substring(0,15);

pr.destroy();

}

i++;

}

//int exitVal = pr.waitFor();

//System.out.println("Exited with error code "+exitVal);

return result;

}

}

Regards

Ishita

Edited by: Ishita Shah on Oct 15, 2009 6:09 AM