Extremely Slow DB Query in Session Bean

OS: Redhat Linux 6.2
JVM: Sun's JDK 1.3.0_02
Weblogic 5.1 SP6
Oracle 8.1.6
Hello. I have a container-managed stateless session bean which is
invoked via a JSP and makes a read-only stored procedure call to
oracle. This database call, when invoked within the session bean,
takes over two minutes. When the same code is executed in a test JSP
pointing to the SAME database, the query takes approximately 2
seconds. NOTE: when the proc is executed in SQL Plus, I also get
approx. 2 second response time. Also, I have explicitly disabled
transactions in the deployment descriptor of the session bean.
Using the Weblogic Console, and monitoring the session bean, there is
a transaction commited after the invocation of the method making the 2
min stored procedure call. It seems as though the Container is
wrapping the call in a transaction even though I have explicitly
disabled transactions.
Any thoughts would be greatly appreciated.
Regards...

Can you show me your ejb-jar.xml?
-- Rob
Jeremy wrote:
OS: Redhat Linux 6.2
JVM: Sun's JDK 1.3.0_02
Weblogic 5.1 SP6
Oracle 8.1.6
Hello. I have a container-managed stateless session bean which is
invoked via a JSP and makes a read-only stored procedure call to
oracle. This database call, when invoked within the session bean,
takes over two minutes. When the same code is executed in a test JSP
pointing to the SAME database, the query takes approximately 2
seconds. NOTE: when the proc is executed in SQL Plus, I also get
approx. 2 second response time. Also, I have explicitly disabled
transactions in the deployment descriptor of the session bean.
Using the Weblogic Console, and monitoring the session bean, there is
a transaction commited after the invocation of the method making the 2
min stored procedure call. It seems as though the Container is
wrapping the call in a transaction even though I have explicitly
disabled transactions.
Any thoughts would be greatly appreciated.
Regards...

