Recording UI performance of Applet on a webpage - swing

I have created an applet which is a java swing based messenger which runs fine on browsers. Now i have to host this applet on a webpage and allow users to test my applet. I need to record time they take for each task using the messenger and and the errors they commit. After the study is complete the user has to be displayed the time and the no of errors.
I am not able to figure out how to record times for each task that the user has to do in my messenger application. one way would be to record time on click of right buttons I can do it programmatically in Java Swing for correct click on buttons, but how do i send this info to HTML Page from an applet.
I don't have any clue how i would capture errors.
Suggestions needed

For storing exception and the info you can use a Logger.
From doc,
A Logger object is used to log messages for a specific system or application component.
So when you get any exception write it to the Logger file. It has all the set of required methods to log the information.
Example:
When you are entering a method use Logger.entering to log the method entry. Similarly you have to write all the actions using respective methods provided by Logger class which may either be message or exceptions or errors which ever you want to show to the user through this log file.
P.S: We use it in our application and it is very handy.

Related

SSIS event handler script task

i have a package that has several event handlers that execute a script task on failure when the package fails.. Problem is its generating a email that i have NO IDEA how.. When the package fails it executes a stored procedure that grabs the email distribution list from a SQL table and sends an email. However one email is being sent out to ppl who are not with the company and ive been told twice to change the DL list.. I checked the SQL table and the people that are getting the email are not listed any where in the distribution list.. Is there any way to search anywhere in the package to find out how the email is being generated. Ive spent hours and hours going through the scrip tasks and the code is no where to be found
You can use the package explorer (to the right of the event handler tab) to navigate through the entire package and look at the event handlers for every executable. It's possible that there are multiple event handlers, one at the package level and maybe one defined on a particular task, which is hardcoded with email addresses.
You can also, right click on the package in the solution explorer and select View Code. This will open the package in xml, which you can then use ctrl+F to find a certain string.
Advice Section
While you didn't ask for it, please let me add a few words of guidance. Event handlers are evil for this very reason. They are a hidden GOTO that you are lucky to notice at all, even if you've developed the package in the first place.
If event handling is required, use the precedence constraints in the control flow. Throw everything in a container, connect it to the script task and define the constraint to trigger on failure.
To go one step further, keep your emails out of your ssis packages. Use SQL agent or whatever scheduler you are using to post messages about failures.

Application_Launching timing

What exactly is the timing/thread of the Application_Launching method on WP8? Specifically, in relation to the UI loading/rendering sequence?
I have an app where some global init is being done within Application_Launching. I'm getting a crash report from a method that's called during data binding on the start page's XAML; the crash is consistent with said global init not taking place.
EDIT: I'm calling a native (C++) method which is reading a file into a mallocated memory block in a global variable that's initialized to null. Said variable is dumped as a part of crash reporting; I've got a report where it's null.
Pasting the code would be rather pointless IMHO.
When starting the app, the Launching event is raised. However, the app can later be put in a dormant state, in a process that is called "tombstoning". When a tombstoned app is resumed, it won't raise the Launching event but the Activated event instead. It's very likely that you forgot to handle that case.
To test it easily, go in the properties of your Windows Phone project, in the Debug tab, and check the "Tombstone upon deactivation while debugging" option. From there, every time the app is deactivated while the debugger is attached (typically, when pressing the home button on the emulator), the app will be tombstoned, and you can make sure that it resumes properly when switching back to it.
I've got another theory. It's not about the library being loaded at the wrong time, it's about the library being unloaded. Since almost all of my native functions are static and the state is global, there are no active native objects, and the COM subsystem has a zero ref count on the module. As per COM rules, modules like that are fair game for unloading anytime. On a subsequent native function call, the library is reloaded, but the global state is gone.
From the next version, I'll keep one live native object for the app's lifetime. We'll see if the crash comes back.

In a webapp GUI builder throws error message

I have a very complex user interface constructed using the GUI builder.
All was working as promised until I added 8 more severside functions to the code.
In the GUI Builder (when I try to attach these new functions to mouse up, The GUI Builder announces "An Unexpected Error occured" in a pink stripe across the top of the script editor.
When I clear the error, the project appears to be OK and I can save and run the application.
If I go to any previously object that triggers a server side handler and attempt to change it I get the same error.
It is my suspicion that the failure happens when the GUI builder tries to load the list of available functions from the code source. My code is running upwards of 50 Gscript functions.
If there are some limits on what the GUI Builder can handle it would be really nice to have those documented. Also a more meaningful error message would be nice.
I assume that I can still add/attach these handlers in the code base (outside of GUI Builder)?
This error message comes up when you try to getElementById using an Id that doesn't exist. Please check all the widget Ids in your GUI.I'm pretty sure your issue is not related to some systemic limitation, I've made some complex UIs with the GUI builder without issue.
you d better use a full scripted apps instead of GUI..I gave up with GUI since there is some strange stuff..as ID managment, name managment, radio button (bug as well in normal scripting..^^)..GUI is a black box for me..just try to make your app with vertical horizontal or xy panel...and you will be able to know who do wa and when... with the logger

Suggestions for developing WebInterface (using Tomcat)?

I am working with TS-7500 (ARM 9) board running Debian Linux (Linux ts7500 2.6.24.4). It is connected to a couple of sensors and is running driver code to talk to these sensors.
Every time the C program starts, it reads a couple of config-parameters from a config-file and starts sensors with those values.
So the task at hand is : presenting a web interface to show/edit these config-parameters to user. The task of the web interface can be summarized in four steps :
Read config-parameters from the config-file and show the current configuration
Allow user to change the configuration
Capture and save the changes to same config-file
These config-parameters could be presented as drop-down menu items or radio-buttons. And I have a linux background script which restarts the C prg when config-file is modified.
I know TS-7500 runs Tomcat. Now please suggest a good way to handle this problem. I have heard about using Servlet and JSPs (am not very familiar with those actually). Which one of them is suitable to generate HTML pages dynamically ? (as I see everytime I need to generate a new HTML page by selecting the current configuration while displaying the page).
Sorry for being very elaborate !
EDIT : Beeps ! No reply ? Come on guyz, is the question not clear ? Or no one has ever faced a similar problem (design problem) ??
The solution would be to use a PHP in addition with Apache web server ! PHP script could be used to
Read the config file and capturing the parameters
Generate a HTML form (by pre-selecting the dropdown menus and radio buttons from the already read parameters)
And capturing the new edits and saving them to config file.
PHP script must be placed in /var/www/ directory of the embedded board. Then from any system, it could be accessed just by keying the IP address of the board and the script name using a simple web browser.

retriving the buildNumber of a new build remotely through xml apis

To fire build on a hudson remotely i use the folloing url.
http://machinename:port/job/jobname/buildwithparamaeters?paramnam=value&paramname2=value2
Now after firing this url i want to retrieve the build Number that was generated for this specific build?
How can i retrive it remotely through xml apis?
You can get the next build number before you start the build (http://server/job/api/xml) but this of course not realiable, cause before you start a build you can't be anyone else will start that build. Furthermore you can get the lastBuild number by the entry. But i'm not sure under which circumstances this give the correct number, cause you have to be aware of the currentBuild flag as far as i know.