Patent ID: 7024668
Filing Date: 2006-04-04
Classification: G06F

Abstract:
1. An application execution apparatus including a plurality of devices, a Java middleware unit, and an OS (Operating System) unit which provides resources to applications, comprising a storing unit for storing a plurality of applications, wherein the Java middleware unit includes: application executing means for reading the plurality of applications in the storing unit and executing the plurality of applications; first table holding means for holding a first table which shows a correspondence between applications, tasks corresponding to the applications, and treads which make up each task; first table renewing means for, when a thread is generated in response to a request from an application being executed, adding a correspondence between the generated thread, the application, and a task generated for the application to the first table to thereby renew the first table; and notifying means for, upon receiving an instruction to complete the application, notifying the OS unit of a task corresponding the application, based on the first table, and the OS unit includes: task generating means for generating the task for executing the application; thread generating means for generating treads which make up the task generated by the task generating means; controlling means for executing the generated threads to execute program codes of the application, providing a device to the application as a resource in accordance with a request from the application, and registering a correspondence between the provided resource and the task to which the threads belong, in a second table showing a correspondence between provided resources and tasks corresponding to generated threads in the first table; and collecting means for specifying the resource corresponding to the task notified by the notifying means based on the second table, and collecting the specified resource, wherein the Java middleware unit further includes: requesting means for requesting to notify the application which is being executed, of a change of a status of a device; status change notifying means for notifying the application of the change, upon detecting the change; wherein the requesting means requests the status change notifying means to call a listener which waits to be informed of the change; and the status change notifying means makes the notification by calling the listener, upon detecting the change; wherein the status change notifying means generates a special thread for calling the listener, and calls the listener by executing the special thread; second table holding means for holding a table showing a correspondence between listeners, special threads, and applications; and table renewing means for referencing the table in the second table holding means when the requesting means requests the status change notifying means to call the listener, judging whether the application corresponding to the listener is shown in the table, and adding the listener to the table in correspondence with the application if the application is shown in the table, wherein the status change notifying means does not generate the special thread if the table renewing means judges that the application is shown in the table, and generates the special thread if the table renewing means judges that the application is not shown in the table.