Similar Messages

  • SSRS 2008 R2 is extremely slow. The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes. I have read this is a bug in SSRS 2008 R2. We installed the most recent patches and service packs.

    SSRS 2008 R2 is extremely slow.  The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes.  I have read this is a bug in SSRS 2008 R2.  We installed the most recent patches and
    service packs.  Nothing we've done so far has fixed it and I see that I'm not the only person with this problem.  However I don't see any answers either.

    Hi Kim Sharp,
    According to your description that when you view the report it is extremely slow in SSRS 2008 R2 but it is very fast when execute the query in dataset designer, right?
    I have tested on my local environment and can‘t reproduce the issue. Obviously, it is the performance issue, rendering performance can be affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount
    of data in a report, design of the report, and output format. If you have parameters in your report which contains many values in the list, the bad performance as you mentioned is an known issue on 2008 R2 and already have the hotfix:
    http://support.microsoft.com/kb/2276203
    Any issue after applying the update, I recommend you that submit a feedback at https://connect.microsoft.com/SQLServer/ 
    If you don’t have, you can do some action to improve the performance when designing the report. Because how you create and update reports affects how fast the report renders.
    Actually, the Report Server ExecutionLog2  view contains reports performance data. You could make use of below query to see where the report processing time is being spent:
    After you determine whether the delay time is in data retrieval, report processing, or report rendering:
    use ReportServer
    SELECT TOP 10 ReportPath,parameters,
    TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering,
    ByteCount, [RowCount],Source, AdditionalInfo
    FROM ExecutionLog2
    ORDER BY Timestart DESC
    Use below methods to help troubleshoot issues according to the above query result :
    Troubleshooting Reports: Report Performance
    Besides this, you could also follow these articles for more information about this issue:
    Report Server Catalog Best Practices
    Performance, Snapshots, Caching (Reporting Services)
    Similar thread for your reference:
    SSRS slow
    Any problem, please feel free to ask
    Regards
    Vicky Liu

  • Where to write SQL query in a Stateless Session Bean?

    Hi
    I want to query a database table from a Stateless Session Bean (SSB). I have the getter and setter methods. And am connecting to the database in ejbCreate and disconnecting in ejbRemove methods. But where should I query the database to retrieve the data? In case of a entity bean it is written in the ejbLoad but where in SSB.
    Thanks in advance
    Siva

    Stateless Session Bean as its name indicates, it has no state, ie it should have no member variables. In another word, SLSB is method based.
    Hence, if somehow you need to access to the database in one of the method, you have to open db connection and query the table in that method.
    BTW, a Stateless Session Bean should not have getter and setter methods, because it should not keep any stateful information.
    --lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error execute query from stateful session bean

    Hi,
    I created a stateful session bean, it's flow are as following:
    - client invoke open()
    - client "iterate" using method next()
    - client invoke close()
    In open, I get Connection to db-source, create a PreparedStatement, and execeute the query, store in a resultset.
    In next(), I traverse the resultSet using next().
    In close(), I close both resultset, statemtn, and connection.
    Here's the snippet of my code:public SynchCatalogBean implements SessionBean {
        private Connection conn;
        private PreparedStatement stmt;
        private ResultSet rs;
        private static final String = "SELECT ? FROM ?";
        public void openCategory() throws RemoteException {
            DataSource dataSource =
                (DataSource)jndiContext.lookup(DATASOURCE);
            con = dataSource.getConnection();
            stmt = con.prepareStatement(QUERY);
            stmt.setString(1, "id");
            stmt.setString(2, "category");
            rs = stmt.executeQuery(); //this throws exception
        public String next() throws ... {
            if (rs.next())
        public void close() throws ... {
            rs.close();
            stmt.close();
            conn.close();
    }Well, the problem is, once I test with a simple client, the line rs = stmt.executeQuery() produce exception like this:[SynchCatalog] TRANSACTION ROLLBACK EXCEPTION:Error opening category; nested exception is:
        java.rmi.RemoteException: Error opening category
    [SynchCatalog] java.rmi.RemoteException: Error opening category
    [SynchCatalog]  at matashop.product.ejb.SynchCatalogBean.openCategory(SynchCatalogBean.java:66)
    [SynchCatalog]  at java.lang.reflect.Method.invoke(Native Method)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
    [SynchCatalog]  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
    [SynchCatalog]  at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
    [SynchCatalog]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
    [SynchCatalog]  at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
    ...My stateful-bean is "read-only" bean, it just execute a select statement, so why Jboss complain about transaction exception? Can anyone help me?
    -- Verdi March --

    agree, you cannot pass tablenames as ? parameters. Instead you should generate your SQL statement dynamically
    private static final String = "SELECT ? FROM ";
    public void openCategory() throws RemoteException {
    stmt = con.prepareStatement(QUERY + "category");
    stmt.setString(1, "id");

  • EJB session bean query

    I am total newbie in EJB and request help from u guys. I have just started learning EJB and have a query:
    Should a session bean always implement an interface?
    Beans with remote interface always implement an interface, but beans with local interface - may or may not, correct?eg:
    package HelloWorldSLL;
    import javax.ejb.Stateless;@Stateless
    public class HelloWorldBean{    public void sayHello( String name )    {        System.out.println( "Hello " + name );    }}

    In EJB 3.0, the local or remote session bean view always requires an interface that is distinct from the bean class. You're right that the argument for a distinct interface is less compelling in the local case. We're planning to relax that restriction in EJB 3.1. You can find more about that here :
    http://blogs.sun.com/kensaks/entry/optional_local_business_interfaces
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • SQL tuning for extremely slow query

    Hi,
    We have a requirement to display sales data by month. The sales data should be summed based on groups. The whole query is dynamically generated so the WHERE clause as well as the GROUP BY columns will be dynamically generated. Please find below the query which has been dynamically generated. The query is extremely slow and is not returning any data even after several minutes.
    Please can anyone suggest possible ways of tuning this query? We are evaluating the option of using Materialied Views with Fast Refresh but the number of tables involved in this query runs into several hundreds and creating log in each table would be tedious.
    Regards,
    Balu
    SELECT trantype, cmp, fyr, nam, cno, loc, or#, prd, siz, dat, ter, reg, gra,
    mjr, mrk, fiscdat, GROUP_ID, class_id, group_name, class_name,
    cmp_sreg, channel, bt_dsc, SUM (CASE fpr
    WHEN 1
    THEN amt
    ELSE 0
    END) AS a1,
    SUM (CASE fpr
    WHEN 2
    THEN amt
    ELSE 0
    END) AS a2, SUM (CASE fpr
    WHEN 3
    THEN amt
    ELSE 0
    END) AS a3,
    SUM (CASE fpr
    WHEN 4
    THEN amt
    ELSE 0
    END) AS a4, SUM (CASE fpr
    WHEN 5
    THEN amt
    ELSE 0
    END) AS a5,
    SUM (CASE fpr
    WHEN 6
    THEN amt
    ELSE 0
    END) AS a6, SUM (CASE fpr
    WHEN 7
    THEN amt
    ELSE 0
    END) AS a7,
    SUM (CASE fpr
    WHEN 8
    THEN amt
    ELSE 0
    END) AS a8, SUM (CASE fpr
    WHEN 9
    THEN amt
    ELSE 0
    END) AS a9,
    SUM (CASE fpr
    WHEN 10
    THEN amt
    ELSE 0
    END) AS a10, SUM (CASE fpr
    WHEN 11
    THEN amt
    ELSE 0
    END) AS a11,
    SUM (CASE fpr
    WHEN 12
    THEN amt
    ELSE 0
    END) AS a12, SUM (CASE fpr
    WHEN 1
    THEN qty
    ELSE 0
    END) AS q1,
    SUM (CASE fpr
    WHEN 2
    THEN qty
    ELSE 0
    END) AS q2, SUM (CASE fpr
    WHEN 3
    THEN qty
    ELSE 0
    END) AS q3,
    SUM (CASE fpr
    WHEN 4
    THEN qty
    ELSE 0
    END) AS q4, SUM (CASE fpr
    WHEN 5
    THEN qty
    ELSE 0
    END) AS q5,
    SUM (CASE fpr
    WHEN 6
    THEN qty
    ELSE 0
    END) AS q6, SUM (CASE fpr
    WHEN 7
    THEN qty
    ELSE 0
    END) AS q7,
    SUM (CASE fpr
    WHEN 8
    THEN qty
    ELSE 0
    END) AS q8, SUM (CASE fpr
    WHEN 9
    THEN qty
    ELSE 0
    END) AS q9,
    SUM (CASE fpr
    WHEN 10
    THEN qty
    ELSE 0
    END) AS q10, SUM (CASE fpr
    WHEN 11
    THEN qty
    ELSE 0
    END) AS q11,
    SUM (CASE fpr
    WHEN 12
    THEN qty
    ELSE 0
    END) AS q12,
    SUM (CASE fpr
    WHEN 1
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm1,
    SUM (CASE fpr
    WHEN 2
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm2,
    SUM (CASE fpr
    WHEN 3
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm3,
    SUM (CASE fpr
    WHEN 4
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm4,
    SUM (CASE fpr
    WHEN 5
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm5,
    SUM (CASE fpr
    WHEN 6
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm6,
    SUM (CASE fpr
    WHEN 7
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm7,
    SUM (CASE fpr
    WHEN 8
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm8,
    SUM (CASE fpr
    WHEN 9
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm9,
    SUM (CASE fpr
    WHEN 10
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm10,
    SUM (CASE fpr
    WHEN 11
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm11,
    SUM (CASE fpr
    WHEN 12
    THEN (amt - (((frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cm12,
    SUM (CASE fpr
    WHEN 0
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml0,
    SUM (CASE fpr
    WHEN 1
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml1,
    SUM (CASE fpr
    WHEN 2
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml2,
    SUM (CASE fpr
    WHEN 3
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml3,
    SUM (CASE fpr
    WHEN 4
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml4,
    SUM (CASE fpr
    WHEN 5
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml5,
    SUM (CASE fpr
    WHEN 6
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml6,
    SUM (CASE fpr
    WHEN 7
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml7,
    SUM (CASE fpr
    WHEN 8
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml8,
    SUM (CASE fpr
    WHEN 9
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml9,
    SUM (CASE fpr
    WHEN 10
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml10,
    SUM (CASE fpr
    WHEN 11
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml11,
    SUM (CASE fpr
    WHEN 12
    THEN (amt - (((lrt + frt + mrt + csc)) * qty))
    ELSE 0
    END
    ) AS cml12,
    SUM (amt) AS a, SUM (qty) AS q,
    SUM ((amt - (((frt + mrt + csc)) * qty))) AS cm,
    SUM ((amt - (((lrt + frt + mrt + csc)) * qty))) AS cml
    FROM (SELECT ruec_a.seq, ruec_a.trantype, ruec_a.cmp, ruec_a.fyr,
    ruec_a.fpr, ruec_a.csc, ruec_a.lrt, ruec_a.mrt, ruec_a.frt,
    ruec_a.typ, ruec_a.nam, ruec_a.cno, ruec_a.loc, ruec_a.or#,
    ruec_a.prd, ruec_a.bulk_item_no, ruec_a.siz, ruec_a.dat,
    NVL (ruec_a.qty, 0) qty, ruec_a.amt, ruec_a.ter, ruec_a.reg,
    ruec_a.gra, ruec_a.mjr, ruec_a.mrk, ruec_a.fiscdat,
    ruec_a.group_name, ruec_a.class_name, ruec_a.GROUP_ID,
    ruec_a.cur, ruec_a.conversion_rate, ruec_a.grpnum,
    ruec_a.rgnshi, ruec_a.mktshi, ruec_a.slmshi, ruec_a.mjrshi,
    ruec_a.cmpid, ruec_a.chnshi, ruec_a.srgshi, ruec_a.sh_sreg,
    ruec_a.cmp_sreg, ruec_a.channel, ruec_a.srgcmp,
    ruec_a.biz_typ, ruec_a.bt_dsc, amt / NVL (qty, 1) qty$,
    NVL ((amt - ((qty * csc) + (qty * frt) + (qty * mrt))),
    0) cm,
    NVL ((amt - (((frt + mrt + csc)) * qty)) / NVL (qty, 1),
    0
    ) cm$,
    NVL (( (( amt
    - ( (qty * csc)
    + (qty * frt)
    + (qty * mrt * 100)
    + (qty * lrt)
    / 100
    0
    ) gp,
    ((CASE amt
    WHEN 0
    THEN 0
    ELSE NVL (( ( amt
    - ( (qty * csc)
    + (qty * frt)
    + (qty * mrt * 100)
    + (qty * lrt)
    / amt
    0
    END
    ) pm,
    ruec_a.customer_trx_id, ruec_a.customer_trx_line_id,
    ruec_a.inventory_item_id, ruec_a.item_id, line_id, header_id,
    ruec_a.customer_id, ruec_a.site_use_id, ruec_a.class_id
    FROM (SELECT xxsrg.line_number seq, xxsrg.trantype,
    xxsrg.co_code cmp, xxsrg.period_year fyr,
    xxsrg.period_num fpr, csc_invcur * conv_rate csc,
    lrt_invcur * conv_rate lrt,
    mrt_invcur * conv_rate mrt,
    xxsrg.frt_invcur * conv_rate frt,
    xxsrg.inv_class typ, xxsrg.site_name nam,
    xxsrg.customer_number cno, xxsrg.site_number loc,
    xxsrg.ct_reference "OR#", xxsrg.item_no prd,
    xxsrg.bulk_item_no, xxsrg.container_type siz,
    xxsrg.trx_date dat, qty,
    xxsrg.amt_invcur * conv_rate amt,
    xxsrg.sales_territory_name ter,
    xxsrg.sales_region_name reg,
    xxsrg.customer_group_name gra,
    xxsrg.major_market_name mjr,
    xxsrg.minor_market_name mrk, xxsrg.trx_date fiscdat,
    xxsrg.group_name group_name,
    xxsrg.class_name class_name,
    NVL (xxsrg.GROUP_ID, 0) GROUP_ID, xxsrg.inv_cur cur,
    conv_rate conversion_rate,
    xxsrg.customer_group_code grpnum,
    xxsrg.sales_region_code rgnshi,
    xxsrg.minor_market_id mktshi,
    xxsrg.salesrep_id slmshi,
    xxsrg.major_market_id mjrshi,
    xxsrg.organization_id cmpid,
    xxsrg.sales_channel_code chnshi, xxsrg.ssr_id srgshi,
    xxsrg.ssr_name sh_sreg, xxsrg.psr_name cmp_sreg,
    xxsrg.sales_channel_code channel,
    xxsrg.psr_id srgcmp, xxsrg.biz_typ,
    xxsrg.biz_typ_dsc bt_dsc, xxsrg.customer_trx_id,
    xxsrg.customer_trx_line_id, xxsrg.inventory_item_id,
    xxsrg.item_id, xxsrg.line_id, xxsrg.customer_id,
    xxsrg.site_use_id, 0 class_id, 0 header_id
    FROM (SELECT xxsrg.*,
    CASE
    WHEN 'CAD' = xxsrg.inv_cur
    THEN 1
    ELSE xxaoc_int_srg_util.get_dly_rate
    (xxsrg.inv_cur,
    'CAD',
    xxsrg.trx_date
    END conv_rate,
    CASE
    WHEN 'KG' = 'LB'
    THEN xxsrg.qty_lbs
    ELSE xxsrg.qty_kgs
    END qty
    FROM apps.xxaoc_bs_srg_details_vw xxsrg) xxsrg) ruec_a
    WHERE (fiscdat >= '01-APR-06' AND fiscdat <= '01-APR-09')
    AND (prd LIKE '%H864%')
    AND grpnum IN (274, 275)
    AND class_id IN (54)
    AND GROUP_ID IN (10)
    AND mjrshi IN ('4')
    AND mktshi IN ('21')
    AND rgnshi IN ('ER')
    AND slmshi IN (10045)
    AND cmpid IN (462)) ruec_a
    GROUP BY trantype,
    cmp,
    fyr,
    nam,
    cno,
    loc,
    or#,
    prd,
    siz,
    dat,
    ter,
    reg,
    gra,
    mjr,
    mrk,
    fiscdat,
    GROUP_ID,
    class_id,
    group_name,
    class_name,
    GROUP_ID,
    class_id,
    chnshi,
    srgshi,
    sh_sreg,
    cmp_sreg,
    channel,
    srgcmp,
    biz_typ,
    bt_dsc

    The database version is 10.2.0.3.0. Explain Plan is provided below please:
    Plan
    SELECT STATEMENT CHOOSECost: 435 Bytes: 10,402 Cardinality: 1                                                                                                                                                                                               
         182 SORT GROUP BY Cost: 435 Bytes: 10,402 Cardinality: 1                                                                                                                                                                                          
              181 VIEW SRG. Cost: 409 Bytes: 10,402 Cardinality: 1                                                                                                                                                                                     
                   180 FILTER                                                                                                                                                                                
                        166 NESTED LOOPS Cost: 399 Bytes: 10,736 Cardinality: 1                                                                                                                                                                           
                             163 NESTED LOOPS OUTER Cost: 396 Bytes: 10,693 Cardinality: 1                                                                                                                                                                      
                                  160 HASH JOIN OUTER Cost: 393 Bytes: 10,646 Cardinality: 1                                                                                                                                                                 
                                       117 HASH JOIN Cost: 299 Bytes: 10,636 Cardinality: 1                                                                                                                                                            
                                            32 HASH JOIN Cost: 240 Bytes: 299 Cardinality: 1                                                                                                                                                       
                                                 27 FILTER                                                                                                                                                  
                                                      26 NESTED LOOPS OUTER Cost: 22 Bytes: 3,060 Cardinality: 12                                                                                                                                             
                                                           23 HASH JOIN OUTER Cost: 19 Bytes: 232 Cardinality: 1                                                                                                                                        
                                                                18 NESTED LOOPS OUTER Cost: 12 Bytes: 216 Cardinality: 1                                                                                                                                   
                                                                     15 VIEW VIEW APPS.XXAOC_RA_CUST_TRX_LINES_VW Cost: 9 Bytes: 147 Cardinality: 1                                                                                                                              
                                                                          14 FILTER                                                                                                                         
                                                                               10 FILTER                                                                                                                    
                                                                                    9 NESTED LOOPS Cost: 5 Bytes: 195 Cardinality: 1                                                                                                               
                                                                                         6 NESTED LOOPS Cost: 4 Bytes: 171 Cardinality: 1                                                                                                          
                                                                                              4 NESTED LOOPS Cost: 4 Bytes: 163 Cardinality: 1                                                                                                     
                                                                                                   1 TABLE ACCESS FULL TABLE AR.RA_CUSTOMER_TRX_LINES_ALL Cost: 3 Bytes: 34 Cardinality: 1                                                                                                
                                                                                                   3 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUSTOMER_TRX_ALL Cost: 1 Bytes: 129 Cardinality: 1                                                                                                
                                                                                                        2 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUSTOMER_TRX_U1 Cardinality: 1                                                                                           
                                                                                              5 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_BATCH_SOURCES_U2 Bytes: 8 Cardinality: 1                                                                                                     
                                                                                         8 TABLE ACCESS BY INDEX ROWID TABLE AR.RA_CUST_TRX_TYPES_ALL Cost: 1 Bytes: 24 Cardinality: 1                                                                                                          
                                                                                              7 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.RA_CUST_TRX_TYPES_U1 Cardinality: 1                                                                                                     
                                                                               13 COUNT STOPKEY                                                                                                                    
                                                                                    12 TABLE ACCESS BY INDEX ROWID TABLE INV.MTL_SYSTEM_ITEMS_B Cost: 4 Bytes: 22 Cardinality: 1                                                                                                               
                                                                                         11 INDEX RANGE SCAN INDEX (UNIQUE) INV.MTL_SYSTEM_ITEMS_B_U1 Cost: 3 Cardinality: 1                                                                                                          
                                                                     17 TABLE ACCESS BY INDEX ROWID TABLE APPLSYS.FND_LOOKUP_VALUES Cost: 3 Bytes: 69 Cardinality: 1                                                                                                                              
                                                                          16 INDEX RANGE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 2 Cardinality: 1                                                                                                                         
                                                                22 VIEW VIEW APPS.CM_CLDR_HDR_VL Cost: 6 Bytes: 1,632 Cardinality: 102                                                                                                                                   
                                                                     21 NESTED LOOPS Cost: 6 Bytes: 2,346 Cardinality: 102                                                                                                                              
                                                                          19 TABLE ACCESS FULL TABLE GMF.CM_CLDR_HDR_B Cost: 6 Bytes: 1,632 Cardinality: 102                                                                                                                         
                                                                          20 INDEX RANGE SCAN INDEX GMF.CM_CLDR_HDR_TL_PK Bytes: 7 Cardinality: 1                                                                                                                         
                                                           25 TABLE ACCESS BY INDEX ROWID TABLE GMF.CM_CLDR_DTL Cost: 3 Bytes: 276 Cardinality: 12                                                                                                                                        
                                                                24 INDEX RANGE SCAN INDEX (UNIQUE) GMF.CM_CLDR_DTL_PK Cost: 1 Cardinality: 12                                                                                                                                   
                                                 31 VIEW VIEW APPS.XXAOC_IC_ITEM_MST_VW Cost: 217 Bytes: 82,632 Cardinality: 1,878                                                                                                                                                  
                                                      30 NESTED LOOPS Cost: 217 Bytes: 61,974 Cardinality: 1,878                                                                                                                                             
                                                           28 TABLE ACCESS FULL TABLE GMI.IC_ITEM_MST_B Cost: 217 Bytes: 46,950 Cardinality: 1,878                                                                                                                                        
                                                           29 INDEX UNIQUE SCAN INDEX (UNIQUE) GMI.IC_ITEM_MST_TL_PK Bytes: 8 Cardinality: 1                                                                                                                                        
                                            116 VIEW VIEW APPS.XXAOC_BS_CUST_SITE_VW Cost: 58 Bytes: 10,337 Cardinality: 1                                                                                                                                                       
                                                 115 SORT ORDER BY Cost: 58 Bytes: 1,149 Cardinality: 1                                                                                                                                                  
                                                      114 FILTER                                                                                                                                             
                                                           113 NESTED LOOPS OUTER Cost: 33 Bytes: 1,149 Cardinality: 1                                                                                                                                        
                                                                110 FILTER                                                                                                                                   
                                                                     109 NESTED LOOPS OUTER Cost: 31 Bytes: 1,130 Cardinality: 1                                                                                                                              
                                                                          106 NESTED LOOPS OUTER Cost: 30 Bytes: 1,111 Cardinality: 1                                                                                                                         
                                                                               104 NESTED LOOPS OUTER Cost: 29 Bytes: 1,088 Cardinality: 1                                                                                                                    
                                                                                    101 NESTED LOOPS Cost: 29 Bytes: 1,041 Cardinality: 1                                                                                                               
                                                                                         99 NESTED LOOPS OUTER Cost: 29 Bytes: 1,037 Cardinality: 1                                                                                                          
                                                                                              97 NESTED LOOPS Cost: 28 Bytes: 1,001 Cardinality: 1                                                                                                     
                                                                                                   94 NESTED LOOPS Cost: 27 Bytes: 910 Cardinality: 1                                                                                                
                                                                                                        92 NESTED LOOPS Cost: 26 Bytes: 902 Cardinality: 1                                                                                           
                                                                                                             89 NESTED LOOPS Cost: 25 Bytes: 796 Cardinality: 1                                                                                      
                                                                                                                  86 NESTED LOOPS Cost: 24 Bytes: 773 Cardinality: 1                                                                                 
                                                                                                                       83 NESTED LOOPS OUTER Cost: 23 Bytes: 678 Cardinality: 1                                                                            
                                                                                                                            81 NESTED LOOPS Cost: 23 Bytes: 675 Cardinality: 1                                                                       
                                                                                                                                 78 NESTED LOOPS OUTER Cost: 22 Bytes: 666 Cardinality: 1                                                                  
                                                                                                                                      76 NESTED LOOPS OUTER Cost: 22 Bytes: 662 Cardinality: 1                                                             
                                                                                                                                           70 NESTED LOOPS OUTER Cost: 22 Bytes: 649 Cardinality: 1                                                        
                                                                                                                                                64 NESTED LOOPS OUTER Cost: 22 Bytes: 636 Cardinality: 1                                                   
                                                                                                                                                     54 NESTED LOOPS OUTER Cost: 21 Bytes: 609 Cardinality: 1                                              
                                                                                                                                                          52 NESTED LOOPS OUTER Cost: 20 Bytes: 573 Cardinality: 1                                         
                                                                                                                                                               50 NESTED LOOPS OUTER Cost: 18 Bytes: 515 Cardinality: 1                                    
                                                                                                                                                                    47 NESTED LOOPS OUTER Cost: 17 Bytes: 457 Cardinality: 1                               
                                                                                                                                                                         45 NESTED LOOPS OUTER Cost: 15 Bytes: 421 Cardinality: 1                          
                                                                                                                                                                              43 NESTED LOOPS Cost: 13 Bytes: 385 Cardinality: 1                     
                                                                                                                                                                                   40 NESTED LOOPS Cost: 12 Bytes: 290 Cardinality: 1                
                                                                                                                                                                                        37 NESTED LOOPS OUTER Cost: 11 Bytes: 237 Cardinality: 1           
                                                                                                                                                                                             35 HASH JOIN Cost: 10 Bytes: 143 Cardinality: 1      
                                                                                                                                                                                                  33 TABLE ACCESS FULL TABLE AR.RA_TERRITORIES Cost: 3 Bytes: 34 Cardinality: 1
                                                                                                                                                                                                  34 TABLE ACCESS FULL TABLE AR.HZ_CUST_SITE_USES_ALL Cost: 6 Bytes: 11,336 Cardinality: 104
                                                                                                                                                                                             36 INDEX RANGE SCAN INDEX (UNIQUE) JTF.JTF_RS_SALESREPS_U1 Cost: 1 Cardinality: 11      
                                                                                                                                                                                        39 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUST_ACCT_SITES_ALL Cost: 1 Bytes: 53 Cardinality: 1           
                                                                                                                                                                                             38 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_ACCT_SITES_U1 Cardinality: 1      
                                                                                                                                                                                   42 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUST_ACCOUNTS Cost: 1 Bytes: 95 Cardinality: 1                
                                                                                                                                                                                        41 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_ACCOUNTS_U1 Cardinality: 1           
                                                                                                                                                                              44 INDEX RANGE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 2 Bytes: 36 Cardinality: 1                     
                                                                                                                                                                         46 INDEX RANGE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 2 Bytes: 36 Cardinality: 1                          
                                                                                                                                                                    49 TABLE ACCESS BY INDEX ROWID TABLE APPLSYS.FND_LOOKUP_VALUES Cost: 1 Bytes: 58 Cardinality: 1                               
                                                                                                                                                                         48 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 1 Cardinality: 1                          
                                                                                                                                                               51 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 1 Cardinality: 1                                    
                                                                                                                                                          53 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 1 Bytes: 36 Cardinality: 1                                         
                                                                                                                                                     63 VIEW PUSHED PREDICATE VIEW APPS.RA_SALESREPS Cost: 1 Bytes: 27 Cardinality: 1                                              
                                                                                                                                                          62 NESTED LOOPS Cost: 4 Bytes: 59 Cardinality: 1                                         
                                                                                                                                                               59 NESTED LOOPS Cost: 3 Bytes: 22 Cardinality: 1                                    
                                                                                                                                                                    56 TABLE ACCESS BY INDEX ROWID TABLE JTF.JTF_RS_SALESREPS Cost: 2 Bytes: 11 Cardinality: 1                               
                                                                                                                                                                         55 INDEX RANGE SCAN INDEX (UNIQUE) JTF.JTF_RS_SALESREPS_U1 Cost: 1 Cardinality: 1                          
                                                                                                                                                                    58 TABLE ACCESS BY INDEX ROWID TABLE JTF.JTF_RS_RESOURCE_EXTNS Cost: 1 Bytes: 11 Cardinality: 1                               
                                                                                                                                                                         57 INDEX UNIQUE SCAN INDEX (UNIQUE) JTF.JTF_RS_RESOURCE_EXTNS_U1 Cardinality: 1                          
                                                                                                                                                               61 INLIST ITERATOR                                    
                                                                                                                                                                    60 INDEX UNIQUE SCAN INDEX (UNIQUE) JTF.JTF_RS_EXTNS_U1 Cardinality: 1                               
                                                                                                                                                69 VIEW PUSHED PREDICATE VIEW APPS.OE_PRICE_LISTS_115_VL Bytes: 13 Cardinality: 1                                                   
                                                                                                                                                     68 NESTED LOOPS Cost: 1 Bytes: 62 Cardinality: 1                                              
                                                                                                                                                          66 TABLE ACCESS BY INDEX ROWID TABLE QP.QP_LIST_HEADERS_B Cost: 1 Bytes: 45 Cardinality: 1                                         
                                                                                                                                                               65 INDEX UNIQUE SCAN INDEX (UNIQUE) QP.QP_LIST_HEADERS_B_PK Cardinality: 1                                    
                                                                                                                                                          67 INDEX UNIQUE SCAN INDEX (UNIQUE) QP.QP_LIST_HEADERS_TL_PK Bytes: 17 Cardinality: 1                                         
                                                                                                                                           75 VIEW PUSHED PREDICATE VIEW APPS.OE_ORDER_TYPES_115 Bytes: 13 Cardinality: 1                                                        
                                                                                                                                                74 NESTED LOOPS Cost: 1 Bytes: 43 Cardinality: 1                                                   
                                                                                                                                                     72 TABLE ACCESS BY INDEX ROWID TABLE ONT.OE_TRANSACTION_TYPES_ALL Cost: 1 Bytes: 26 Cardinality: 1                                              
                                                                                                                                                          71 INDEX UNIQUE SCAN INDEX (UNIQUE) ONT.OE_TRANSACTION_TYPES_ALL_U1 Cardinality: 1                                         
                                                                                                                                                     73 INDEX UNIQUE SCAN INDEX (UNIQUE) ONT.OE_TRANSACTION_TYPES_TL_U1 Bytes: 17 Cardinality: 1                                              
                                                                                                                                      77 INDEX UNIQUE SCAN INDEX (UNIQUE) HR.HR_ORGANIZATION_UNITS_PK Bytes: 4 Cardinality: 1                                                             
                                                                                                                                 80 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUSTOMER_PROFILES Cost: 1 Bytes: 9 Cardinality: 1                                                                  
                                                                                                                                      79 INDEX RANGE SCAN INDEX AR.HZ_CUSTOMER_PROFILES_N1 Cardinality: 1                                                             
                                                                                                                            82 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_PROFILE_CLASSES_U1 Bytes: 3 Cardinality: 1                                                                       
                                                                                                                       85 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CUST_ACCOUNTS Cost: 1 Bytes: 95 Cardinality: 1                                                                            
                                                                                                                            84 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_CUST_ACCOUNTS_U1 Cardinality: 1                                                                       
                                                                                                                  88 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_PARTY_SITES Cost: 1 Bytes: 23 Cardinality: 1                                                                                 
                                                                                                                       87 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_PARTY_SITES_U1 Cardinality: 1                                                                            
                                                                                                             91 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_LOCATIONS Cost: 1 Bytes: 106 Cardinality: 1                                                                                      
                                                                                                                  90 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_LOCATIONS_U1 Cardinality: 1                                                                                 
                                                                                                        93 INDEX RANGE SCAN INDEX AR.HZ_LOC_ASSIGNMENTS_N1 Cost: 1 Bytes: 8 Cardinality: 1                                                                                           
                                                                                                   96 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_PARTIES Cost: 1 Bytes: 91 Cardinality: 1                                                                                                
                                                                                                        95 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_PARTIES_U1 Cardinality: 1                                                                                           
                                                                                              98 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 1 Bytes: 36 Cardinality: 1                                                                                                     
                                                                                         100 INDEX UNIQUE SCAN INDEX (UNIQUE) AR.HZ_PARTIES_U1 Bytes: 4 Cardinality: 1                                                                                                          
                                                                                    103 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_CONTACT_PREFERENCES Bytes: 47 Cardinality: 1                                                                                                               
                                                                                         102 INDEX RANGE SCAN INDEX AR.HZ_CONTACT_PREFERENCES_N1 Cardinality: 1                                                                                                          
                                                                               105 INDEX RANGE SCAN INDEX AR.HZ_CONTACT_POINTS_N6 Cost: 1 Bytes: 23 Cardinality: 1                                                                                                                    
                                                                          108 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_ORGANIZATION_PROFILES Cost: 1 Bytes: 19 Cardinality: 1                                                                                                                         
                                                                               107 INDEX RANGE SCAN INDEX AR.HZ_ORGANIZATION_PROFILES_N1 Cardinality: 1                                                                                                                    
                                                                112 TABLE ACCESS BY INDEX ROWID TABLE AR.HZ_PERSON_PROFILES Cost: 2 Bytes: 19 Cardinality: 1                                                                                                                                   
                                                                     111 INDEX RANGE SCAN INDEX AR.HZ_PERSON_PROFILES_N1 Cost: 1 Cardinality: 1                                                                                                                              
                                       159 VIEW VIEW APPS.XXAOC_SALES_REGION_VW Cost: 94 Bytes: 40 Cardinality: 4                                                                                                                                                            
                                            158 SORT ORDER BY Cost: 94 Bytes: 2,736 Cardinality: 4                                                                                                                                                       
                                                 157 VIEW VIEW APPS.XXAOC_CT_KFF_VW Cost: 69 Bytes: 2,736 Cardinality: 4                                                                                                                                                  
                                                      156 SORT ORDER BY Cost: 69 Bytes: 800 Cardinality: 4                                                                                                                                             
                                                           155 CONCATENATION                                                                                                                                        
                                                                127 MERGE JOIN CARTESIAN Cost: 11 Bytes: 200 Cardinality: 1                                                                                                                                   
                                                                     123 NESTED LOOPS Cost: 5 Bytes: 82 Cardinality: 1                                                                                                                              
                                                                          120 NESTED LOOPS Cost: 4 Bytes: 54 Cardinality: 1                                                                                                                         
                                                                               118 TABLE ACCESS FULL TABLE APPLSYS.FND_ID_FLEX_SEGMENTS Cost: 4 Bytes: 28 Cardinality: 1                                                                                                                    
                                                                               119 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_ID_FLEX_SEGMENTS_TL_U1 Bytes: 26 Cardinality: 1                                                                                                                    
                                                                          122 TABLE ACCESS BY INDEX ROWID TABLE APPLSYS.FND_FLEX_VALUE_SETS Cost: 1 Bytes: 28 Cardinality: 1                                                                                                                         
                                                                               121 INDEX UNIQUE SCAN INDEX (UNIQUE) APPLSYS.FND_FLEX_VALUE_SETS_U1 Cardinality: 1                                                                                                                    
                                                                     126 BUFFER SORT Cost: 10 Bytes: 2,714 Cardinality: 23                                                                                                                              
                                                                          125 TABLE ACCESS BY INDEX ROWID TABLE APPLSYS.FND_LOOKUP_VALUES Cost: 6 Bytes: 2,714 Cardinality: 23                                                                                                                         
                                                                               124 INDEX RANGE SCAN INDEX (UNIQUE) APPLSYS.FND_LOOKUP_VALUES_U1 Cost: 2 Cardinality: 23                                                                                                                    
                                                                136 TABLE ACCESS BY INDEX ROWID TABLE APPLSYS.FND_LOOKUP_VALUES Cost: 6 Bytes: 2,714 Cardinality: 23                                                                                                                                   
                                                                     135 NESTED LOOPS Cost: 11 Bytes: 200 Cardinality: 1                                                                                                                              
                                                                          133 NESTED LOOPS Cost: 5 Bytes: 82 Cardinality: 1                                                                                                                         
                                                                               130 NESTED LOOPS Cost: 4 Bytes: 54 Cardinality: 1                                                                                                                    
                                                                                    128 TABLE ACCESS FULL TABLE APPLSYS.FND_ID_FLEX_SEGMENTS Cost: 4 Bytes: 28 Cardinality: 1                                                                                                               
                                      

  • Fact Dimension Attribute causing extreme slow query response

    I am using SSAS OLAP in SQL Server 2012. My server has 16 GB or RAM - it has only OLAP engine that is being used - nothing related to the relational engine. My fact table has a column called Product Status - for which I've a Fact dimension. Fact table has
    18M rows, but the Product Staus has only 2-3 distinct values. When my users bring that attribute in their analysis, the response time is very slow - 10 to 15 minutes. Can anyone share their experiences with how I can go about optimizing this?
    I tried to use the user based optimization, but the wizard suggests no aggregations.
    Thanks!
    GBM

    Hi GBM,
    For a cube of moderate to large size, partitions can greatly improve query performance, load performance, and ease of cube maintenance. Have you define partitions in your cube? Here is a good article regaridng Analysis Services Query Performance Top 10 Best
    Practices for your reference, please see:
    http://technet.microsoft.com/en-us/library/cc966527.aspx
    To troubheshoot MDX query performance issue, we can create a trace to capture some events for further investigation in this case. Please see the articles below how to troubleshoot SSAS MDX query performance issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f1f57e7b-eced-4009-b635-3ebb1d7fa5b0/how-do-i-troubleshoot-the-slow-mdx-query-performance
    http://www.mssqltips.com/sqlservertip/2886/improving-sql-server-analysis-services-query-response-time-with-msmdsrv/
    Hope this helps.
    Regards,
    Elvis Long
    TechNet Community Support

  • How Can Improve On Slow Update Query Using /*+ NO_XML_DML_REWRITE */?

    We have an update query recently brought to my attention that is running extremely slow on Oracle 11.2.0.1 against a secure file binary XML table using
    update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 .
    I am told the majority/near majority of the ~ 16 fields are updated. Also this table has numerous predefined virtual columns with fn based indexes on them.
    My first inclination was to recast this using the Oracle updatexml function. I was told, the /*+ NO_XML_DML_REWRITE */ hint would also be necessary here.
    update /*+ NO_XML_DML_REWRITE */
    <tble_name> a
    set a.object_value = updatexml(a.object_value ...).
    Last year our dba's were instructed by Oracle Support to use this hint, as the update wasn't updating any records w.o any error msgs.
    +1. Hoping to find out if anyone has run across using this hint in some capacity and what was their experience?+
    In trying to optimizie this update statement, I'll start from scratch not using the /*+ NO_XML_DML_REWRITE */ hint and will commence with using the updatexml function with setting up an xmlindex.
    +2. Hoping to receive some suggestions on creating the proper xmlindex - figuring an unstructured index. If get some good performance with the xmlindex; hoping to retire some of the virtual column usage.+
    +3. Any suggestions on living with virtual columns in conjunction with xmlindexes? See the action table definition and associated ivirtual columns and indexes. This table seems over indexed...+
    REATE
      TABLE "CROUTREACH"."ACTION" OF XMLTYPE
        CONSTRAINT "ACTN_ID_PK" PRIMARY KEY ("ACTN_ID") USING INDEX PCTFREE 10
        INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" ENABLE
      XMLTYPE STORE AS SECUREFILE BINARY XML
        TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE READS LOGGING
        NOCOMPRESS KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1
        MAXEXTENTS 2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT)
      ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
        *"ACTION_DEF_URN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                
    /action/srvContextPointer/outreachActionDefInfo/@actionDefUrn                                              
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"STAT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
    /action/@status_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        *"ACT_DEF_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
    /action/srvContextPointer/outreachActionDefInfo/@actionDefId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(20))),
        *"CORRL_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
    /action/correlationId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"STAT_RSN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                                 
    /action/statusReason'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(30))),
        *"ACT_APPNT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
    /action/actionAppointment/appointment_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        *"UPDT_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
    /action/@update_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        *"CRET_DT"* AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                             
    /action/@create_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        *"ACT_SEQ"* AS (CAST(TO_NUMBER(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                   
    /action/srvContextPointer/outreachActionDefInfo/@sequence'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2)) AS NUMBER(10))),
        *"SERVICE_DEF_URN"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";                                                         
    /action/srvContextPointer/serviceDefUrn'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(100))),
        *"ASSIGN_TEAM_CD"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
    /action/assignment/@teamCategoryCode'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"ASSIGN_STAFF_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                 
    /action/assignment/staffProfileId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"ACTION_TYPE"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03"; (::)                                                     
    declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; (::)                                                     
    local-name-from-QName(QName("http://www.cigna.com/acme/domains/actions/2010/03",/action/@xsi:type))                                                                 
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"ACTN_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/@id'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        *"STATUS"*AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/@status'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(20))),
        *"ACME_MBR_ID"* AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/actions/2010/03";/action/acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ;
    CREATE UNIQUE INDEX *"CROUTREACH"."SYS_C0014547"* ON "CROUTREACH"."ACTION"
        "SYS_NC_OID$"
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ;
    CREATE UNIQUE INDEX *"CROUTREACH"."SYS_IL0000082156C00003$$"* ON "CROUTREACH".
      "ACTION"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576
        MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST
        GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "ACME_DATA" PARALLEL (DEGREE 0 INSTANCES 0) ;
    CREATE UNIQUE INDEX *"CROUTREACH"."ACTN_ID_PK"* ON "CROUTREACH"."ACTION" (
      "ACTN_ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
      FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
      CELL_FLASH_CACHE DEFAULT) TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_STAT_RSN_IDX"* ON "CROUTREACH"."ACTION"
          "STAT_RSN"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_UPDT_DT_IDX"* ON "CROUTREACH"."ACTION"
          "UPDT_DT"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_CRET_DT_IDX"* ON "CROUTREACH"."ACTION"
          "CRET_DT"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_STAT_DT_IDX"* ON "CROUTREACH"."ACTION"
          "STAT_DT"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_MBRID_TYP_STAT_IDX"* ON "CROUTREACH"."ACTION"
          "ACME_MBR_ID",
          "ACTION_TYPE",
          "STATUS"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACT_ACTDEF_URN_IDX"* ON "CROUTREACH"."ACTION"
          "ACTION_DEF_URN"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;
      CREATE
        INDEX *"CROUTREACH"."ACTION_ACT_DEF_ID_STATUS_IDX"* ON "CROUTREACH"."ACTION"
          "ACT_DEF_ID",
          "STATUS"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
          INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE
          0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
          CELL_FLASH_CACHE DEFAULT
        TABLESPACE "ACME_DATA" ;Any suggestions much appreciated.
    Regards,
    Richard Blanchard

    odie 63
    update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 .
    This update pattern is used in the production environment and is slowing the environment down as more xml content is increased. In a new release build, this update pattern against the action table described earlier, is particularly problematic.
    Have some more information on the /*+ NO_XML_DML_REWRITE */ hint. It turns out, last year, updates statements would intermittently fail to correctly update silently failing. An Oracle Service Request was created. Over the span of about 5 mnths, Oracle determined a very low level Oracle kernel bug was the culprit. Oracle As a result of this SR, Oracle SUpport created BUG 11939507 <ORA-08102: index key not found during update on xmltable with a virtual column>. This bug is viewable on metalink. Oracle claims this bug has only been oberved on In the interim to 11.2.0.3, Oracle Support mentioned to use /*+ NO_XML_DML_REWRITE */; thus disabling piecewise update.
    Here's preface information on this bug:
    Bug 11939507: ORA-08102: INDEX KEY NOT FOUND DURING UPDATE ON XMLTABLE WITH VIRTUAL COLUMN  
    Bug Attributes
    Type B - Defect Fixed in Product Version 12.1
    Severity 2 - Severe Loss of Service Product Version 11.2.0.1
    Status 80 - Development to Q/A Platform 23 - Oracle Solaris on SPARC (64-bit)
    Created 30-Mar-2011 Platform Version 10
    Updated 13-Feb-2012 Base Bug -
    Database Version 11.2.0.1  
    Affects Platforms Generic  
    Product Source Oracle  
    Hdr: 11939507 11.2.0.1 XDB 11.2.0.1 BINARY PRODID-5 PORTID-23
    Abstract: ORA-8102: INDEX KEY NOT FOUND DURING UPDATE ON XMLTABLE WITH VIRTUAL COLUMN*** 03/30/11 12:22 pm ***
    BUG TYPE CHOSEN  =============== code   
    Component: XML Database  ======================= 
    DETAILED PROBLEM DESCRIPTION  ============================ 
    The issue happens intermittently when running a batch program with 50  concurrent sessions that involves high concurrent updates.
    DIAGNOSTIC ANALYSIS  ===================  reproducible testcase on customer dummy data reproduced by Thomas. 
    WORKAROUND?  ===========  No   
    TECHNICAL IMPACT  ================  Customer is experiencing this error which is critical to the application  because it causes a home health care provider to possibly lose a couple  hours worth of work and have to start from scratch. The condition has only  accessed concurrently from about 40 threads  
    RELATED ISSUES (bugs, forums, RFAs)  ===================================  Bug 8514561 - ORA-8102 WHEN UPDATING TABLE
    HOW OFTEN DOES THE ISSUE REPRODUCE AT CUSTOMER SITE?  ====================================================  Intermittent  
    DOES THE ISSUE REPRODUCE INTERNALLY?  ====================================  Intermittent
    IS A TESTCASE AVAILABLE?  ========================  Yes  The good news is, this bug is corrupting a virtual index column.
    I'll try test cases using the update pattern; 'update /*+ NO_XML_DML_REWRITE */croutreach.action set object_value = :1 where actn_id = :2 ' - substituting actual values for the bind variables and removing interfering virtual columns. Wil lcompare with and w/o the hint.
    This wil address your; "Where does the new values come from? Individual variables?" - and provide sample data.
    Presently, this update pattern is used 'blindly' in that when no xml relevent changes are identified, only a couple of the roughly 16 fields are updated - yet the whole document gets updated with this update pattern. When changes occur, the whole document is updated. Will work with updating 1 or 2 fields using updatexml and try the xmlexists function for the predicate.
    04/25/12 Update:
    odie 63,
    Here's a sample xml record from the action securefile binary xml table:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?><action xsi:type="AssessmentActionType" status_dt="2012-01-18T19:38:21.077Z" status="not applicable" create_dt="2012-01-17T23:10:16.173Z" id="dfdfdfdfdfddfdfdfdfdfdf" xmlns:ns5="http://www.xxxxx.ddd/exception/definition/schema/2010/01" xmlns="http://www.xxxxxx.ddd/mmm/domains/actions/2010/03" xmlns:ns6="http://www.xxxxx.ddd/mmm/domains/utility/outcome/2010/03" xmlns:ns7="http://www.xxxxxx.ddd/mmm/domains/common/2010/03" xmlns:ns2="http://www.xxxxx.ddd/mmm/messages/actions/2010/03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://www.xxxxx.ddd/mmm/domains/workforce/2010/03" xmlns:ns4="http://www.xxxxxx.ddd/mmm/domains/entitlement/2011/11">
       <acmeMemberId>abcdefghijklmnop</acmeMemberId>
       <advocacyPlanId>qrstuvwxyz</advocacyPlanId>
       <srvContextPointer>
          <serviceDefUrn>urn:coderunner:Medical:Definition:ServiceService:11111:7</serviceDefUrn>
          <outreachActionDefInfo sequence="1" actionDefUrn="urn:xxxxxxxxxx:Medical:Definition:Action:50813:2" actionDefId="xxxxxx">
             <srvContextPath>Access Profile~Why did you access the profile?~Reason for access?</srvContextPath>
          </outreachActionDefInfo>
       </srvContextPointer>
    </action>Started out using this update statement against the virtual column a.actn_id. This column is also indexed as a fbi.
    UPDATE /*+ NO_XML_DML_REWRITE */ action A
    SET A.object_value = updatexml(A.object_value,'/action/@status','triggered','xmlns="http://www.xxxx.vvv/yyy/domains/actions/2010/03"')
    where a.actn_id='888a80be-d69f-464d-b3f7-85b6209f918e';
    This statment updates fine with and w/o the hint. This hint takes away the piecewise update of the xml document and relies upon the a.actn_id virtual column.
    Then removed the reliance on the virtual column using the xmlexists fn.
    First did an alter index 'actn_id_pk invisible' to take the virtual column out of consideration by the optimizer.
    UPDATE /*+ NO_XML_DML_REWRITE */ action A
    SET A.object_value = updatexml(A.object_value,'/action/@status','triggered','xmlns="http://www.xxxx.vvv/yyy/domains/actions/2010/03"')
    where xmlexists('$p/action[@id="'888a80be-d69f-464d-b3f7-85b6209f918e'"]' PASSING object_value as "p");
    This update runs but doesn't update any columns - with or without the hint.
    Also created a basic unstructured xmlindex to remove the full table scan - which worked fine execution plan-wise.
    create index action_xmlindex_ix on action (object_value) indextype is xdb.xmlindex;Per the SR on this, the /*+ NO_XML_DML_REWRITE */ disables piecewise update and is a workaround for the bug surrounding virtual column index usage when having many concurrent sessions and updates against a table with millions of xml documents. Getting rid of the virtual column in the predicate removes the need for the workaround hint.
    My problem is This update runs but doesn't update any columns. Maybe am missing something or doing a syntax/semantic error ?
    Any assistance much appreciated...
    Regards,
    Rick Blanchard
    Edited by: RickBlanchardSRSCigna on Apr 25, 2012 12:52 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • Macbook Pro running extremely slow (log included) especially when safari is opened. How can I fix this?

    Hello
    When I open my macbook it is running extremely slow - especially once I launch safari. It can take minutes to load a page or for a page I am already typing on to even respond. I have pasted below part of my log from the application - Console. I have not included all of it as it was 7 pages long but please let me know if you need further information. Thank you for any help!
    7/01/14 4:01:54 AM           mDNSResponder[18]           mDNSResponder mDNSResponder-258.21 (May 26 2011 14:40:13) starting
    7/01/14 4:01:54 AM           com.apple.SecurityServer[24]         Session 0x5fbff962 created
    7/01/14 4:01:54 AM           com.apple.SecurityServer[24]         Entering service
    7/01/14 4:01:54 AM           kernel AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    7/01/14 4:01:54 AM           kernel AGC: 2.10.6, HW version=1.9.21, flags:0, features:20600
    7/01/14 4:01:54 AM           kernel Previous Shutdown Cause: 5
    7/01/14 4:01:55 AM           com.apple.launchd[1]           (com.apple.SystemStarter) Failed to count the number of files in "/System/Library/StartupItems": No such file or directory
    7/01/14 4:01:56 AM           kernel NVDANV50HAL loaded and registered.
    7/01/14 4:01:56 AM           kernel DSMOS has arrived
    7/01/14 4:01:56 AM           configd[14]    bootp_session_transmit: bpf_write(en1) failed: Network is down (50)
    7/01/14 4:01:56 AM           configd[14]    DHCP en1: INIT-REBOOT transmit failed
    7/01/14 4:01:56 AM           configd[14]    network configuration changed.
    7/01/14 4:01:56 AM           configd[14]    setting hostname to "Ashlee-Robertsons-MacBook-Pro.local"
    7/01/14 4:02:00 AM           com.apple.launchd[1]           (com.apple.SystemStarter) Failed to count the number of files in "/System/Library/StartupItems": No such file or directory
    7/01/14 4:02:02 AM           kernel en1: 802.11d country code set to 'DE'.
    7/01/14 4:02:02 AM           kernel en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
    7/01/14 4:02:02 AM           bootlog[53]    BOOT_TIME: 1389029506 0
    7/01/14 4:02:07 AM           blued[16]       Apple Bluetooth daemon started
    7/01/14 4:02:07 AM           com.apple.launchd[1]           (com.apple.SystemStarter) Failed to count the number of files in "/System/Library/StartupItems": No such file or directory
    7/01/14 4:02:07 AM           kernel Auth result for: e0:46:9a:18:22:10 MAC AUTH succeeded
    7/01/14 4:02:07 AM           kernel AirPort: Link Up on en1
    7/01/14 4:02:08 AM           kernel AirPort: RSN handshake complete on en1
    7/01/14 4:02:09 AM           configd[14]    network configuration changed.
    7/01/14 4:02:09 AM           /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[41]          Login Window Application Started
    7/01/14 4:02:09 AM           com.apple.usbmuxd[33]      usbmuxd-323.1 on Oct  3 2013 at 12:43:24, running 64 bit
    7/01/14 4:02:10 AM           com.eltima.ElmediaPlayer.daemon[60]      Elmedia Player: Driver launched... Error code 0
    7/01/14 4:02:10 AM           org.apache.httpd[28]            httpd: Could not reliably determine the server's fully qualified domain name,
    7/01/14 4:02:10 AM           rooksd[59]     3891612: (CGSLookupServerRootPort) Untrusted apps are not allowed to connect to or launch Window Server before login.
    7/01/14 4:02:10 AM           rooksd[59]     kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    7/01/14 4:02:10 AM           rooksd[59]     kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    7/01/14 4:02:10 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 -MacBook-Pro.local rooksd[59] <Warning>: 3891612: (CGSLookupServerRootPort) Untrusted apps are not allowed to connect to or launch Window Server before login.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 -MacBook-Pro.local rooksd[59] <Error>: kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 -MacBook-Pro.local rooksd[59] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 Ashlee-Robertsons-MacBook-Pro.local rooksd[59] <Warning>: Window Server is not available.
    7/01/14 4:02:10 AM           rooksd[59]     kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    7/01/14 4:02:10 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 MacBook-Pro.local rooksd[59] <Error>: kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    7/01/14 4:02:10 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:10 -MacBook-Pro.local rooksd[59] <Warning>: Window Server is not available.
    7/01/14 4:02:09 AM           kernel Stat: 6/6
    7/01/14 4:02:11 AM           com.apple.launchd[1]           (com.apple.xprotectupdater[31]) Exited with exit code: 252
    7/01/14 4:02:11 AM           com.apple.SecurityServer[24]         Session 0x424912 created
    7/01/14 4:02:11 AM           com.apple.SecurityServer[24]         Session 0x424912 attributes 0x30
    7/01/14 4:02:12 AM           loginwindow[41]       Login Window Started Security Agent
    7/01/14 4:02:12 AM           WindowServer[86]   kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    7/01/14 4:02:12 AM           SecurityAgent[108]  Showing Login Window
    7/01/14 4:02:14 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:14 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:14
    7/01/14 4:02:14 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:19 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:19 AM           rooksd[59]     Window Server is not available.
    7/01/14 4:02:19 AM           com.trusteer.rooks.rooksd[59]         Tue Jan  7 04:02:19
    7/01/14 4:03:01 AM           StatusMenu[152]      Attempting to monitor /Library/Application Support/WDSmartWare
    7/01/14 4:03:01 AM           StatusMenu[152]      Monitoring /Library/Application Support/WDSmartWare
    7/01/14 4:03:06 AM           rapportd[145]           *** __NSAutoreleaseNoPool(): Object 0x2816cb0 of class NSCFString autoreleased with no pool in place - just leaking
    7/01/14 4:04:26 AM           kernel Safari (map: 0x8dc80a4) triggered DYLD shared region unnest for map: 0x8dc80a4, region 0x7fff88a00000->0x7fff88c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
    7/01/14 4:07:52 AM           [0x0-0x15015].com.apple.Safari[167]                   at sun.plugin2.main.server.MozillaPlugin.getCachedSiteData(MozillaPlugin.java:504)
    7/01/14 4:07:53 AM           [0x0-0x15015].com.apple.Safari[167]       Exception in thread "main" java.lang.NullPointerException
    7/01/14 4:07:53 AM           [0x0-0x15015].com.apple.Safari[167]       2014-01-07 04:07:53.784 PluginProcess[189:903] *** __NSAutoreleaseNoPool(): Object 0x300140 of class NSCFDictionary autoreleased with no pool in place - just leaking
    7/01/14 4:09:12 AM           kernel (default pager): [KERNEL]: Switching ON Emergency paging segment
    7/01/14 4:09:16 AM           kernel (default pager): [KERNEL]: System is out of paging space.
    7/01/14 4:12:11 AM           kernel (default pager): [KERNEL]: Switching ON Emergency paging segment
    7/01/14 4:12:56 AM           /System/Library/CoreServices/CCacheServer.app/Contents/MacOS/CCacheServer[149]    No valid tickets, timing out
    7/01/14 4:13:56 AM           kernel (default pager): [KERNEL]: System is out of paging space.
    7/01/14 4:21:45 AM           kernel (default pager): [KERNEL]: Recovered emergency paging segment
    7/01/14 4:23:41 AM           Safari[192]    IPCClient: Server port 0 is invalid; looking it up again...

    Start by removing "Rapport" and "Elmedia Player," both of which are much worse than useless. If there's no improvement, post again.
    Any third-party software that doesn't install by drag-and-drop into the Applications folder, and uninstall by drag-and-drop to the Trash, is a system modification.
    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    I never install system modifications myself, and I don't know how to uninstall them. You'll have to do your own research to find that information.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickMyMac” (a hypothetical example.) First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickmymac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickMyMac.dmg and open it. There may be an application in there such as “Uninstall BrickMyMac.” If not, open “BrickMyMac.pkg” and look for an Uninstall button.
    Back up all data before making any changes.
    You will generally have to reboot in order to complete an uninstallation. Until you do that, the uninstallation may have no effect, or unpredictable effects.
    If you can’t remove software in any other way, you’ll have to erase and install OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    WARNING: Trying to remove complex system modifications by hunting for files by name often will not work and may make the problem worse. The same goes for "utilities" such as "AppCleaner" and the like that purport to remove software.

  • Macbook Pro 2011 extremely slow wondering if hard drive failure

    Hello, I want to start off by saying I'm not a huge computer guru, so that is why I'm coming here first. My Macbook Pro worked very well for a year, and then it has slowed down drastically. I've always been a windows user so mac is kind of foreign to me, but I'm trying to learn.
    Some problems I've encountered are 1. Extremely slow running whether internet related, or just an application. I have checked the activity monitor and nothing is hogging up my memory. 2. Spinning wait cursor (rainbow circle) when I try to do ANYTHING. It takes minutes to start computer once it makes it to home screen. The circle just spins for a few minutes. Even just web surfing it's there. 3. Battery drains from 100% to less than 20% in 30 minutes, which again is annoying. 4. When battery drains the fan turns on and seems to drain battery even faster. 5. I get a lot of random errors forcing shut down of programs. I have ignored this problem for two years by not using my laptop or using it very minimally, but I am going to be needing a laptop again for school and not just my iPad and phone so I was planning on taking my macbook to genius bar, but wanted to check here first since Apple is an hour away. Plus I want to be able to use the piece of equipment that I spent a decent chunk of change on. I used time machine to back up everything today. I know its not a space issue as I have 300+ free GB on hard drive. I have tried to read through similar posts, but its overwhelming so I came here to post my own question.
    I ran disc utility and there were some errors, which were able to be corrected after a couple tries. Computer still slow though when trying to do anything and running rainbow circle.
    In recovery mode I reinstalled OSX
    I was finally able to install updates after completing the above that were not able to be installed before.
    I ran etre check, this is the report that came up:
    Problem description:
    Extremely slow computer, possible hard drive failure
    EtreCheck version: 2.0.11 (98)
    Report generated November 3, 2014 9:25:29 PM EST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Late 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.4 GHz Intel Core i5 CPU: 2-core
      4 GB RAM
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      Mac OS X 10.7.5 (11G63) - Uptime: 0:6:50
    Disk Information: ℹ️
      Hitachi HTS547550A9E384 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      disk0s1 (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) /  [Startup]: 499.25 GB (357.49 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      OPTIARC DVD RW AD-5970H 
    USB Information: ℹ️
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple, Inc. MacBook Pro
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.Logitech.Unifying.HID Driver (1.2.0 - SDK 10.0) Support
      /Users/[redacted]/Downloads/LCC Installer.app
      [not loaded] com.Logitech.Control Center.HID Driver (3.5.1 - SDK 10.0) Support
    Startup Items: ℹ️
      HP IO: Path: /Library/StartupItems/HP IO
      Startup items are obsolete and will not work in future versions of OS X
    Problem System Launch Agents: ℹ️
      [failed] com.apple.coreservices.appleid.authentication.plist
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.adobe.CS5ServiceManager.plist Support
      [running] com.Logitech.Control Center.Daemon.plist Support
      [invalid?] com.luthresearch.savvyconnectmenu.plist Support
      [loaded] com.oracle.java.Java-Updater.plist Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [invalid?] com.adobe.SwitchBoard.plist Support
      [invalid?] com.luthresearch.scservice.plist Support
      [loaded] com.oracle.java.Helper-Tool.plist Support
    User Launch Agents: ℹ️
      [loaded] com.adobe.AAM.Updater-1.0.plist Support
      [failed] com.apple.CSConfigDotMacCert-[...]@me.com-SharedServices.Agent.plist
      [loaded] com.google.keystone.agent.plist Support
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Dropbox Application (/Applications/Dropbox.app)
      SavvyConnect UNKNOWN (missing value)
      Google Chrome Application (/Applications/Google Chrome.app)
      HP Scheduler Application (/Library/Application Support/Hewlett-Packard/Software Update/HP Scheduler.app)
    Internet Plug-ins: ℹ️
      Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Mismatch! Adobe recommends 15.0.0.189
      QuickTime Plugin: Version: 7.7.1
      JavaAppletPlugin: Version: Java 7 Update 67 Check version
    3rd Party Preference Panes: ℹ️
      Flash Player  Support
      Growl  Support
      Java  Support
      Logitech Control Center  Support
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          11% Safari
          3% WindowServer
          0% fontd
          0% Google Chrome
          0% ps
    Top Processes by Memory: ℹ️
      245 MB WebProcess
      206 MB System Preferences
      168 MB Safari
      99 MB mds
      82 MB Google Chrome
    Virtual Memory Information: ℹ️
      1.37 GB Free RAM
      1.57 GB Active RAM
      318 MB Inactive RAM
      1.03 GB Wired RAM
      436 MB Page-ins
      0 B Page-outs
    Basically I'm wondering if anything sticks out in this report. I was thinking it could be a possible hard drive failure. I know my computer has been dropped on the floor at least a few times. Thoughts are appreciated. Thank you for your patience.

    Eab, I feel your pain! I am replying simply to share my similar ongoing experience with my early 2011 17 inch MacBook Pro, running Mavericks with seeming ample hard drive space, [applications requiring less than 100GB, about 200GB data (total drive space of 500GB)] & 4GB RAM. (Disclaimer: I am not a wise or computer-savvy mac guru - simply a fellow traveler who has had a very similar set of problems - apps taking forever to load, rapid battery depletion & super overheated MacBook.  While I am a Genius Bar groupie, getting to the Apple store is, for me, akin to an antarctic polar expedition (i.e. problematic). Having spent endless hours struggling with a similar issue, I offer you a synopsis of my struggle/experience.
    STEPS TO DATE:
    1.Installed several memory utility programs (Daisy Disk &  MacCleanse) system
    maintenance program to regularly and thoroughly empty application caches (Adobe apps & internet browsers being tremendous hogs), identify and remove language elements and other redundant space hogs, etc.   Result: Small, but real improvement when I forced myself to perform a "scan and delete" session every second major computer run (typically about 6-8 hours in length). However, this did nothing to help the problems regularly detected when I run the Disk Utility which almost invariably demonstrates disk permissions that need to be repaired and, with increasing frequency, has demonstrated actual disk errors that require restarting and walking through a disk repair protocol. I did bring it to the Genius Bar where they kindly reinstalled Mavericks which they could do in about an hour versus the several hours that doing this at home requires.  This did identify that my RAM was, on fact, a limitation on the speed at which I could run certain apps.
    2. My next move was to install an additional 4GB of RAM. I bought the new RAM on eBay for about $90 because, with 3 kids equipped with MacBooks & iPhones, I simply couldn't afford the official Apple RAM. I even installed it myself, with the help of a YouTube video. Result: Giant improvement in speed (starting up or switching apps. If I had realized how simple it turned out to be, I would have done it well over a year ago. Some minor improvement in the overheating problem, but persistent problems with disk permissions continually requiring repair and periodic disk repairs (using Disk Utility) required.
    PLANNED FINAL INTERVENTION:
    3. I am purchasing and installing a solid state drive (ssd) and simply chucking the original hard drive, after considerable discussion with my savvier mac friends. It has become clear to me that, sadly, every hard drive has a finite life affected by a variety of factors. I am, in fact, hard on my equipment - running multiple graphic apps simultaneously, transferring massive GBs of data between my laptop, time capsule and an array of hard drives. I will let you know how it goes, but can share that the decision to get a solid state drive followed many conversations with multiple Mac guru-types (in the hope of saving you similar painful tribulations). The cost varies according to the size of the drive, but $400-$500 would buy a reasonable starting size. I am waiting for Black Friday sales, myself. Amazon (where I will likely purchase the ssd) is already offering a number of pre-Black Friday deals.  While I don't really feel like putting out that amount of cash, I reassure myself that a new drive will almost certainly solve the disk errors (with a solid state one offering more durability) & will help me prolong the life of my MacBook Pro by a couple of years hopefully. It beats buying a new Apple MacBook only three and a half years after investing close to $3k for this one!
    I am certain that more experienced forum users could point you to software that could help defragment your drive or may be able to offer other solutions. I've simply had enough of struggling with burning thighs and head-banging behavior triggered by slow performance. I hope this is helpful to you in some small way.  The war is not yet over, but I'm feeling good about the battle plan!

  • Can I use UserTransaction within a CMP Session bean?

    Basically the problem is as follow:
    I have the following method in a Statefull session bean:
    public Whatever do()
    processSomething();
    notify();
    the notify() basically notifying the client that then query for the something that was processed in the processSomething() method.
    THE PROBLEM is that the changes have not been committed yet as the do() method is not finished yet and the container has not committed the changes.
    THE QUESTION is - can I use UserTransaction inside
    processSomething to commit the changes and leave the bean as CMP? I want to leave it as CMP as there are more methods on the bean and I don't want to have to manage the transactions for them.
    Anyone has any other ideas?
    Thanks in advanced.

    Hi again,
    The EJB specs say that a stateful Session Bean with CMT is NOT allowed to use the UserTransaction; see page 361 of the EJB2.0 specification. So combining them will not (or should not) work.
    I suggest CMT+SessionSynchronization combined with using a flag to indicate whether notify should be called or not. Otherwise, you could try splitting up the bean into two beans: one with CMT and another one without. The one without CMT could use the UserTransaction and notify.
    Also, you might want to check http://www.onjava.com/pub/a/onjava/2001/10/02/ejb.html
    Hope that helps a bit,
    Guy
    http://www.atomikos.com

  • Problem Deploying EJB3 Stateless session bean in Jboss4.0.3

    Hi All,
    I have developed an EJB 3 Stateless session bean and tried to deploy in JBoss 4.0.3 , But i get the following Exception.
    javax.naming.NameNotFoundException: ejb not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.apache.jsp.session_jsp._jspService(org.apache.jsp.session_jsp:69)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:157)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    I am sorry if the question is silly..... My Remote Interface will be one like this
    import javax.ejb.Remote;
    @Remote
    public interface CityService {
         public String getCity();
    And My Bean Class will be
    import javax.ejb.EJB;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityTransaction;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    @EJB
    @Remote(CityService.class)
    @Stateless(mappedName="ejb/CityService")
    public class CityServiceBean implements CityService {
    public String getCity(){
    return "Chennai Metropolitan";
    And the client which invokes the bean will be
    InitialContext ctx = new InitialContext();
    CityService c = (CityService)ctx.lookup("ejb/CityService");
    System.out.println("Msg from Bean"+c.getCity());
    please help me out of this issue....
    Thanks in advance

    ford wrote:
    If you deploy your application in a .ear, you also can use this:
    You have to set a name to your EJBBean -> @Stateless(name = "XXX")
    The client for remote interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Remote");
    The client for local interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Local");the problem with this approach is that if you version your ears, the version numbers show up in the jndi names, and your client code will be hard coded to specific server versions.

  • EJB 3.0 Session bean transfers null Entity

    Hello all
    I am having trouble trying to transfer an Entity from a stateful session bean to a JSP. When I try an identical method with a java client within the OC4J container of JDeveloper, it works fine. However when I deploy the application to OracleAS 10.1.3, I get a null pointer on the entity.
    Please help. I have been stuck on this for about 3 weeks, and I've followed documentation to the letter as far as I can see.
    Here is the code for the JSP, the (simplified) bean and the Entity in question.
    Bean:
    import java.util.List;
    import javax.annotation.Resource;
    import javax.ejb.Stateful;
    import javax.persistence.EntityManager;
    import javax.persistence.Query;
    @Stateful(name="cart")
    public class CartBean implements CartRemote, CartLocal  {
        @Resource
        protected EntityManager manager;
        public CartBean() {
             public User getUser(String username){
                    User user = manager.find(User.class, username);
             return user;
        }The JSP:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="com.evotec.ereq.CartLocal" %>
    <%@ page import="com.evotec.ereq.User" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="java.util.List" %>
    <%@ page import="java.util.ArrayList" %>
    <%!String m_username = "pbarrett";%>
    <%!String emailAddress = "";%>
    <%
    try {
        InitialContext ctx = new InitialContext();
        CartLocal cart = (CartLocal) ctx.lookup("java:comp/env/cart");
            User user = cart.getUser(m_username);
            emailAddress = user.getEmailAddress();
    %>
    <html>
    <body>
    you are: <%= m_username %><BR>
    your email address is: <%= emailAddress %><BR>
    </body>
    </html>
    <%
    catch (Exception e){
        e.printStackTrace();
    %>and the User entity:
    import java.io.Serializable;
    import java.sql.Timestamp;
    import static javax.persistence.AccessType.FIELD;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Table;
    import javax.persistence.Id;
    @Entity(access=FIELD)
    @Table(name="USERS")
    public class User implements Serializable {
        @Column(name="CREATION_DATE")
        protected Timestamp creationDate;
        @Column(name="DISPLAY_NAME")
        protected String displayName;
        @Column(name="EMAIL_ADDRESS")
        protected String emailAddress;
        @Id
        @Column(name="USERNAME")
        protected String username;
        @Column(name="USER_ID")
        protected Long userId;
        @Column(name="USER_STATUS")
        protected Long userStatus;
        public User() {
              //JDeveloper-generated getters and setters
    }I should point out that I have established that the null pointer is not coming from the CartLocal lookup.
    Any help welcome, thanks in advance.
    Paul

    Hi,
    Thanks for the quick response.
    I have tried this approach before but when I try and deploy to the server, I get this message:
    @PersistenceContext annotation can only be used when a javax.spi.PersistenceProvider is installed.
    Is this a missing jar file? If so, which one?
    Thanks
    Paul

  • Tabs won't appear, extremely slow, does not save settings.

    For the past few months I've been experiencing a host of difficulties with Firefox. When I open a new window, the appearance is totally different from what the original window was, with the "Open a new tab" button on the left instead of the right, and the current tab that opens is not visible in the bar. When I try to change this in the settings, it just doesn't seem to take. This same problem is true for any window, secondary or otherwise. If I close everything, open a new session, change the settings to how I like them (which I have to do every time) and then close that window, nothing stays the way I set it.
    Also, the browser runs extremely slow. And when I say extreme, I mean it can take 20 minutes to open a new session. And once I start using it, it likes to periodically speed up to a normal pace for a few minutes, hours, days - it's not predictable - and then come to a crashing halt again.
    The final problem is less irritating, but equally perplexing. I have a few folders in my bookmarks toolbar that contain anywhere from 10-50 websites each, and they like to spontaneously auto-scroll to the top of the list, despite my attempts to scroll down. This problem just goes on and on until it suddenly stops for unknown reasons.
    I would really, REALLY appreciate some help clearing up these problems. Thanks!

    I see such issues my self.<br />
    It usually helps to close and restore that tab (History > Recently Closed Tabs; Cmd+Shift+T) to make the others appear.

Maybe you are looking for

  • Printing with HP LJ 1160

    Since upgrading to OS 10.5 my Laserjet 1160 has stopped printing normally. It seems the only way to get it to print is to turn the thing off and then on. Any ideas any one please.

  • LWAPP use as a L2

    Hi, I want to know whether we can use LWAPP as a layer 2 mode. If yes please provide the command and the method.

  • Datasource for plan value in cost center accounting

    Hi I would like to create query for plan value that maintain in source system via tcode KP06 (Controlling > Cost center accounting > Planning > Cost and activity inputs). Can experts please share with me which datasource to turn on in order to send t

  • How to make gif file in photoshop?

    hi there, I have online marketing site, http://www.bindo.vn. I want to change my logo to dynamic using GIF file, after 1 sec it's will change to another picture. I draw 2 logo, but I don't know how to merge it into 1 file .gif in photoshop, i'm using

  • Cannot Start Tomcat 1.1.18

    HI I have install tomcat 1.1.18(light) edition. when I try start the tomcat, the window just pop up and disappear. The tomcat could not be start. After editing the startup.bat to view the error, below is the error. I am currently using JDK1.4. Does a