How to reduce buffer busy waits, session hanging due to buffer busy waits

Hi,
How to reduce buffer busy waits, session hanging due to buffer busy waits.
Thanks,
Sathis.

When I see through enterprise manager I see lot of
tables with buffer busy waits.
Is there any way by table name we can check the
blocks info.
The simple way is to look at the SQL statement and corresponding table name?
P1=file#, P2=block#. You can extract segment name(table or index) using this info.
Query v$bh like following:
SQL> select file#, block#, class#, objd from v$bh where file# = P1 and block# = P2;
SQL> select object_name from all_objects where object_id = <objd>;See following doc:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1051.htm
Or you can dump block:
SQL> alter system dump datafie <P1> block <P2>;Some excerpts from block dump:
scn: 0x07df.17e70782 seq: 0x01 flg: 0x04 tail: 0x07822301
frmt: 0x02 chkval: 0x61d0 type: 0x23=PAGETABLE SEGMENT HEADER
Map Header:: next  0x00000000  #extents: 1    obj#: 55881  flag: 0x10000000>
Can we do something at table level that will reduce
the waits.
Yes, some methods are known. But before thinking of that, you must verify which block class and which access are involved.
Typo... always. :(
Message was edited by:
Dion_Cho

Similar Messages

  • How to reduce redo space wait

    os:x86_64 x86_64 x86_64 GNU/Linux
    oracle:9.2.0.6
    running : Data guard
    Problem : Redo space wait is very high
    Init.ora paramaeters
    *.background_dump_dest='/u01/app/oracle/admin/PBPR01/bdump'
    *.compatible='9.2.0'
    *.control_files='/s410/oradata/PBPR01/control01.ctl','/s420/oradata/PBPR01/control02.ctl','/s430/oradata/PBPR01/control03.ctl'
    *.core_dump_dest='/u01/app/oracle/admin/PBPR01/cdump'
    *.cursor_space_for_time=true
    *.db_block_size=8192
    *.db_cache_size=576000000
    *.db_domain='cc.com'
    *.db_file_multiblock_read_count=16
    *.db_files=150
    *.db_name='PBPR01'
    *.db_writer_processes=1
    *.dbwr_io_slaves=2
    *.disk_asynch_io=false
    *.fast_start_mttr_target=1800
    *.java_pool_size=10485760
    *.job_queue_processes=5
    *.log_archive_dest_1='LOCATION=/s470/oraarch/PBPR01'
    *.log_archive_dest_3='service=DR_PBPR01 LGWR ASYNC=20480'
    *.log_archive_format='PBPR01_%t_%s.arc'
    *.log_archive_start=true
    *.log_buffer=524288
    *.log_checkpoints_to_alert=true
    *.max_dump_file_size='500000'
    *.object_cache_max_size_percent=20
    *.object_cache_optimal_size=512000
    *.open_cursors=500
    *.optimizer_mode='CHOOSE'
    *.processes=500
    *.pga_aggregate_target=414187520
    *.replication_dependency_tracking=false
    *.undo_management=AUTO
    *.undo_retention=10800
    *.undo_tablespace=UNDOTBS1
    *.undo_suppress_errors=TRUE
    *.session_cached_cursors=20
    *.shared_pool_size=450000000
    *.user_dump_dest='/u01/app/oracle/admin/PBPR01/udump'
    SGA :
    SQL> show sga
    Total System Global Area 1108839248 bytes
    Fixed Size 744272 bytes
    Variable Size 520093696 bytes
    Database Buffers 587202560 bytes
    Redo Buffers 798720 bytes
    SQL>
    I created log groups with 2 memebers each and with size 25 mb.
    Redo space waits shows as
    SQL> SELECT name, value
    FROM v$sysstat
    WHERE name = 'redo log space requests';
    NAME VALUE
    redo log space requests 152797
    this is running between 140000 and 160000
    some of the trace file error
    [oracle@hipclora6b bdump]$ cat PBPR01_lns0_23689.trc
    Dump file /u01/app/oracle/admin/PBPR01/bdump/PBPR01_lns0_23689.trc
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    ORACLE_HOME = /u01/app/oracle/product/9.2.0.6
    System name: Linux
    Node name: hipclora6b.clickipc.hipc.clickcommerce.com
    Release: 2.4.21-37.EL
    Version: #1 SMP Wed Sep 7 13:32:18 EDT 2005
    Machine: x86_64
    Instance name: PBPR01
    Redo thread mounted by this instance: 1
    Oracle process number: 34
    Unix process pid: 23689, image: [email protected]
    *** SESSION ID:(82.51071) 2008-04-14 23:40:04.122
    *** 2008-04-14 23:40:04.122 46512 kcrr.c
    NetServer 0: initializing for LGWR communication
    NetServer 0: connecting to KSR channel
    : success
    NetServer 0: subscribing to KSR channel
    : success
    *** 2008-04-14 23:40:04.162 46559 kcrr.c
    NetServer 0: initialized successfully
    *** 2008-04-14 23:40:04.172 46819 kcrr.c
    NetServer 0: Request to Perform KCRRNSUPIAHM
    NetServer 0: connecting to remote destination DR_PBPR01
    *** 2008-04-14 23:40:04.412 46866 kcrr.c
    NetServer 0: connect status = 0
    A Sample alert Log
    Thread 1 advanced to log sequence 275496
    Current log# 1 seq# 275496 mem# 0: /s420/oradata/PBPR01/redo01a.log
    Current log# 1 seq# 275496 mem# 1: /s420/oradata/PBPR01/redo01b.log
    Tue Apr 15 09:10:03 2008
    ARC0: Evaluating archive log 4 thread 1 sequence 275495
    ARC0: Archive destination LOG_ARCHIVE_DEST_3: Previously completed
    ARC0: Beginning to archive log 4 thread 1 sequence 275495
    Creating archive destination LOG_ARCHIVE_DEST_1: '/s470/oraarch/PBPR01/PBPR01_1_275495.arc'
    Tue Apr 15 09:10:03 2008
    Beginning global checkpoint up to RBA [0x43428.3.10], SCN: 0x0000.3c1594fd
    Completed checkpoint up to RBA [0x43428.2.10], SCN: 0x0000.3c1594fa
    Completed checkpoint up to RBA [0x43428.3.10], SCN: 0x0000.3c1594fd
    Tue Apr 15 09:10:03 2008
    ARC0: Completed archiving log 4 thread 1 sequence 275495
    Tue Apr 15 09:29:15 2008
    LGWR: Completed archiving log 1 thread 1 sequence 275496
    Creating archive destination LOG_ARCHIVE_DEST_3: 'DR_PBPR01'
    LGWR: Beginning to archive log 5 thread 1 sequence 275497
    Beginning log switch checkpoint up to RBA [0x43429.2.10], SCN: 0x0000.3c15bc33
    Tue Apr 15 09:29:16 2008
    ARC1: Evaluating archive log 1 thread 1 sequence 275496
    ARC1: Archive destination LOG_ARCHIVE_DEST_3: Previously completed
    ARC1: Beginning to archive log 1 thread 1 sequence 275496
    Creating archive destination LOG_ARCHIVE_DEST_1: '/s470/oraarch/PBPR01/PBPR01_1_275496.arc'
    Tue Apr 15 09:29:16 2008
    Thread 1 advanced to log sequence 275497
    Current log# 5 seq# 275497 mem# 0: /s420/oradata/PBPR01/redo05a.log
    Current log# 5 seq# 275497 mem# 1: /s420/oradata/PBPR01/redo05b.log
    Tue Apr 15 09:29:16 2008
    ARC1: Completed archiving log 1 thread 1 sequence 275496
    Log file size
    SQL> select GROUP#,MEMBERS ,sum(bytes)/(1024*1024) from v$log group by
    2 GROUP#,MEMBERS;
    GROUP# MEMBERS SUM(BYTES)/(1024*1024)
    1 2 25
    2 2 25
    3 2 25
    4 2 25
    5 2 25
    Pl. give your view what can be thought of to reduce redospace wait

    Below are my suggestion:
    Increase log buffer between [ 5Mb and 15Mb]
    differ the the commit: COMMIT_WRITE=NOWAIT,BATCH
    You can also increase your redo log fil, but read the following
    Sizing Redo Logs with Oracle 10g
    Oracle has introduced a Redo Logfile Sizing Advisor that will recommend a size for our redo logs that limit excessive log switches, incomplete and excessive checkpoints, log archiving issues, DBWR performance and excessive disk I/O. All these issues result in transactions bottlenecking within redo and performance degradation. While many DBAs' first thought is throughput of the transaction base, not very many give thought to the recovery time required in relation to the size of redo generated or the actual size of the redo log groups. With the introduction of Oracle's Mean Time to Recovery features, DBAs can now specify through the FAST_START_MTTR_TARGET initialization variable just how long a crash recovery should take. Oracle will then try its best to issue the proper checkpoints during normal system operation to help meet this target. Since the size of redo logs and the checkpointing of data have a key role in Oracle's ability to recover within a desired time frame, Oracle will now use the value of FAST_START_MTTR_TARGET to suggest an optimal redo log size. In actuality, the setting of FAST_START_MTTR_TARGET is what triggers the new redo logfile sizing advisor, and if you do not set it, Oracle will not provide a suggestion for your redo logs. If you do not have any real time requirement for recovery you should at least set this to its maximum value of 3600 seconds, or one hour and you will then be able to take advantage of the advisory. After setting the FAST_START_MTTR_TARGET initialization parameter a DBA need only query the V$INSTANCE_RECOVERY view for the column OPTIMAL_LOGFILE_SIZE value, in MEG, and then rebuild the redo log groups with this recommendation.
    Simple query to show the optimal size for redo logs
    SQL> SELECT OPTIMAL_LOGFILE_SIZE
    FROM V$INSTANCE_RECOVERY
    OPTIMAL_LOGFILE_SIZE
    64
    A few notes about setting FAST_START_MTTR_TARGET
    •     Specify a value in seconds (0-3600) that you wish Oracle to perform recovery within.
    •     Is overridden by LOG_CHECKPOINT_INTERVAL:
    Since LOG_CHECKPOINT_INTERVAL requests Oracle to checkpoint after a specified amount of redo blocks have been written, and FAST_START_MTTR_TARGET basically attempts to size the redo logs in such a way as to perform a checkpoint when they switch, you can easily see that these two parameters are of conflicting interest. You will need to unset LOG_CHECKPOINT_INTERVAL if you wish to use the redo log sizing advisor and have checkpoints occur with log switches. This is how it was recommended to be done in the v7 days and really I can't quite see any reason for anything else.
    •     Is overridden by LOG_CHECKPOINT_TIMEOUT:
    LOG_CHECKPOINT_TIMEOUT controls the amount of time in between checkpoints if a log switch or the amount of redo generated has not yet triggered a checkpoint. Since our focus is now on Mean Time to Recovery (MTTR) this parameter is no longer of concern because we are asking Oracle to determine when to checkpoint based on our crash recovery requirements.
    •     Is overridden by FAST_START_IO_TARGET:
    Actually, the FAST_START_IO_TARGET parameter is deprecated and you should switch over to the FAST_START_MTTR_TARGET parameter
    Thanks

  • How to reduce max buffer/cache size?

    Hi,
    every time I copy a file which is bigger or similiar in size to my total RAM (4gb) I notice very low responsibility from firefox (which is totally unresponsive, can't switch tabs or scroll for 30-60s). Of course my free memory is very low (something like 50-100mb) and I notice some swap usage. AFAIK linux caches everthing that is being copied, but in case of such big files it seems unnecessary.
    Is there a way to reduce max buffer size?
    I know that buffering is good in general, but I get a feeling that firefox is giving up ram and he has to read everything again from disk which slows him down. I always have many tabs open, so often it has around 30% of memory.
    I searched many times on how to reduce buffer sizes, but I've always found only articles with "buffering is always good and never an issue" attitude.
    I would be very happy to hear any suggestrions,
    cheers,
    kajman

    This seems a popular problem, going back years. The default Linux setup is bad for responsiveness, it seems.
    Here's the summary of what I do:
    Firstly, install a BFS-patched kernel, for a better kernel scheduler, and also so that the ionice and schedtool commands will work. Bonus points for switching to BFQ while you're at it - or stick with CFQ, which also supports ionice.
    In /etc/fstab, use commit=60 rather than default of 5 seconds, and also noatime, e.g.:
    UUID=73d55f23-fb9d-4a36-bb25-blahblah / ext4 defaults,noatime,nobarrier,commit=60 1 1
    In /etc/sysctl.conf
    # From http://rudd-o.com/en/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that
    vm.swappiness=0
    # https://lwn.net/Articles/572921/
    vm.dirty_background_bytes=16777216
    vm.dirty_bytes=50331648
    In ~/.bashrc - see post, e.g.:
    alias verynice="ionice -c3 nice -n 15"
    In /etc/security/limits.d/ - see post. Read CK's excellent blog article, for info.
    In your cp command, add the word verynice to the start, to stop the large batch copy from having the same priority as your UI.
    Compile sqlite without fsync, to make e.g. firefox smoother.
    Potentially use threadirqs to prioritize the interrupt-handling.
    Edit: Updated vm.swappiness from 0 to 10, from CK's blog.
    Edit2: Also see patch and e.g. nr_requests in thread.
    Edit3: Using nice instead of schedtool - not sure whether schedtool can hog the CPU.
    Edit4: Added threadirqs.
    Edit5: Tweaked sysctl.conf settings.
    Edit6: Added nobarrier option to mount, and sqlite's fsync.
    Edit7: Removed swap comment - I do use a swapfile, these days, mainly because firefox needs so much virtual RAM to compile.
    Last edited by brebs (2014-03-10 09:51:34)

  • HT4515 how can i know if the number i am calling is busy or i am on waiting

    How can I know if the number I am calling is busy or I am on waiting? Please let me know.

    If you get a busy signal when calling a number, it is busy.

  • How to get E-Business Suite session.

    I want to get E-business suite session in Java program.

    Hi User,
    TRY THIS..!!
    FND_GLOBAL.APPS_INITIALIZE (Server)
    Variable      Description
    Summary      
    procedure APPS_INITIALIZE(user_id in number,
              resp_id in number,
              resp_appl_id in number);
    Description      This procedure sets up global variables and profile values in a database session. Call this procedure to initialize the global security context for a database session. You can use it for routines such as Java, PL/SQL, or other programs that are not integrated with either the Oracle E-Business Suite concurrent processing facility or Oracle Forms (both of which already do a similar initialization for a database session). The typical use for this routine would be as part of the logic for launching a separate non-Forms session (such as a Java program) from an established Oracle E-Business Suite form session. You can also use this procedure to set up a database session for manually testing application code using SQL*Plus. This routine should only be used when the session must be established outside of a normal form or concurrent program connection
    You can obtain valid values to use with this procedure by using profile option routines to retrieve these values in an existing Oracle E-Business Suite form session. For manual testing purposes, you can use Examine during an Oracle E-Business Suite form session to retrieve the profile option values.
    Variable      Description
    USER_ID      The USER_ID number
    RESP_ID      The ID number of the responsibility
    RESP_APPL_ID      The ID number of the application to which the responsibility belongs
    Example
    fnd_global.APPS_INITIALIZE (1010, 20417, 201);
    Hope this is Helpful
    MARK THE ANSWER CORRECT OR HELPFUL...

  • Create huge Waited-Session in a particular moment in Oracle 10g

    Friends,
    I m new in Oracle 10g database . I m working in a bank and Our production server runs in Oracle 10g in AIX server . We also running an application server with Oracle 10g database . Recently I got a strange problem in my production server .I have a schema called 'schemafe' which contains all of our users who are using the application mainly. They connect into my database via this schema .
    Now recently , the users of this schema increase the "WAITED-SESSION" in our production server . And at that moment another users are hanged on . And after 10/15 minutes it becomes normal .
    In this situation, can anybody plz help me to give a suggestion that how can I tune my database and remove this type of problem ? And for this situation , which things I need to tune or monitor .
    Waiting for ur kind reply .. ..

    Friends,
    I m new in Oracle 10g database . I m working in a bank and Our production server runs in Oracle 10g in AIX server . We also running an application server with Oracle 10g database . Recently I got a strange problem in my production server .I have a schema called 'schemafe' which contains all of our users who are using the application mainly. They connect into my database via this schema .
    Now recently , the users of this schema increase the "WAITED-SESSION" in our production server . And at that moment another users are hanged on . And after 10/15 minutes it becomes normal .
    In this situation, can anybody plz help me to give a suggestion that how can I tune my database and remove this type of problem ? And for this situation , which things I need to tune or monitor .
    Waiting for ur kind reply .. ..

  • How to Reduce Clusetering Factor on Table?

    I am seeing a very high clustering factor on an SDO geometry table in our 10g RAC DB on our Linux boxes. This slow performance is repeateable on othe r Linux as well as Solaris DBs for the same table. Inserts go in at a rate of 44 milliseconds per insert and we only have about 27000 rows in the table. After viewing a VERY slow insert of about 600 records into this same table, I saw the clustering factor in OEM. The clustering factor is nearly identical to the # rows in the table indicating that useability of the index is fairly low now. I have referenced Metalink Tech Note 223117.1 and, while it affirms what I've seen, I am still trying to determine how to reduce the Clustering Factor. The excerpt on how to do this is below:
    "The only method to affect the clustering factor is to sort and then store the rows in the table in the same order as in they appear in the index. Exporting rows and putting them back in the same order that they appeared originally will have no affect. Remember that ordering the rows to suit one index may have detrimental effects on the choice of other indexes."
    Sounds great, but how does one actually go about storing the rows in the table in the same order as they appear in the index?
    We have tried placing our commits after the last insert as well as after every insert and the results are fairly neglible. We also have a column of type SDE.ST_GEOMETRY in the table and are wondering if this might also be an issue. Thanks in advance for any help.
    Matt Sauter

    Joel is right that the clustering factor is going to have absolutely no effect on the speed of inserts. The clustering factor is merely one, purely statistical, factor the optimiser makes use of to determine how to perform a SELECT statement (i.e., do I bother to use this index or not for row retrieval). It's got nothing to do with the efficiency of inserts.
    If I were you, I'd be looking at factors such as excessive disk I/O taking place for other reasons, inadequate buffer cache and/or enqueue and locking issues instead.
    If you're committing after every insert, for example, then redo will have to be flushed (a commit is about the only foreground wait event -i.e., one that you get to experience in real time- that Oracle has, so a commit after every insert's really not a smart idea). If your redo logs are stored on, say, the worst-performing disk you could buy that's also doing duty as a fileserver's main hard disk, then LGWR will be twiddling its thumbs a lot! You say you've tested this, and that's fine... I'm just saying, it's one theoretical possibility in these sorts of situations. You still want to make sure you're not suffering any log writer-related waits, all the same.
    Similarly, if you're performing huge reads on a (perhaps completely separate) table that is causing the buffer cache to be wiped every second or so, then getting access to your table so your inserts can take place could be problematic. Check if you've got any database writer waits, for example: they are usally a good sign of general I/O bottlenecks.
    Finally, you're on a RAC... so if the blocks of the table you're writing to are in memory over on another instance, and they have to be shipped to your instance, you could have high enqueue waits whilst that shipment is taking place. Maybe your interconnect is not up to the job? Maybe it's faulty, even, with significant packet loss along the way? Even worse if someone's decided to switch off cache fusion transfer for the datafiles invoved (for then block shipment happens by writing them to disk in one instance and reading from disk in the other). RAC adds a whole new level of complexity to things, so good luck tracking that lot down!!
    Also, maybe you're using Freelists and Freelist groups rather than ASSM, so perhaps you're fighting for access to the freelist with whatever else is happening on your database at the time...
    You get the idea: this could be a result of activity taking place on the server for reasons completely unconnected with your insert. It could be a feature of Spatial (with which not many people will be familiar, so good luck if so!) It could be a result of the way your RAC is configured. It could be any number of things... but I'd be willing to bet quite a bit that it's got sod-all to do with the clustering factor!
    You'll need to monitor the insert using a tool like Insider or Toad so you can see if waits and so on happen, more or less in real time -or start using the built-in tools like Statspack or AWR to analyze your workload after it's completed- to work out what your best fix is likely to be.

  • Bw web report plugin http session hangs at the server side

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly. But As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    By the way, we actived our BEX service at the SICF.
    Thanks for help!
    JA

    Hi
    If you want to avoid a blank page with logoff button, add opener=0
    <a href="<SAP_BW_URL CMD='LOG_OFF' ~command='logoff'
    >" onClick="javascript:window.close(opener=0);">Log off</a>
    If you want to close the session via X, use this code:
    create a sapscript function
    function closeSession()
    logoff()
    window.unload=CloseSession()
    However, the Plugin HTTP session isn't killed.
    Regards

  • How to trace an already running session

    Hi,
    Sometime I come across following situation.
    Queries/SQL statements keep on running for a long time and users complain about the same.
    But since they have already started I am not able do anything about it.
    So please guide me "how can I trace already running session."
    Thanks,
    Rushi

    Rushi Shah wrote:
    Hi,
    Sometime I come across following situation.
    Queries/SQL statements keep on running for a long time and users complain about the same.
    But since they have already started I am not able do anything about it.
    So please guide me "how can I trace already running session."
    http://www.petefinnigan.com/ramblings/how_to_set_trace.htm
    Use DBMS_SUPPORT to set trace in another users session
    Next use the interface to again set trace for SCOTT's session that we found earlier. here it is:
         SQL> exec dbms_support.start_trace_in_session(10,20,waits=>true,binds=>false);
         PL/SQL procedure successfully completed.
         SQL> -- execute some code
         SQL> exec dbms_support.stop_trace_in_session(10,20);
         PL/SQL procedure successfully completed.
         SQL>                          
                                  

  • How create  EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

    Hi All,
    We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.
    How can we "create" a stateful session bean with create method signature similar to create(String id)?
    We have tried
    // this is the remote interface
    @EJB AddressBean abean;
    But not working
    Any help will be appreciated.

    There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though
    since you can accomplish the same thing by defining your own business method to act
    as an initializer for whatever state you'd like. E.g.
    @Remote
    public interface FooInterface {
    public void initialize(String id);
    // ... other business methods
    @EJB FooInterface fooRef;
    fooRef.initialize("foo");
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get stateful and stateless session bean in second jsp

    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the second jsp? I find that somebody store the bean in HttpSession.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, both stateful and stateless can maintain the state in the second jsp. What is the difference between stateful and stateless session bean in this case ?
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use session bean. Can anyone provide sample jsp to show difference of stateful and stateless? How the stateful session bean can maintain the state for the client?

    Greetings,
    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the
    second jsp? I find that somebody store the bean in HttpSession.Which is the correct scope for sharing client-specific data when 'request' scope is insufficient.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is
    that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, bothWhy is that a "problem"? Does your application not require the stateless bean to be shared? If so, then don't store the EJBObject reference in the session...
    stateful and stateless can maintain the state in the second jsp. What is the difference betweenWhat do you mean by this exactly?..
    stateful and stateless session bean in this case ?Statefulness of session beans is in regard to maintaining client state (er, in all cases). If your "stateless" bean is receiving information from the client (i.e. its caller) - either through a create method or a business method - and that information is available (retrievable from the bean) on subsequent method calls, then that bean is, in fact, stateful - regardless of how it is deployed.
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use
    session bean.The correct question, it here seems, is "when" to use which type... Use a "stateful" bean when information about (from) the client (i.e. the caller) must be maintained across method calls of the bean. Use a "stateless" bean for general business methods that do not depend on "prior knowledge" of the client (i.e. the caller).
    Can anyone provide sample jsp to show difference of stateful and stateless? How the statefulA "sample JSP" would yield nothing additional... The semantics of calling, using, and "persisting", bean references are always the same - regardless of type or class. However, the reason(s) for using one over the other depends entirely on the needs of your application.
    session bean can maintain the state for the client?I recommend that you spend more time learning about EJBs generally. In particular, it seems you require more fundamental understanding of their scope and lifecycle. Refer to sections 4, 6, and 7 of the EJB 2.0 Specification.
    Regards,
    Tony "Vee Schade" Cook

  • How to avoid Invalidation of Stateful Session Bean in case of an Exception?

    Hi developers,
    I'm working on a project using JSF, Toplink and EJB 3.0 using JDev.
    I'm using a statefull session bean that is stored in the session but when an exception occurs in a business method in the stateful bean the bean crashed and can never be reused and returns the following trace :
    06/06/05 10:19:12 java.rmi.NoSuchObjectException: Session has timed out or was invalidated
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.throwPassivisationException(StatefulSessionEJBObject.java:335)
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPreExecute(StatefulSessionEJBObject.java:717)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:51)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
    06/06/05 10:19:12      at PriseChargePS_StatefulSessionBeanWrapper21.trouverAssure(PriseChargePS_StatefulSessionBeanWrapper21.java:1747)
    06/06/05 10:19:12      at Pensions.Traitements.AssureTraitement.donnerAssure(AssureTraitement.java:130)
    06/06/05 10:19:12      at Pensions.view.backing.priseCharge.PriseCharge.chercherAssure_action(PriseCharge.java:189)
    06/06/05 10:19:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/06/05 10:19:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/06/05 10:19:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/06/05 10:19:12      at java.lang.reflect.Method.invoke(Method.java:585)
    06/06/05 10:19:12      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    06/06/05 10:19:12      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    06/06/05 10:19:12      at javax.faces.component.UICommand.broadcast(UICommand.java:312)
    06/06/05 10:19:12      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    06/06/05 10:19:12      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    06/06/05 10:19:12      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    06/06/05 10:19:12      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    06/06/05 10:19:12      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    06/06/05 10:19:12      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
    06/06/05 10:19:12      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
    06/06/05 10:19:12      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    Please help !

    Your question is not how to create/compile a stateless session bean, you are asking how to use those weblogic specific annotations. A weblogic forum is a better place to ask that.

  • How to reduce rollwait time..?

    Hi All,
    the production system is showing avg.diag.resp.time more than 7seconds since last one month.while analysing the avg.Roll wait time is about more than 2sec.kindly suggest how to reduce the roll wait time.
    Thanks & Regards
    Srinivas

    Hi Jaya,
    Few days back we had a long chat on this, may be this will help you to pin point the pain area.
    High roll wait Time
    Regards,
    Gagan Deep Kaushal

  • Getting session hang When calling Function from SQL query

    Hi All,
    I am using Oracle 8.1.7.4.0. I have a fucntion in a Package and I am calling it from the SQL query. When I am firing the query my oracle session is going to hang position and I am not able to any thing. I have to kill the session.
    But this same thing is working fine in Oracle 9.i.
    There are no out parameter and no DML, DDL and DCL statement in this fucntion.
    Could you please get back me what is the problem on it.
    Regards
    SUN

    Check why your session hangs.
    Just a few ideas:
    * Blocking locks?
    * Endless loop?
    * Performance (maybe it is just slow in orac8i and you have to wait a bit longer). Check the execution plans of the SQL statements in your function.
    * Don't use a function, but direct SQL, it is faster in both versions.

  • Sessions hang

    Hi All,
    Using Oracle 10gR2 (64 Bit) on RHEL 5.5. Using some customized applications.
    Getting frequently blocked sessions. Understand it's a application logic issue, but from the database side we can monitor the sessions.
    The holding or the blocking session is 1 or 2, The waiter/blocked sessions is many.
    I have used scripts to monitor the blocking sessions and kill them. But facing some issues ;
    1) When I kill the blocking/holding session - The transaction(Update) on Blocked/waiting sessions says "....rows updated"
    2) The other cascading waiter sessions still hangs..and is "active"
    Should I Kill both the blocking and the blocked sessions. Please advise.

    Pls check is there any Bitmap Indexes on these Tables. Because Bitmap Indexes are also is one source of Locking, and not recommended to be created on transaction tables.
    Rgds,
    Ahmer
    N.B.: To earn a good reputation on forums, and if you want that your questions will be answered timely. Kindly adopt the habit of marking your questions closed as soon as you get the answer. and be courteous to the people who trying to help.

Maybe you are looking for

  • ITunes 5 and Outlook

    I downloaded iTunes 5 for PC yesterday with the hope of synchronizing my Outlook 2003 calendar with the iPod's calendar. Now, I have gotten iTunes to successfully synchronize my contacts to the iPod, but every time it tries to sync the calendar I get

  • Hide column result in pivot grand total row

    Hello Do you know if it is possible to hide the result of a particular column in a pivot grand total row? I have several columns to which makes sense use a grand total row (as in a sum) but for others (such as average) it does not make sense in the l

  • Reimburse travel expense employee by check

    Hi, In our current client, the client wants to pay the employee the check for travel expenses and accounts. As a process what is supposed to happen after the employee is paid by check. 1) Do we need to run the posting programs to post this informatio

  • A disc is stuck in the drive, how do I troubleshoot?

    a disc is stuck in the drive, how do I troubleshoot?

  • Prob with RFC destination - 4.5B 2 XI ABAP

    Hi, I created an RFC destination type 3(R/3 connection) in 4.5B, to address Integration Server. It gives the following error. <b>Connection error  : Conversation 09163404 not found / CPI-C error CM_PARAMETER_ERROR</b> Can any one guide me on this. -N