Timing events in Java???

Hi Guys,
im making a game and would like to time the duration of the whole game plus have another timer running so i can record how long the user takes to respond to certain actions.
Ive looked on google but all i can find is the timer package to pause a thread which is not what i need...
Thanks for your help

Do you have any design for your game?
My advise is:
You have 4 players, you shoulde assign one thread for each one.
For a thread you could sample the start and finish time using
System.currentTimeMillis() and two variable int star, int stop
For example when the thread starts call the method
start = System.currentTimeMillis()
and and when the player put an answer
stop= System.currentTimeMillis()
So stop-start is the wait time for the reply by player.
When you want turn a thread (for me one thread=one player) you should use a scheduling algorithm like Round Robin with a time Slice.
For example one player exsaust its time and you display the message "time is over" -> the algorithm turn to the second and so on.
I don't know if Java implements some scheduling algorithm.
Bye

Similar Messages

  • How to create timed events in java? Urgent for student project

    Hi all, its my first post so forgive me if it doesn't follow the normal standards!
    I'm doing a project which involves creating a game where things appear and disappear on the screen by calling up the relevant methods. Its one step away from being complete but the only problem is that I don't know how to make it so that all the appearing and disappearing happens automatically (via a timer that also terminates the game after 30 seconds of play).
    For the moment, I've programmed it so that every time i click on a button, the relevant actions occur.
    Please could someone help- I'd remember you forever! I've looked everywhere but i can't find anything.
    xxx,
    ruthless ruth!

    thank you so much hunter9000 for that quick response. Only, I'm really dumb! I haven't been using Java for long and that thread is confusing for me.
    I need a knight in shining armour to save my day by creating the variables and methods i need so that I can copy and paste it into my work. The timer needs to be called after clicking on the:
    startGame(); button which then calls the doAnimation(); method
    every 3 or 4 seconds which does all the things i need. It then needs to terminate stop the game after 30 seconds by calling:
    endGame();
    after which it resets itself and only redoes it once the user clicks on startGame() again.
    PLEASE HELP!
    xxx
    Ruthless ruth.

  • Timed Events in Tasks

    Hi,
    I am trying to create a situation where on receipt of an xml event a task is executed
    however if this task is not executed within a certain time then this is notified
    to another user.
    Hence I have a start which is connected to two tasks, one task being the task
    to be executed by the user and the other is a task with a Timed Event action.
    This timed event waits for 1 minute. The two tasks feed into an or gate which
    leads to another task which determines if a time out occurred or not.
    First question is this a sensible approach for time-outs/escalation procedures
    and secondly this crashes with a trace that has things like businessCalendar ejbs
    referenced. My understanding was that if I used the from action with not business
    minutes or business hours then busines calendar would not be invoked.
    Any advice greatly received
    Paul Clements
    PS Appended trace for your information.
    ####<04-Sep-01 16:33:58 BST> <Info> <EJB> <laptopkzapz> <myserver> <ExecuteThread:
    '9' for queue: 'default'> <wlpisystem> <71:0fe20c625849ce19> <010035> <EJB Exception
    during invocation from home: com.bea.wlpi.server.businesscalendar.BusinessCalendarBeanHomeImpl@19c55a
    and primary key: 1 threw exception: java.lang.NullPointerException>
    java.lang.NullPointerException
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarProcessor.addTimeMatrix(BusinessCalendarProcessor.java:133)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarEngine.getProcessor(BusinessCalendarEngine.java:213)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBean.getProcessor(BusinessCalendarBean.java:194)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBean_WebLogic_CMP_RDBMS.getProcessor(BusinessCalendarBean_WebLogic_CMP_RDBMS.java:268)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBeanEOImpl.getProcessor(BusinessCalendarBeanEOImpl.java:270)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.getBusinessCalendarProcessor(WorkflowProcessorBean.java:360)
         at com.bea.wlpi.server.workflow.Timer.dateAdd(Timer.java:133)
         at com.bea.wlpi.evaluator.WLPIFunction.dateAdd(WLPIFunction.java:418)
         at com.bea.wlpi.evaluator.WLPIFunction.evaluate(WLPIFunction.java:123)
         at com.bea.wlpi.evaluator.Function.evaluate(Function.java:94)
         at com.bea.wlpi.evaluator.Expression.evaluate(Expression.java:315)
         at com.bea.wlpi.evaluator.Expression.evaluate(Expression.java:251)
         at com.bea.wlpi.server.workflow.action.ActionTimedEvent.getScheduleTimestamp(ActionTimedEvent.java:207)
         at com.bea.wlpi.server.workflow.action.ActionTimedEvent.execute(ActionTimedEvent.java:120)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.executeActions(WorkflowProcessorBean.java:1060)
         at com.bea.wlpi.server.workflow.Task.executeActions(Task.java:91)
         at com.bea.wlpi.server.workflow.Task.create(Task.java:100)
         at com.bea.wlpi.server.workflow.Workflow.instantiate(Workflow.java:587)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean$1.invoke(WorkflowProcessorBean.java:624)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.performWithErrorHandling(WorkflowProcessorBean.java:1005)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.instantiate(WorkflowProcessorBean.java:620)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBeanImpl.instantiate(WorkflowProcessorBeanImpl.java:289)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBeanEOImpl.instantiate(WorkflowProcessorBeanEOImpl.java:287)
         at com.bea.wlpi.server.eventprocessor.EventTrigger.checkTrigger(EventTrigger.java:121)
         at com.bea.wlpi.server.eventprocessor.EventProcessor.onEvent(EventProcessor.java:144)
         at com.bea.wlpi.server.eventlistener.EventListenerBean.onMessage(EventListenerBean.java:52)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:221)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:175)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1933)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:1892)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.Kernel.execute(Kernel.java:250)
         at weblogic.jms.client.JMSSession.pushEnvelope(JMSSession.java:1779)
         at weblogic.jms.client.JMSCallback.pushEnvelope(JMSCallback.java:69)
         at weblogic.jms.frontend.FESession.execute(FESession.java:1972)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<04-Sep-01 16:33:58 BST> <Error> <WLPI> <laptopkzapz> <myserver> <ExecuteThread:
    '9' for queue: 'default'> <wlpisystem> <74:0fe20c625849ce19> <000000> <<wlpirequest>
    <started>2001-09-04 16:33:57.851</started>
    <requestor>wlpisystem</requestor>
    <templateid>4002</templateid>
    <template-name>workflowFive</template-name>
    <templatedefinitionid>4002</templatedefinitionid>
    <instanceid>5002</instanceid>
    <actions>
    <error time="2001-09-04 16:33:58.592">NullPointerException: An error occurred
    during exception handler processing.
    null</error>
    </actions>
    <completed>2001-09-04 16:33:58.592</completed>
    </wlpirequest>
    >

    Sorted.
    Paul
    "Paul Clements" <[email protected]> wrote:
    >
    Hi,
    I am trying to create a situation where on receipt of an xml event a
    task is executed
    however if this task is not executed within a certain time then this
    is notified
    to another user.
    Hence I have a start which is connected to two tasks, one task being
    the task
    to be executed by the user and the other is a task with a Timed Event
    action.
    This timed event waits for 1 minute. The two tasks feed into an or
    gate which
    leads to another task which determines if a time out occurred or not.
    First question is this a sensible approach for time-outs/escalation procedures
    and secondly this crashes with a trace that has things like businessCalendar
    ejbs
    referenced. My understanding was that if I used the from action with
    not business
    minutes or business hours then busines calendar would not be invoked.
    Any advice greatly received
    Paul Clements
    PS Appended trace for your information.
    ####<04-Sep-01 16:33:58 BST> <Info> <EJB> <laptopkzapz> <myserver> <ExecuteThread:
    '9' for queue: 'default'> <wlpisystem> <71:0fe20c625849ce19> <010035>
    <EJB Exception
    during invocation from home: com.bea.wlpi.server.businesscalendar.BusinessCalendarBeanHomeImpl@19c55a
    and primary key: 1 threw exception: java.lang.NullPointerException>
    java.lang.NullPointerException
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarProcessor.addTimeMatrix(BusinessCalendarProcessor.java:133)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarEngine.getProcessor(BusinessCalendarEngine.java:213)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBean.getProcessor(BusinessCalendarBean.java:194)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBean_WebLogic_CMP_RDBMS.getProcessor(BusinessCalendarBean_WebLogic_CMP_RDBMS.java:268)
         at com.bea.wlpi.server.businesscalendar.BusinessCalendarBeanEOImpl.getProcessor(BusinessCalendarBeanEOImpl.java:270)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.getBusinessCalendarProcessor(WorkflowProcessorBean.java:360)
         at com.bea.wlpi.server.workflow.Timer.dateAdd(Timer.java:133)
         at com.bea.wlpi.evaluator.WLPIFunction.dateAdd(WLPIFunction.java:418)
         at com.bea.wlpi.evaluator.WLPIFunction.evaluate(WLPIFunction.java:123)
         at com.bea.wlpi.evaluator.Function.evaluate(Function.java:94)
         at com.bea.wlpi.evaluator.Expression.evaluate(Expression.java:315)
         at com.bea.wlpi.evaluator.Expression.evaluate(Expression.java:251)
         at com.bea.wlpi.server.workflow.action.ActionTimedEvent.getScheduleTimestamp(ActionTimedEvent.java:207)
         at com.bea.wlpi.server.workflow.action.ActionTimedEvent.execute(ActionTimedEvent.java:120)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.executeActions(WorkflowProcessorBean.java:1060)
         at com.bea.wlpi.server.workflow.Task.executeActions(Task.java:91)
         at com.bea.wlpi.server.workflow.Task.create(Task.java:100)
         at com.bea.wlpi.server.workflow.Workflow.instantiate(Workflow.java:587)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean$1.invoke(WorkflowProcessorBean.java:624)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.performWithErrorHandling(WorkflowProcessorBean.java:1005)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBean.instantiate(WorkflowProcessorBean.java:620)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBeanImpl.instantiate(WorkflowProcessorBeanImpl.java:289)
         at com.bea.wlpi.server.workflowprocessor.WorkflowProcessorBeanEOImpl.instantiate(WorkflowProcessorBeanEOImpl.java:287)
         at com.bea.wlpi.server.eventprocessor.EventTrigger.checkTrigger(EventTrigger.java:121)
         at com.bea.wlpi.server.eventprocessor.EventProcessor.onEvent(EventProcessor.java:144)
         at com.bea.wlpi.server.eventlistener.EventListenerBean.onMessage(EventListenerBean.java:52)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:221)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:175)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1933)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:1892)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.Kernel.execute(Kernel.java:250)
         at weblogic.jms.client.JMSSession.pushEnvelope(JMSSession.java:1779)
         at weblogic.jms.client.JMSCallback.pushEnvelope(JMSCallback.java:69)
         at weblogic.jms.frontend.FESession.execute(FESession.java:1972)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    ####<04-Sep-01 16:33:58 BST> <Error> <WLPI> <laptopkzapz> <myserver>
    <ExecuteThread:
    '9' for queue: 'default'> <wlpisystem> <74:0fe20c625849ce19> <000000>
    <<wlpirequest>
    <started>2001-09-04 16:33:57.851</started>
    <requestor>wlpisystem</requestor>
    <templateid>4002</templateid>
    <template-name>workflowFive</template-name>
    <templatedefinitionid>4002</templatedefinitionid>
    <instanceid>5002</instanceid>
    <actions>
    <error time="2001-09-04 16:33:58.592">NullPointerException: An error
    occurred
    during exception handler processing.
    null</error>
    </actions>
    <completed>2001-09-04 16:33:58.592</completed>
    </wlpirequest>
    >

  • Time zone compatability problem with timed event created on iOS and pushed to Windows7 Outlook calendar for sharing

    Hi, I am in Jerusalem time zone. My Windows7 LAPTOP time zone is set to it (UTC+02:00 Jerusalem). My iPhone5 and iPad are both "Set Automatically" (ON)  to Jerusalem. When I create any new event in my outlook on my Laptop it's generated with the Jerusalem time zone and pushed properly via iCloud to my iPhone and iPad. However when I create a new timed event on either my iPhone or iPad. or even in iCloud calendar (in a browser) the event is pushed to outlook on my Laptop in a "Beirut" time zone. Now that both Jerusalem and Beirut are on the same time zone (UTC + 02:00) it doesn't create any problem (though I prefer to see that the pushed events are indeed in Jerusalem time zone and not Beirut...). However, at and around day time saving change days there are problems of events created on iOS devices or even in iCloud (using browser) and pushed to outlook at the wrong times (1 hour earlier or later, depends on the change direction in Jerusalem time...) with a Beirut time stamp.
    How can I resolve this problem and make sure all timed events, created on iOS devices at a Jerusalem time zone, appear as such after pushed via iCloud to my windows7 Outlook calendatr?  Thanks!

    I also have this issue (iPhone 5).  Outlook needs to be configured properly in that timezone option needs to be selected.  Which is challenging enough.
    However the bigger issue for me is that when I open the ICN file:
    1.  I have no way to accept decline etc.
    2.  When the event is populating the calendar in the wrong time I can neither cut and paste nor select and move.  It is totally static.
    So for every meeting request I have to ensure it populates the right time as per my time zone. and if it doesnt i have to manually enter a second meeting 'X' hours earlier/later depending on which time zone the meeting was generated in.
    I spoke to Apple.  Their solution is make sure Outlook is properly configured.  Fine...but good luck.  I need a work around that is Apple based.  Because this *****.
    They said they would send to the development team.  I am not holding my breath.

  • How can I stop iCal displaying a timed event as an all day event?

    Since updating to Lion and hence to Mountain Lion when I add a timed event in ical which continues past 04.00 the following morning it is displayed as an all day event covering both days. As I work shifts which involve night turns this is very annoying. It does not happen on iCal on my iPad.
    I have tried adjusting settings for start time of day etc to no avail.

    Bruno,
    Welcome to Apple Discussions.
    Are you using any sync software?
    The easiest thing to try is to refresh the the com.apple.iCal.plist file. You will find the com.apple.iCal.plist file in your Macintosh HD/Users/yourusername/Library/Preferences Folder. Quit iCal, drag the com.apple.iCal.plist file to your Desktop, log out/in or restart, and make sure the deletion preference is not checked.
    ;~)

  • Send an event from Java Web Service to BPEL

    Hi,
    I have a requirement where from an Async BPEL service I have to call a Java Web Service. After the completion of its task Java Web Service will fire an event that has to be consumed by the BPEL to initiate further process. Can anybody help me with how to send an event from Java Web Service and at the same time consume it in BPEL?
    Thanks,
    Anuj

    See the following posts for your answer
    http://blogs.oracle.com/soabpm/entry/event_delivery_network_chapter
    http://blogs.oracle.com/soabpm/entry/using_the_event_api_to_publish
    http://guidoschmutz.wordpress.com/2010/01/12/using-the-event-api-to-publish-an-event-to-the-event-delivery-network-edn-the-spring-way/

  • CPU Time in Top 5 Timed Events

    Hi,
    We have a 2 node RAC database(10.2.0.3) on Solaris 10.
    There is performance issue with CMRO application R12.
    In database I see CPU time consistently as the top wait event in the Top 5 Timed Events.
    This is mostl followed by db file sequential read.
    For one of the days:
    Top 5 Timed Events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    CPU time 8,383 82.8
    db file sequential read 173,417 838 5 8.3 User I/O
    SQL*Net break/reset to client 26,015 651 25 6.4 Application
    enq: TX - row lock contention 1,063 356 335 3.5 Application
    gcs log flush sync 37,747 88 2 .9 Other
    For other day:
    Top 5 Timed Events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    CPU time 25,286 62.0
    db file sequential read 2,644,332 8,267 3 20.3 User I/O
    gc buffer busy 1,358,725 3,830 3 9.4 Cluster
    read by other session 438,494 1,169 3 2.9 User I/O
    SQL*Net more data to client 19,423 879 45 2.2 Network
    Any idea of the of the bottleneck?
    Thanks

    8 CPUs, load average 4, runqueue 0 and usage 30-35%
    Does this indicate any issue with system resourcesNO. Not at all.
    However a poor schema design or inefficient SQL execution can mean that a query that should do 100 'consistent gets' is doing 10,000 'consistent gets' -- in the buffer cache, consuming CPU and not waiting for I/O. This is a scenario where you have idle CPU but CPU usage is inefficient. (Thus, for example, adding more CPUs will not help your users at all).
    So you should look at the queries and see if queries can be improved.
    If, on the other hand, users are not complaining of performance and all response times are within expectations, than you have no issue at all.
    Hemant K Chitale

  • ICal doesn't subscribe to timed events and doesn't refresh

    In our office we each have a calendar which each person publishes on .Mac, and which others in the office subscribe to. We're experiencing the following problems:
    -- "Refresh all" on some machines doesn't refresh calendars; each must be refreshed individually;
    -- On some machines, all-day events appear, but timed events do not
    -- In some cases calendars won't refresh properly; they display old information and don't update, even when manually refreshed. The calendar must be deleted and re-subscribed to on the subscribing machine. Sometimes even this doesn't work and has to be done repeatedly before the calendar is up to date.
    We have a mix of iBooks, iMacs (from G4 to Intel), MacBook, PowerBook, and G5; running OS X 10.3 through 10.4. Could the mix of OS versions be the problem? Or should we use another server than .Mac to publish/subscribe to?

    lilkirk87,
    It probably means that you do not have "Calendars" selected in iPhone>Settings>iCloud.

  • Exception occurred during event dispatching:java.lang.NoSuchMethodError

    Hello,
    We have upgraded to the latest Oracle Application Server version 10.1.2.3.0 and the webutil version is 1.0.6.
    But we face the following error while accessing the web link. Following message captured from Java Console.
    Please suggest if you have any solutions/idea about this error. Thanks !
    Oracle JInitiator: Version 1.3.1.22
    Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM
    Maximum size: 50 MB
    Compression level: 0----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Downloading http://si02938.in.irt.com:7778/forms/java/frmall_jinit.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/frmwebutil.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/jacob.jar to JAR cacheDownloading http://si02938.in.irt.com:7778/forms/java/FileInformation.jar to JAR cacheDownloading cacheproxyHost=nullproxyPort=0connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.3
    Exception occurred during event dispatching:java.lang.NoSuchMethodError     at oracle.forms.webutil.common.VBeanCommon.init(VBeanCommon.java:281)     at oracle.forms.handler.UICommon.instantiate(Unknown Source)     at oracle.forms.handler.UICommon.onCreate(Unknown Source)     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)     at oracle.forms.engine.Runform.processMessage(Unknown Source)     at oracle.forms.engine.Runform.processSet(Unknown Source)     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)     at oracle.forms.engine.Runform.onMessage(Unknown Source)     at oracle.forms.engine.Runform.processEventEnd(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)     at java.awt.Component.dispatchEventImpl(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.run(Unknown Source)
    Edited by: user12233243 on Nov 16, 2009 10:28 PM
    Edited by: user12233243 on Nov 16, 2009 10:29 PM

    hi
    read the following configuration i hope it will help u.
    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
    and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
    [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
    cd [JacobStage]
    copy jacob.jar [OraHome]\forms\java\.
    copy jacob.dll [OraHome]\forms\webutil\.
    The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
    Open a DOS command prompt.
    Add [OraHome]\jdk\bin to the PATH:
    set PATH=[OraHome]\jdk\bin;%PATH%
    Sign the files, and check the output for success:
    [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
    [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
    you may skip this step. Otherwise,
    Create a schema to hold the WebUtil stored code, and privileges needed to
    connect and create a stored package. Schema name "WEBUTIL" is recommended
    for no reason other than consistency over the user base.
    Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
    out the EXIT statement, to be able to see whether the objects were created witout
    errors.
    Start SQL*Plus as SYSTEM, and issue:
    CREATE USER webutil IDENTIFIED BY [password]
    DEFAULT TABLESPACE users
    TEMPORARY TABLESPACE temp;
    GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
    CONNECT webutil/[password]@[connectstring]
    @[OraHome]\forms\create_webutil_db.sql
    -- Inspect SQL*Plus output for errors, and then
    CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
    Reconnect as SYSTEM, and issue:
    grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
    to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
    Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
    It is important to generate the PLX, to avoid the FRM-40039 discussed in
    Note 303682.1
    If the PLX is not generated, the Webutil.pll library would have to be attached with
    full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
    Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
    There is no need to Subclass the WebutilConfig object.
    Attach the Webutil.pll Library, and remove the path.
    Add an ON-LOGON trigger with the code
    NULL;
    to avoid having to connect to an RDBMS (optional).
    Create a new button on a new canvas, with the code
    show_webutil_information (TRUE);
    in a WHEN-BUTTON-PRESSED trigger.
    Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
    the "Application Server URL" is empty.
    Then append "?config=webutil" at the end, so you end up with a URL of the form
    http://server:port/forms/frmservlet?config=webutil
    10) Run your form.
    If its Correct/Helpful please mark it thanks.
    Sarah

  • StatsPack Report Top 5 Timed Events

    Here is my StatsPack report , The 1st one is base line, Performance looks nice here , but in 2nd and 3rd its not good. Need suggestion , what this reprot mean. and what should i do next.
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
    Buffer Cache: 1,920M Std Block Size: 16K
    Shared Pool Size: 304M Log Buffer: 20,480K
    Performance is good here
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    enqueue 15,551 25,630 41.78
    db file sequential read 1,281,988 10,205 16.64
    CPU time 7,781 12.68
    log file sync 325,921 6,482 10.57
    buffer busy waits 199,959 2,591 4.22
    Performance is not good here
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    db file sequential read 1,180,605 10,883 23.99
    CPU time 8,012 17.66
    log file sync 365,098 7,788 17.17
    enqueue 8,906 6,413 14.13
    db file scattered read 137,606 2,930 6.46
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    enqueue 14,413 18,029 27.04
    db file sequential read 1,281,801 12,383 18.57
    CPU time 10,002 15.00
    log file sync 356,982 8,488 12.73
    row cache lock 1,765 3,510 5.27

    >
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    > enqueue 14,413 18,029 27.04> db file sequential read 1,281,801 12,383 18.57
    CPU time 10,002 15.00
    log file sync 356,982 8,488 12.73
    > row cache lock 1,765 3,510 5.27
    buffer busy waits 199,959 2,591 4.22
    Look into these events, enqueue, row cache lock, buffer busy wait
    select * from V$ENQUEUE_STAT
    to find out which enqueue the database has been waiting on.
    The three events could be related.
    Most likely you have one/some hot objects that a lot queries updating on at the same time.
    also check
    v$session_wait
    when you have the performance issue to find out the hot objects.

  • Difference between wait event and timed event

    Hi,
    Anyone has idea that what is the difference between wait events and timed events in Statspack report. I couldn't find it over google.
    Thanks.

    It's 10.2.0.1 on Linux
    (Couldn't do a query, because Linux is inside VM Ware. And it is not being accessed from Base windows machine.)
    Top 5 Timed Events                                                    Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time
    db file scattered read 9,750,617 34,611 4 44.7
    CPU time 14,248 18.4
    read by other session 1,532,282 8,984 6 11.6
    db file sequential read 4,514,494 5,588 1 7.2
    latch: cache buffers lru chain 277,245 4,823 17 6.2
    Wait Events  DB/Inst: ABCD/ABCD  Snaps: 1-2
    -> s - second, cs - centisecond, ms - millisecond, us - microsecond
    -> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by Total Wait Time desc, Waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    db file scattered read 9,750,617 0 34,611 4 24.2
    read by other session 1,532,282 0 8,984 6 3.8
    db file sequential read 4,514,494 0 5,588 1 11.2
    latch: cache buffers lru chain 277,245 0 4,823 17 0.7
    latch free 121,466 0 3,291 27 0.3
    ----------------------------------------------------------------------------------------------------

  • Exception occurred during event dispatching:java.security.AccessControlExce

    Hi,
    I' m getting an error while connecting to database ORACLE 9i.
    I'm using JDK 1.6.0
    Actually the code is about how an Japplet connects to database ORACLE 9i
    when i was connecting using normal program i had got the connection easily .
    When i used this JApplet ,i'm getting this error.
    CODE:
    import java.awt.*;
    import javax.swing.* ;
    import java.sql.*;
    import java.awt.event.*;
    import java.util.*;
    /*<applet code="jln" width=400 height=400></applet>*/
    public class jln extends JApplet
    public void init()
    JTabbedPane jtp=new JTabbedPane();
    jtp.addTab("View Marks",new VmPanel());
    getContentPane().add(jtp);
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    } catch (Exception e)
    {              e.printStackTrace();
    System.out.println("Failed to load driver.");
    class VmPanel extends JPanel implements ActionListener
    JButton b1,b2;
    TextArea ta1;
    JTextField jtf1;
    Connection con=null;
    public VmPanel()
    b1=new JButton("ok!");
    b2=new JButton("clear");
    ta1=new TextArea();
    jtf1=new JTextField(10);
    add(jtf1);
    add(b1);
    add(b2);
    add(ta1);
    b1.addActionListener(this);
    b2.addActionListener(this);
    public void actionPerformed(ActionEvent ae)
    String str1=ae.getActionCommand();
    if(str1=="ok!")
    try
    con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:jlngbldb", "scott", "tiger");
    Statement stmt = con.createStatement ();
    String ht=jtf1.getText();
    System.out.println("\nHello\n");
    ResultSet rs = stmt.executeQuery("SELECT * FROM jln WHERE ht='"+ht+"'");
    while(rs.next())
    ta1.setText ("");
    ta1.setText("Name:"+rs.getObject("name")+"HallTicket:"+rs.getObject("ht")+"C.G:"+rs.getObject("cg")+"C.D:"+rs.getObject("cd")+"UNIX:"+rs.getObject("unix")+" S.T.M:"+rs.getObject("stm")+"N.N:"+rs.getObject("nn")+"I.S:"+rs.getObject("ins"));
    rs.close();
    stmt.close();
    con.close();
    catch(SQLException ex)
    System.err.println("SQLException: " + ex.getMessage());
    if(str1=="clear")
    ta1.setText("");
    jtf1.setText("");
    if(str1==null)
    ta1.setText ("");
    ta1.setText("Please enter Hall Ticket Number above....");
    }//action performed close
    }//panel closed
    AND THE ERROR IS:
    Exception occurred during event dispatching:
    java.security.AccessControlException: access denied (java.util.PropertyPermissio
    n oracle.jserver.version read)
    at java.security.AccessControlContext.checkPermission (AccessControlConte
    xt.java:321)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
    85)
    at java.lang.System.getProperty(System.java:627)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:433)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(DriverManager.java:548)
    at java.sql.DriverManager.getConnection(DriverManager.java :180)
    at VmPanel.actionPerformed(jln.java:60)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
    63)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2183)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonL
    istener.java:234)
    at java.awt.Component.processMouseEvent(Component.java:5921)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3316)
    at java.awt.Component.processEvent (Component.java:5686)
    at java.awt.Container.processEvent(Container.java:1960)
    at java.awt.Component.dispatchEventImpl(Component.java:4360)
    at java.awt.Container.dispatchEventImpl(Container.java :2018)
    at java.awt.Component.dispatchEvent(Component.java:4194)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4222
    at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3886)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3816)
    at java.awt.Container.dispatchEventImpl(Container.java:2004)
    at java.awt.Component.dispatchEvent (Component.java:4194)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:592)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:270)
    at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.
    java:198)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:171)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)
    I'm getting this error when i pressed the OK! JButton.
    PLEASE ! help me by correcting this error.
    Thank You.

    Presumably you are running this via a browser where the applet is served from the server.
    Applets can only connect back to the origination server and using the name that the origination server was accessed with.
    And that has nothing to do with JDBC, all connections work that way.
    Your driver uses a connection thus it will not work unless it attempts to connect to the server that originated the applet.
    Solutions
    1. Connect to the server
    2. Sign the applet
    3. Modify the policy file of each client that will run the applet. This is not a good idea in an unsecure network.
    Note as well that in an unsecure network is most often a bad policy to have an applet directly accessing a database regardless.

  • Non-gui/swing event in java possible ?

    Dear Members :
    Is it possible in java to raise and catch business events, as is possible in other languages, I know.
    For instance - when I create a vehicle instance, that will trigger an event which will add that vehicle to vehicle_list(List) - something like that ? I am aware of Observer/Observable, but that is only if the source changes.
    Could someone please explain with syntax if that's possible, I mean, tackling any kind of business events in java ?
    Thanks in advance
    Atanu

    There is no out of the box event model... and be careful how you phrase these things... and in you are pedantic enough the pattern reveals itself.
    What notifies the sales people that a new car is ready? It's not the Car itself is it? How about the factory? You're getting warmer... Who else does the factory tell? Maybe the tax man?
    Yeah... Observe/r/able was a good first thought.
    And... You might want to look into the Spring framework... I think you're groping for AOP.
    Cheers. Keith.

  • How to handle doubleclick mouse event in java

    i want to handle double click mouse event in java
    i use getClickCount() function
    but i want that on onetime click show othere windows
    and on doubleclick show diif. window
    but problem is that onetime is occuer always if u click doubleclick

    Maybe post some code so we can see what, if anything, you are doing wrong.
    Examing the results of a call to getClickCount() is the correct way to detect a double click.

  • Events in java..

    1) how many types of events in java ?
    2) which is the super class of all the event classes?
    3) information about an event is stored in an instance of a subclass of an_______?
    4) who sends events to java?

    WAQAR_NAWAZ wrote:
    1) how many types of events in java ?
    2) which is the super class of all the event classes?
    3) information about an event is stored in an instance of a subclass of an_______?
    4) who sends events to java?God forgive.

