on 05-31-2007 11:35 AM
Hi,
After creating a SmartSync Project from the merepMeta.xml file i could find .java files and .jsp files
what is the lifecycle of this SmartSync Project...
to be more clear.. What is the sequence of the programs called..
When i click on the Application which is installed on the MI Client which function is called..
Hope u understand the question..otherwise pl lemme know.
Rgds,
Kiran Joshua
Hi Kiran,
The best way too know about this is through degugging.
Do the following :-
Open the Servlet java file of your project.
Find the method "doHandleEvent" and set a break point here.
Next start debugging via path Run -> Debug -> select your project from the list -> Debug.
This will open your MI client in the browser.
Login and click on your application.
This will take you back to the NWDS where you can use the controls F5, F6, F7, F8 to see the sequence of files and Applications called.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
I hope you have followed all the prev steps before this one mentioned by me with the expected results. Tell me a few things here :-
Were you able to set the breakpoint?
After you clicked Run -> Debug -> select your project from the list -> Debug. did it start your MI client in the browser?
If this happened then after logging in and clicking on your application did it take the control back to the netweaver developer studion to the servlet file?
You can use the controls here only after the control is shifted back to the studio.
Probably you can set another breakpoint to any of the statements in the method "doHandleEvent". This might probably help.
Try this and let me know.
You can also refer to this link to learn more on degugging .
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a">Debugging</a>
Cheers.
Hi Saurabh,
>>>Were you able to set the breakpoint?
Yes
>>>did it start your MI client in the browser?
Yes, started but nothing was displayed , it was empty screen
>>>did it take the control back to the netweaver developer studion to the servlet file?
No, bcoz..previos step was not successful
Any suggestions
Regards,
Kiran Joshua
Saurabh,
>>>What is the "Main class" in the "Main" tab?
com.sap.ip.me.mdk.api.runtime.Start
>>>"Program Arguments" in the Arguments tab?
"-home:C:\Program Files\SAP Mobile Infrastructure" -trace -url:COUNTRYLISTMOBAPPMCD/start -app:jsp
>>>"Type of launch configuration" under "Common tab"?
Local
Rgds,
Kiran Joshua
Hi Kiran,
Debugging should be quite simple for small applications.
Refer this Blog: /people/arunkumar.ravi/blog/2006/02/22/execute-debug-your-mi-code-from-nwds
Once your application successfully deployed you can debug your application in two ways.
When you do not want to deploy your application all over again, which is done with the "Automatic" option, you can start your application manually. The MDK plug-in adds a launch configuration with the name of the project when the "Export a project to a .war file" function is performed. Select the Eclipse commands Run > Debug ... and select the "Launch Configuration" of your application. All MI applications can be found in the launch configuration group "MI Application". Press the "Debug" button and your application is started. You do not have to stop the Mobile Infrastructure before you "Run" your application. The Launch configuration uses a class provided by the MDK, that takes care of that.
To bring your application to life you have to activate a browser window, go to the MI Homepage and start your application. The application will stop whenever it hits a breakpoint.
You can customize Eclipse so that the "Run" and "Debug" commands are in the Eclipse toolbar . By clicking onto the symbols, the project launch last is launched again. By clicking onto the drop down symbols you get a list of recently launched projects.
The "Manual" method allows you to change Java code "on the fly", without deployment.
For basic information how to debug with Eclipse and a work around for JSP debugging, see Debugging with Eclipse.
When you have a large application with many methods, the export function can take a while, since it compiles and puts all class files into a .war/.jar file. While you are testing and debugging your application, it is faster to start the application manually ("Run ..." or "Debug ..."). In this case, you start the mobile application directly out of Eclipse using the class files from the Eclipse project. So you save a lot of time by avoiding the packaging and deploying of the application.
Use the export function when you are finished with testing and you need a final .war file.
Regards.
Divya
Hi Kiran,
These settings seem to be fine.
Are you able to run the same application. Kindly check this. path Run -> Run -> select your project from among the configurations and hit Run.
This must again open the MI client in the browser.
If this alos does not work then i suspect there is something wrong in the settings.
Kindly check these things also.
Windows -> Preferences -> SAP J2EE engine
SAP J2EE engine installed on the remote host (should be selected)
Message Server host i think should be the address of the MI middleware.
Message server Port : 3601 (mostly i think)
Windows -> Preferences -> Debug
Default Perspective for Debug - Debug.
Lastly you can also check up with this
Windows -> Preferences -> MDK
I hope you have done the settings here as that mentioned in the MDK docu.
Do the "Test Settings" here.
Cheers.
Saurabh,
All the settings are ok..
i am able to run the application but still..i cudnt run the debug.
apart from this debugging..do i have any other technique to know the flow..
Do i have any response abject which can write..so that i can write some sentences and trace the flow..
Cheers,
Kiran Joshua
Hi Kiran
I am not sure what exactly do you mean by saying Lifecycle of client application. With respect to the sequence of flow JSP application that is installed on the client, there should be atleast one class that extends the AbstractMEHttpServlet API of MI. The class that extends this API will be the first class that is called on the click of the application. Before this class is loaded, MI client will internally load all the data (if any) for the particular application from the client database using the SmartSync and Persistene components. Do let me know if you have any further queries and hope this helps.
Best Regards
Sivakumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Saurabh,
when i am clicking on f5,f6,f7,f8 keys no action is being performed.
before this do i need to set any configuration settings for debugging.
Laxmi,
The thread link provided is helpful and answered my question partly
and i really appreciate the article
Siva,
yepp, u took my question right..after i click on the application, i wanted to know which function is called first ...and the flow after that.
Pl do explain abt the process /flow of the application when the events are triggered.what happens for the first time and wat is the process after triggering the event.
Hope i am bit more clear abt the question
Pl. suggest
Rgds,
Kiran Joshua
Hi Kiran,
please refer to these links. Hope this answers your answer
Best Regrads,
Lakshmi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.