Maybe you are looking for

  • G4 powerbook can´t activate back to my mac function

    With my g4 powerbook I can connect to mobileme but when I try to activate the back to my mac function i am told that there are connection problems. Thos causes that I can´t use the back to my mac function. Do you have any ideas? Thank you in advance!

  • Application Storage Issue

    Hello, A̶̲̥̅♏ having issue with my device being slow because the application storage memory ΐƨ almost full, i tried moving my apps to my media card but couldn't do that. ΐƨ there anyway this can be done? Please help .

  • ALV Grid OO Error

    Hi Guys, When i am executing the program for ALV grid using OO concepts i got thisn type of error "Short text Access via 'NULL' object reference not possible. What happened? Error in the ABAP Application Program The current ABAP program "Z_TEST_PGM"

  • Nokia - Firmware over the net and over the air gen...

    Don't know if anyone else noticed this, it came out quietly as far as I can see, but now nokia are offering firmware upgrades to N series devices over the net (and over the air if you've an N80). See here http://www.nokia.co.uk/nokia/0,1522,,00.html?

  • Validation on GR Printing

    Dear All We have develop one Z Report to take a Print out of Goods Receipt Note, where we have mentioned a colums of Excise Invoice Document Number and its date now, i want to restrict or validate that if material is excisable then if after making of