CreateRow,insertRow, removeCurrentRow and findByKey odities in VIewObject

I have a view object, which has rowsetlistener and i use createRow, insertRow, commit and findByKey and there are problems. The Key of the viewobject consists of to attributes. And Here is what I do:
ViewObject vo = panelBinding.getApplicationModule().findViewObject("AnyView");
vo.addListener(new RowSetListener(){ //Adding listener that will be notified on isert and delete events
public void rowInserted(InsertEvent e){
System.out.println("Inserted row with key = "+e.getRow().getKey());
public void rowDeleted(DeleteEvent e){
System.out.println("Deleted row with key = "+e.getRow().getKey());
public void navigated(NavigationEvent e){}
public void rowUpdated(UpdateEvent e){}
public void rangeScrolled(ScrollEvent e){}
public void rangeRefreshed(RangeRefreshEvent e){}
Key k = new Key(new Number[]{new Number(1),new Number(1)}); //A Full Key That will identify inserted row
System.out.println("Found Row Count at the beginning is "+vo.findByKey(k,-1).length); //At The Beginning there are no rows with such key
Row r = vo.createRow();
r.setAttribute("Attr1","1"); //Set the fisrt Attr of the Key
r.setAttribute("Attr2","1"); //Set The Second Attr of the Key
r.setAttribute("AnyOtherAttr","AnyData");
System.out.println("Found Row Count after set of attributes is "+vo.findByKey(k,-1).length); //No rows as sais javadoc
vo.insertRow(r); //The Listener has been notified about the row insertion as expected
System.out.println("Found Row Count after insertion of the row is "+vo.findByKey(k,-1).length); //One Row as should be
vo.getApplicationModule().getTransaction().commit();
// The Following 3 Problems will disappear if I use:
// vo.executeQuery();
// But if I have a lot of rows in a vo this is not a good idea.
Row[] rows = vo.findByKey(k,-1); //THE PROBLEM #1: findByKey AFTER COMMIT/POST notifies the listener about the row insertion AGAIN ???
System.out.println("Found Row Count after commit/post is "+vo.findByKey(k,-1).length); //THE PROBLEM #2: TWO ROWS ???
rows = vo.findByKey(k,-1);
rows[0].remove(); //THE PROBLEM #3: The Listener has been nitified twice about the removal of the row ???
System.out.println("Found Row Count after remove is "+vo.findByKey(k,-1).length); //And 0 rows as expected
vo.getApplicationModule().getTransaction().commit();
Any suggestions or thoughts will be appreciated.
Thanks

David:
This is a bug. I filed a bug and will fix it ASAP.
Thank you for reporting it.
A workaround would be to call executeQuery(). I know it's not ideal, but that's the easiest workaround I can think of.
Thanks again.
Sung

Similar Messages

  • CreateRow increases memory and cpu. Tomcat+ADF Faces+BC4J in JDev 10.1.3.0

    CreateRow increases memory and cpu. Tomcat+ADF Faces+BC4J in JDev 10.1.3.0.4
    My old problem is this Ineffectiveness/Inconsistency BC4J createrow in tomcat, CPU = 100%,Mem=2.2G
    I have tested my Adf Faces application with jmx in server and, in my machine, jconsole and mc4j.
    When cpu=100% and memory increases, jconsole constantly returned similar trace:
    In all trace, I see that common is:
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2203)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
    Therefore, I believe that function populateRow make infinity loop (or fuction fech make infinity loop, called populateRow), but I don’t know populteRow or fetch code.
    tomcat Version: 5.5.16
    Jdeveloper Version: 10.1.3.0.4
    Adf Business component Version: 10.1.3.36.73
    Java version: 1.5.0_05
    Please, any oracle ACE could help me?
    When cpu=100% and memory increases, jconsole constantly returned any of these trace:
    First trace
    java.net.SocketOutputStream.socketWrite0(Native Method)
    java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    oracle.net.ns.DataPacket.send(Unknown Source)
    oracle.net.ns.NetOutputStream.flush(Unknown Source)
    oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:979)
    oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:951)
    oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:448)
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
    oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:692)
    oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:258)
    oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:193)
    oracle.jbo.server.QueryCollection.hasNextInResultSet(QueryCollection.java:3014)
    oracle.jbo.server.ViewObjectImpl.hasNextForCollection(ViewObjectImpl.java:3650)
    oracle.jbo.server.QueryCollection.hasNext(QueryCollection.java:2992)
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2207)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
    oracle.jbo.server.QueryCollection.get(QueryCollection.java:1468)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2612)
    oracle.jbo.server.ViewObjectImpl.activateCurrentRow(ViewObjectImpl.java:12360)
    oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3768)
    oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
    oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1901)
    oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
    oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6555)
    com.samesi.segestion.view.backing.app.Clientes.devoluciones_action(Clientes.java:1845)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
    oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    javax.faces.webapp.FacesServlet._service_79(FacesServlet.java:197)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:595)
    Second trace
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:129)
    oracle.net.ns.Packet.receive(Unknown Source)
    oracle.net.ns.DataPacket.receive(Unknown Source)
    oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.net.ns.NetInputStream.read(Unknown Source)
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:979)
    oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:951)
    oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:448)
    oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
    oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:692)
    oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:258)
    oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:193)
    oracle.jbo.server.QueryCollection.hasNextInResultSet(QueryCollection.java:3014)
    oracle.jbo.server.ViewObjectImpl.hasNextForCollection(ViewObjectImpl.java:3650)
    oracle.jbo.server.QueryCollection.hasNext(QueryCollection.java:2992)
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2207)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
    oracle.jbo.server.QueryCollection.get(QueryCollection.java:1468)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2612)
    oracle.jbo.server.ViewObjectImpl.activateCurrentRow(ViewObjectImpl.java:12360)
    oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3768)
    oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
    oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1901)
    oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
    oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6555)
    com.samesi.segestion.view.backing.app.Clientes.devoluciones_action(Clientes.java:1845)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
    oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    javax.faces.webapp.FacesServlet._service_79(FacesServlet.java:197)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:595)
    Third trace
    java.lang.System.arraycopy(Native Method)
    com.sun.java.util.collections.ArrayList.toArray(ArrayList.java:287)
    oracle.jbo.server.ViewDefImpl.getEntityReferences(ViewDefImpl.java:547)
    oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:1730)
    oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:2151)
    oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1070)
    oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2943)
    oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2841)
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2203)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
    oracle.jbo.server.QueryCollection.get(QueryCollection.java:1468)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2594)
    oracle.jbo.server.ViewObjectImpl.activateCurrentRow(ViewObjectImpl.java:12360)
    oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3768)
    oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
    oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1901)
    oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
    oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6555)
    com.samesi.segestion.view.backing.app.Clientes.devoluciones_action(Clientes.java:1845)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
    oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    javax.faces.webapp.FacesServlet._service_79(FacesServlet.java:197)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:595)
    Fourth (and end) trace
    oracle.sql.NUMBER.toBigDecimal(NUMBER.java:715)
    oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:2080)
    oracle.jbo.domain.Number.bigDecimalValue(Number.java:551)
    oracle.jbo.domain.Number.hashCode(Number.java:431)
    oracle.jbo.Key.hashCode(Key.java:384)
    oracle.jbo.common.WeakHashtableImpl.get(WeakHashtableImpl.java:195)
    oracle.jbo.common.WeakHashtable.get(WeakHashtable.java:98)
    oracle.jbo.server.EntityCache.add(EntityCache.java:327)
    oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:1762)
    oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:2151)
    oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1070)
    oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2943)
    oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2841)
    oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2203)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2088)
    oracle.jbo.server.QueryCollection.get(QueryCollection.java:1468)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2594)
    oracle.jbo.server.ViewObjectImpl.activateCurrentRow(ViewObjectImpl.java:12360)
    oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3768)
    oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
    oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1901)
    oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
    oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6555)
    com.samesi.segestion.view.backing.app.Clientes.devoluciones_action(Clientes.java:1845)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
    oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
    oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
    oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    javax.faces.webapp.FacesServlet._service_79(FacesServlet.java:197)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:595)Tranks,

    I continued researching. When my server gain cpu and memory in Catalina.out, I can to see this output:
    Feb 28, 2008 10:25:53 AM oracle.adf.view.faces.webcache.component.UICache encodeBegin
    INFO: fragment is Facturacion.jspx:_id3
    Feb 28, 2008 10:25:53 AM oracle.adf.view.faces.webcache.component.UICache getFragmentFromCache
    INFO: fragment (Facturacion.jspx:_id3) fetch: cache miss
    Feb 28, 2008 10:25:53 AM oracle.adf.view.faces.webcache.component.UICache insertFragmentInCache
    INFO: fragment (Facturacion.jspx:_id3) insert: cached for 864000 secs
    Feb 28, 2008 10:25:53 AM oracle.adf.view.faces.webcache.component.UICache encodeBegin
    INFO: fragment is Facturacion.jspx:_id4
    Feb 28, 2008 10:25:53 AM oracle.adf.view.faces.webcache.component.UICache getFragmentFromCache
    INFO: fragment (Facturacion.jspx:_id4) fetch: cache missIn this example, I belive that user is resuming the Facturacion.jspx page. In my code I have this line:
    It’s corresponding to menu.
    I have looking this documentation:
    http://download.oracle.com/docs/html/B25947_01/web_cache002.htm
    In this documentation, first access, the cache miss, but the following times the cache could hit. . When my server gain cpu and memory I look that the following times the cache always miss in all pages. Subsequently tomcat no reply and the malicious thread, execute Armageddon trace. This behavior of the cache is strange, right?
    I’m sure that I’m making anything that fetch in queryCollection make big loop.
    I have redefining getRangeSize and CurrentRow of my CustomViewObject (all viewOjects about my applications extends CustomViewObject and CustomViewObject extends viewObject) and I looked correct rangesize (not -1). I got system.out.println(getFetchedRowCount()) in createRow and obtain 13 or 15. I belive that It’s correct.
    Another example of problematic trace is (in this case is in preparemodel):
    com.sun.java.util.collections.ArrayList.indexOf(ArrayList.java:201)
    com.sun.java.util.collections.ArrayList.contains(ArrayList.java:183)
    oracle.jbo.server.ViewRowCache.addWithCheck(ViewRowCache.java:351)
    oracle.jbo.server.ViewRowCache.add(ViewRowCache.java:409)
    oracle.jbo.server.QueryCollection.addRowToColl(QueryCollection.java:2069)
    oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2111)
    oracle.jbo.server.QueryCollection.get(QueryCollection.java:1468)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
    oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2612)
    oracle.jbo.server.ViewObjectImpl.activateCurrentRow(ViewObjectImpl.java:12360)
    oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3768)
    oracle.jbo.server.ViewRowSetIteratorImpl.getRangeSize(ViewRowSetIteratorImpl.java:627)
    oracle.jbo.server.ViewRowSetImpl.getRangeSize(ViewRowSetImpl.java:2251)
    oracle.jbo.server.ViewObjectImpl.getRangeSize(ViewObjectImpl.java:6065)
    oracle.adf.model.binding.DCIteratorBinding.initSourceRSI(DCIteratorBinding.java:1549)
    oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1420)
    oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1403)
    oracle.adf.model.binding.DCIteratorBinding.setRangeSize(DCIteratorBinding.java:2641)
    oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2484)
    oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2257)
    oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:104)
    com.samesi.segestion.view.frameworkExt.SegestionPageLifecycle.prepareModel(SegestionPageLifecycle.java:354)
    oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
    oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java)
    oracle.adf.controller.faces.lifecycle.ADFPhaseListener$4.after(ADFPhaseListener.java:331)
    oracle.adf.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:97)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:254)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Thread.java:595)Thanks,

  • Issue with createViewObjectOnEntity() and findByKey() methods.

    Good day.
    I have next entity object.
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <!---->
    <Entity
    xmlns="http://xmlns.oracle.com/bc4j"
    Name="PpRegCardEO"
    Version="11.1.1.56.60"
    DBObjectType="table"
    DBObjectName="PP_REG_CARD"
    AliasName="PpRegCard"
    BindingStyle="OracleName"
    UseGlueCode="false"
    RowClass="model.entity.PpRegCardEOImpl">
    <DesignTime>
    <Attr Name="_codeGenFlag2" Value="Access"/>
    <AttrArray Name="_publishEvents"/>
    <Attr Name="_isCodegen" Value="true"/>
    </DesignTime>
    <Attribute
    Name="PpRegCardId"
    IsNotNull="true"
    ColumnName="PP_REG_CARD_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD"
    PrimaryKey="true">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    <Properties>
    <CustomProperties>
    <Property
    Name="SequenceName"
    Value="SEQ_PP_REG_CARD_ID"/>
    </CustomProperties>
    </Properties>
    </Attribute>
    <Attribute
    Name="TaxpayerId"
    IsNotNull="true"
    ColumnName="TAXPAYER_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="ParentTpRegCardId"
    ColumnName="PARENT_TP_REG_CARD_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="RegistryCardNumber"
    IsNotNull="true"
    Precision="100"
    ColumnName="REGISTRY_CARD_NUMBER"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="FirstnameDcId"
    IsNotNull="true"
    Precision="22"
    Scale="0"
    ColumnName="FIRSTNAME_DC_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="LastnameDcId"
    IsNotNull="true"
    Precision="22"
    Scale="0"
    ColumnName="LASTNAME_DC_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="PatronymicDcId"
    Precision="22"
    Scale="0"
    ColumnName="PATRONYMIC_DC_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="Gender"
    IsNotNull="true"
    Precision="1"
    ColumnName="GENDER"
    SQLType="CHAR"
    Type="java.lang.String"
    ColumnType="CHAR"
    TableName="PP_REG_CARD"
    RetrievedOnUpdate="true"
    RetrievedOnInsert="true">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="1"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="BirthdayDt"
    IsNotNull="true"
    ColumnName="BIRTHDAY_DT"
    SQLType="TIMESTAMP"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="InvalidationDt"
    ColumnName="INVALIDATION_DT"
    SQLType="TIMESTAMP"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="PassportId"
    IsNotNull="true"
    Precision="22"
    Scale="0"
    ColumnName="PASSPORT_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="CitizenshipId"
    IsNotNull="true"
    Precision="22"
    Scale="0"
    ColumnName="CITIZENSHIP_DC_ID"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="TravelPassportExistsFl"
    IsNotNull="true"
    Precision="1"
    Scale="0"
    ColumnName="TRAVEL_PASSPORT_EXISTS_FL"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="ActiveFl"
    IsNotNull="true"
    Precision="1"
    Scale="0"
    ColumnName="ACTIVE_FL"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="UpdatedBy"
    Precision="64"
    ColumnName="UPDATED_BY"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="64"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="UpdatedDt"
    ColumnName="UPDATED_DT"
    SQLType="TIMESTAMP"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="CreatedBy"
    IsNotNull="true"
    Precision="64"
    ColumnName="CREATED_BY"
    SQLType="VARCHAR"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="64"/>
    </DesignTime>
    </Attribute>
    <Attribute
    Name="CreatedDt"
    IsNotNull="true"
    ColumnName="CREATED_DT"
    SQLType="TIMESTAMP"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    TableName="PP_REG_CARD">
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7"/>
    </DesignTime>
    </Attribute>
    <AccessorAttribute
    Name="CitizenshipEO"
    Association="model.entity.association.PpRgCrdCitizenshipFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdCitizenshipFkAssoc.CitizenshipEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdCitizenshipFkAssoc.PpRegCardEO"
    Type="model.entity.common.BaseEntityImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="PpRegCardEO"
    Association="model.entity.association.PpRgCrdParentRgCrdFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdParentRgCrdFkAssoc.PpRegCardEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdParentRgCrdFkAssoc.ParentTpRegCardIdPpRegCardEO"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    <AccessorAttribute
    Name="ParentTpRegCardIdPpRegCardEO"
    Association="model.entity.association.PpRgCrdParentRgCrdFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdParentRgCrdFkAssoc.ParentTpRegCardIdPpRegCardEO"
    AssociationOtherEnd=model.entity.association.PpRgCrdParentRgCrdFkAssoc.PpRegCardEO"
    Type="model.entity.PpRegCardEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="PpRegCardCorrespondentEO"
    Association="model.entity.association.PpRgCrdCrrspndRegCardFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdCrrspndRegCardFkAssoc.PpRegCardCorrespondentEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdCrrspndRegCardFkAssoc.PpRegCardEO"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    <AccessorAttribute
    Name="CitizenshipEO1"
    Association="model.entity.association.PpRgCrdCitizenshipIdFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdCitizenshipIdFkAssoc.CitizenshipEO1"
    AssociationOtherEnd="model.entity.association.PpRgCrdCitizenshipIdFkAssoc.PpRegCardEO1"
    Type="model.entity.CitizenshipEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="PhysPersonPassportEO1"
    Association="model.entity.association.PpRgCrdPassportIdFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdPassportIdFkAssoc.PhysPersonPassportEO1"
    AssociationOtherEnd="model.entity.association.PpRgCrdPassportIdFkAssoc.PpRegCardEO1"
    Type="model.entity.PhysPersonPassportEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="LastnameDcEO"
    Association="model.entity.association.PpRgCrdLastNameFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdLastNameFkAssoc.LastnameDcEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdLastNameFkAssoc.PpRegCardEO"
    Type="model.entity.LastnameDcEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="FirstnameDcEO"
    Association="model.entity.association.PpRgCrdFirsNameFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdFirsNameFkAssoc.FirstnameDcEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdFirsNameFkAssoc.PpRegCardEO"
    Type="model.entity.FirstnameDcEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="TaxPayerEO"
    Association="model.entity.association.PpRgCrdTaxPayerFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdTaxPayerFkAssoc.TaxPayerEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdTaxPayerFkAssoc.PpRegCardEO"
    Type="model.entity.TaxPayerEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="PatronymicDcEO"
    Association="model.entity.association.PpRgCrdPatroymicFkAssoc"
    AssociationEnd="model.entity.association.PpRgCrdPatroymicFkAssoc.PatronymicDcEO"
    AssociationOtherEnd="model.entity.association.PpRgCrdPatroymicFkAssoc.PpRegCardEO"
    Type="model.entity.PatronymicDcEOImpl"
    IsUpdateable="true"/>
    <AccessorAttribute
    Name="PpRegCardChangeCauseEO"
    Association="model.entity.association.PrePpRcrdFkAssoc"
    AssociationEnd="model.entity.association.PrePpRcrdFkAssoc.PpRegCardChangeCauseEO"
    AssociationOtherEnd="model.entity.association.PrePpRcrdFkAssoc.PpRegCardEO"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    <AccessorAttribute
    Name="PpPrintedRegCardEO"
    Association="model.entity.association.PpPrntRcPpRcrdFkAssoc"
    AssociationEnd="model.entity.association.PpPrntRcPpRcrdFkAssoc.PpPrintedRegCardEO"
    AssociationOtherEnd="model.entity.association.PpPrntRcPpRcrdFkAssoc.PpRegCard"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
    <Key
    Name="Avcon1286373792Sex000">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="AVCON_1286373792_SEX_000"/>
    <Attr Name="_checkCondition" Value="SEX IN ('M', 'F')"/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="PpRegCardCitizenshipDcIdCheck">
    <DesignTime>
    <Attr Name="_isNotNull" Value="true"/>
    <Attr Name="_DBObjectName" Value="PP_REG_CARD_CITIZENSHIP_DC_ID_"/>
    <Attr Name="_checkCondition" Value='"CITIZENSHIP_DC_ID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="model.entity.PpRegCardEO.CitizenshipId"/>
    </AttrArray>
    </Key>
    <Key
    Name="PpRegCardPk"
    PrimaryKey="true">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="PP_REG_CARD_PK"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013571">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013571"/>
    <Attr Name="_checkCondition" Value='"PP_REG_CARD_ID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013573">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013573"/>
    <Attr Name="_checkCondition" Value='"TAXPAYER_IN_SID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013574">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013574"/>
    <Attr Name="_checkCondition" Value='"REGISTRY_CARD_NUMBER" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013575">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013575"/>
    <Attr Name="_checkCondition" Value='"LASTNAME" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013576">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013576"/>
    <Attr Name="_checkCondition" Value='"FIRSTNAME" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013577">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013577"/>
    <Attr Name="_checkCondition" Value='"SEX" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013578">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013578"/>
    <Attr Name="_checkCondition" Value='"BIRTHDAY_DT" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013579">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013579"/>
    <Attr Name="_checkCondition" Value='"BIRTH_ADR_ID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013580">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013580"/>
    <Attr Name="_checkCondition" Value='"PASSPORT_ID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013581">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013581"/>
    <Attr Name="_checkCondition" Value='"CITIZENSHIP_ID" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013582">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013582"/>
    <Attr Name="_checkCondition" Value='"ACTIVE_FL" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013583">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013583"/>
    <Attr Name="_checkCondition" Value='"CREATED_BY" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="SysC0013584">
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C0013584"/>
    <Attr Name="_checkCondition" Value='"CREATED_DT" IS NOT NULL'/>
    <Attr Name="_isCheck" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="uk_PpRegCardEO">
    <DesignTime>
    <Attr Name="_isUnique" Value="true"/>
    <Attr Name="_isNotNull" Value="true"/>
    <Attr Name="_DBObjectName" Value="UK_PP_REG_CARD_EO"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item Value="model.entity.PpRegCardEO.PpRegCardId"/>
    </AttrArray>
    </Key>
    <Key
    Name="PpRgCrdBirthAdrIdFk">
    <DesignTime>
    <Attr Name="_referencedKey" Value="ADDRESS_TREE_PK"/>
    <Attr Name="_isForeign" Value="true"/>
    <Attr Name="_DBObjectName" Value="PP_RG_CRD_BIRTH_ADR_ID_FK"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="PpRgCrdCitizenshipIdFk">
    <DesignTime>
    <Attr Name="_referencedKey" Value="CITIZENSHIP_PK"/>
    <Attr Name="_isForeign" Value="true"/>
    <Attr Name="_DBObjectName" Value="PP_RG_CRD_CITIZENSHIP_ID_FK"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="PpRgCrdParentRgCrdFk">
    <DesignTime>
    <Attr Name="_referencedKey" Value="PP_REG_CARD_PK"/>
    <Attr Name="_isForeign" Value="true"/>
    <Attr Name="_DBObjectName" Value="PP_RG_CRD_PARENT_RG_CRD_FK"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <Key
    Name="PpRgCrdPassportIdFk">
    <DesignTime>
    <Attr Name="_referencedKey" Value="PP_PASSPORT_PK"/>
    <Attr Name="_isForeign" Value="true"/>
    <Attr Name="_DBObjectName" Value="PP_RG_CRD_PASSPORT_ID_FK"/>
    </DesignTime>
    <AttrArray Name="Attributes"/>
    </Key>
    <ResourceBundle>
    <PropertiesBundle
    PropertiesFile="model.RG-01Bundle"/>
    </ResourceBundle>
    </Entity>
    In my application module I'm creating view object based on this entity object:
    ViewObject regCardVO =
    appModuleImpl.createViewObjectOnEntity("RegCardVO",
    "model.entity.PpRegCardEO");
    Then I want to find view object row by key.
    Row[] foundRegCards = regCardVO.findByKey(new Key(new Object[] {new Number(1)}), 1);
    But I have an exception: java.sql.SQLSyntaxErrorException: ORA-00904: "PPREGCARDEO"."PP_REG_CARD_ID": invalid identifier .
    The reason of exception in wrong SQL query that ADF-BC generates for method findByKey. The query is next:
    SELECT
    PP_REG_CARD_ID "PpRegCardId",
    TAXPAYER_ID "TaxpayerId",
    PARENT_TP_REG_CARD_ID "ParentTpRegCardId",
    REGISTRY_CARD_NUMBER "RegistryCardNumber",
    FIRSTNAME_DC_ID "FirstnameDcId",
    LASTNAME_DC_ID "LastnameDcId",
    PATRONYMIC_DC_ID "PatronymicDcId",
    GENDER "Gender", BIRTHDAY_DT "BirthdayDt",
    INVALIDATION_DT "InvalidationDt",
    PASSPORT_ID "PassportId",
    CITIZENSHIP_DC_ID "CitizenshipId",
    TRAVEL_PASSPORT_EXISTS_FL "TravelPassportExistsFl",
    ACTIVE_FL "ActiveFl",
    UPDATED_BY "UpdatedBy",
    UPDATED_DT "UpdatedDt",
    CREATED_BY "CreatedBy",
    CREATED_DT "CreatedDt"
    FROM PP_REG_CARD
    WHERE (PpRegCardEO.PP_REG_CARD_ID = ?)
    We can see that in 'FROM' section table specified without alias, but in 'WHERE' clause the 'PpRegCardEO' alias is used with column name.
    That is the why I have an ORA-00904 error.
    Can anyone tell me is it possible to fix this problem ?

    Hi,
    I agree it's not expected, but I have no experience with this construction.
    My first reaction is to avoid such constructions. One, because it's not very transparent. Two, because it's a waste of resources because the ViewObject has already been created. And third because it seems you have less control on the object. If you have no other option, maybe you could use createViewObjectFromQueryStmt.
    However, it should be possible to bundle business components in an ADF library and import that one in the project that uses these BC's. This allows normal usage of these viewobjects in applicationmodules. I think this is the recommended approach.
    Ciao
    Aino

  • Approach - createrow()/InsertRow() confusion..??

    Requirement scenario –
    Create or update employee record (based on empEO/VO)
    Within the emp details page there is a region attached to custom db table which asks for adding dependants. It’s a simple table, with “add new row” button. This is attached to depEO /depVO
    While updating emp record and adding a new dependant, creation of new row works correctly, but while creating new emp record, it gives me error – execution of VO failed due to parameters not bound properly.
    - currently I am catching button action in PFR. should I also call addnewrow method from processsrequest ?
    - while in update mode – I execute the depVO to display the already existing dependants.do I need to execute the VO in create emp mode too ?I tried it , but it gives me error.
    - when adding a row to dependant table in create emp mode , if there are more than one dependants, then do I save them one by one to database, or can I do batch commit…
    - also, while creating a new employee record, should i save the emp record first and then add dependants to it, or can I add dependants to new emp record and then save the emp + dependant at one save button click ?
    Im confused, as the error doesn’t help me correct my logic.
    I am on version 11.5.10. Reading the jdev guide, I am confused as they have explained several ways to do it.
    For example – VO that does not query data DB,
    Or transactional VO
    Or VO that performs db quries
    It’s also mentioned that call the insertRow/createRow method from processRequest of the CO.
    Can someone tell how i should apporach the requirement ?
    Thanks a ton in advance.

    Hi OAF-Dev,
    I think dependents can be added to an Employee, I think when you creates new record at that time you are not getting the foreign key value(this is my doubt).
    Please share other details like how you are relating dependent with employee.
    Regards,
    Reetesh Sharma

  • [Solved] ADF BC - PL/SQL block 6 times faster than CreateRow/InsertRow

    THE ENVIRONMENT:
    - JDeveloper 10.1.2.0.0
    - Oracle 9.2.0.8.0
    THE PROBLEM:
    I found one of my pages in an ADF BC Web Application to be quite slow. After some profiling, I found a significant bottleneck in a loop which inserts approximately 270 rows in a table (only inserts into the table using insertRow). Would there be an improvement if we rewrite the transaction in PL/SQL code? To find out, I came up with the following simple test case:
    1) Table
    create table TES_FSOLICFONDO
    ID_SOLICITUD NUMBER not null,
    A_PAIS VARCHAR2(2),
    C_IDEMPRESA NUMBER,
    A_CODMONEDA VARCHAR2(3),
    C_LOCAL NUMBER,
    D_FECSOLICIT DATE,
    C_IDBILLMONE NUMBER not null,
    M_MONTO NUMBER,
    A_CREADOPOR VARCHAR2(30),
    D_CREACION DATE,
    A_MODIFPOR VARCHAR2(30),
    D_MODIF DATE);
    alter table TES_FSOLICFONDO
    add primary key (ID_SOLICITUD);
    create index IND_TES_FSOLICFONDO_01 on TES_FSOLICFONDO (C_IDBILLMONE, C_LOCAL, D_FECSOLICIT);
    create index IND_TES_FSOLICFONDO_02 on TES_FSOLICFONDO (C_IDEMPRESA, A_CODMONEDA, C_LOCAL, D_FECSOLICIT,C_IDBILLMONE);
    2) Sequence
    create sequence SEQ_TES_FSOLICFONDO
    minvalue 1
    maxvalue 999999999999999999999999999
    start with 1
    increment by 1
    cache 2;
    3) ADF BC
    - Create a Business Components Project with a BC package
    - Create new Entity Object based on the previous table, with standard wizard settings (this will be named TesFsolicfondo)
    - Create new View Object linked to previous Entity Object, with standard wizard settings (this will be named TesFsolicfondoVO).
    - Create an Application Module named AMTESAsignaSuperAvance, and include the previous View Object in the Data Model
    4) The test case
    - Create a test() method in the AMTESAsignaSuperAvanceImpl class as follows:
    public void test() throws Exception
    TesFsolicfondoVOImpl solVO = getTesFsolicfondoVO1();
    TesFsolicfondoVORowImpl r = null;
    for (int i = 0; i < 270; i++)
    r = (TesFsolicfondoVORowImpl) solVO.createRow();
    Sequence seq = new Sequence("SEQ_TES_FSOLICFONDO",this);
    r.setIdSolicitud(new Number(seq.getData().toString()));
    r.setAPais("PE");
    r.setCIdempresa(new Number(637292));
    r.setACodmoneda("USD");
    r.setCLocal(new Number(388));
    r.setDFecsolicit(new Date("2006-04-07"));
    r.setCIdbillmone(new Number(116));
    r.setMMonto(new Number(0));
    r.setACreadopor("10000003480");
    r.setDCreacion(new Date("2006-04-03"));
    solVO.insertRow(r);
    getTransaction().commit();
    - Create a test.jsp page including the following code within a scriptlet:
    AMTESAsignaSuperAvanceImpl am = null;
    try
    am = (AMTESAsignaSuperAvanceImpl) Configuration.createRootApplicationModule("cl.falabella.fpi.tes.bc.AMTESAsignaSuperAvance","AMTESAsignaSuperAvanceLocal");
    am.test();
    catch (Exception e)
    am.getTransaction().rollback();
    finally
    Configuration.releaseRootApplicationModule(am,true);
    - Create an equivalent PL/SQL block as follows:
    BEGIN
    FOR I IN 1..270
    LOOP
    INSERT INTO TES_FSOLICFONDO (ID_SOLICITUD, A_PAIS, C_IDEMPRESA, A_CODMONEDA, C_LOCAL,
    D_FECSOLICIT, C_IDBILLMONE, M_MONTO, A_CREADOPOR, D_CREACION)
    VALUES (SEQ_TES_FSOLICFONDO.NEXTVAL, 'PE', 637292, 'USD', 388, TO_DATE('07-04-2006', 'DD-MM-YYYY'), 116, 0,
    '10000003480', TO_DATE('03-04-2006', 'DD-MM-YYYY'));
    END LOOP;
    COMMIT;
    END;
    THE RESULTS:
    The PL/SQL block was executed on a standard SQL* Plus window, and the test() method within the AM was called from the test.jsp page.
    The PL/SQL block takes 1125 milliseconds in my setup, the test() method within the AM takes 6017 milliseconds, so PL/SQL is about 6 times faster in this test.
    THE QUESTION:
    Is this supposed to be this way? I want to avoid creating a PL/SQL package, I would rather use the ADF BC framework throughout the application. Would someone kindly point out any configuration issues I may have missed that will improve the BC performance?

    Hello Jan,
    Thanks for the tip, good to be born again as a name instead of a number.
    I omitted the code used for timing, but here goes:
    test.jsp:
    java.util.Date d1 = new java.util.Date();
    AMTESAsignaSuperAvanceImpl am = null;
    try
    am = (AMTESAsignaSuperAvanceImpl) Configuration.createRootApplicationModule("cl.falabella.fpi.tes.bc.AMTESAsignaSuperAvance","AMTESAsignaSuperAvanceLocal");
    am.test();
    catch (Exception e)
    am.getTransaction().rollback();
    finally
    Configuration.releaseRootApplicationModule(am,true);
    java.util.Date d2 = new java.util.Date();
    System.out.println("Time (ms) = " + Double.toString(d2.getTime()-d1.getTime()));
    PL/SQL:
    I use a tool called "PL/SQL Developer". It has a "Command Window" with a user interface which is extremely similar to SQL* Plus. After running the PL/SQL code, it reported "PL/SQL procedure successfully completed in 1.125 seconds".
    From the tool documentation:
    The Command Window
    The Command Window allows you to execute SQL scripts in a way that is very much similar to Oracle's SQL*Plus. To create a Command Window press the New button on the toolbar or select the New item in the File menu. A Command Window is created and you can type SQL and SQL*Plus commands like you are used to, without leaving PL/SQL Developer’s IDE.
    Regards
    Rodrigo

  • Create dynamic table at runtime and bind it with ViewObject

    Hi everyone.
    I have the following task.
    I need to create a multiple ViewObjects at runtime (using different constructed sql queries) and then bind ViewObjects with created (also in runtime) tables.
    Tables are to be created on PanelTabbed component. Each tab contains one table.
    So the problem - is there a way to perform this task?
    A portion of code:
    ApplicationModule am = ADFUtils.getApplicationModule("AppModule");
    ViewObjectImpl vo = null;
    if (am.findViewObject("SQLVo") != null)
    am.findViewObject("SQLVo").remove();
    System.out.println("object removed!");
    vo = am.createViewObjectFromQueryStmt("vo", "select ...");
    RichTable newTable = new RichTable();
    newTable.setVar("row");
    newTable.setVarStatus("rowStat");
    RichShowDetailItem newDetItem = new RichShowDetailItem();
    newDetItem.setText("New Detail");
    newTable.setInlineStyle("width:100%;height:180px");
    newTable.setRowSelection("single");
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    String iterBindingName = vo.getName() + "Iterator";
    JUIteratorBinding iterBinding =
    (JUIteratorBinding)dcBindings.findIteratorBinding(iterBindingName);
    if (iterBinding != null) {
    dcBindings.removeIteratorBinding(iterBindingName);
    BindingContext bcc = (BindingContext)JSFUtils.resolveExpression("#{data}");
    iterBinding =
    new JUIteratorBinding(bcc.findDataControl("AppModuleDataControl"), vo);
    String ctrlBindingName = vo.getName() + "Binding";
    FacesCtrlHierBinding clonedHierBinding =
    (FacesCtrlHierBinding)dcBindings.findCtrlBinding(ctrlBindingName);
    if (clonedHierBinding != null) {
    dcBindings.removeControlBinding(ctrlBindingName);
    =======================================
    Please, look here!
    What's the best practices to create a new FacesCtrlHierBinding?
    What a parameter _nodeBindings (type JUCtrlHierTypeBinding[]) should be?
    =======================================
    clonedHierBinding =
    new FacesCtrlHierBinding(null,
    iterBinding,
    new String[]{
    "BUILDING_ID"
    // "BUILD_NAME",
    // "FUNCTIONALITY_NAME",
    // "CITY_NAME",
    // "STREET_NAME",
    // "FLOORS"
    _nodeBindings
    dcBindings.addControlBinding(ctrlBindingName, clonedHierBinding);
    newTable.setValue(clonedHierBinding.getCollectionModel());
    for (int g=0; g < vo.getAttributeCount(); g++){
    RichColumn col = new RichColumn();
    col.setId("c" + Integer.toString(g));
    col.setHeaderText(vo.getAttributeDef(g).getProperty(AttributeHints.ATTRIBUTE_LABEL).toString());
    ValueExpression valExp =
    facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(),
    "#{row." + vo.getAttributeDef(g).getName() + "}",String.class);
    RichOutputText text = new RichOutputText();
    text.setId(vo.getAttributeDef(g).getName() + "txt");
    text.setValueExpression("value", valExp);
    col.getChildren().add(text);
    newTable.getChildren().add(col);
    newDetItem.getChildren().add(newTable);
    myBean.panelTabbed.getChildren().add(newDetItem);
    ...

    Shay, good day!
    You answer is good, but - it use only one dynamic view (and one table, iterator and FacesModel).
    I have task like topic started have - i need to create some unknows numbers of ViewObject (created by demad) and i must have a FacesModel for each created ViewObject.
    How can we do it?

  • Reading data From XML file and setting into ViewObject to Pouplate ADF UI

    Hi,
    I have following requirement.
    I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
    Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
    Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
    Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
    Thanks

    Read chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
    Section 42.7, "Reading and Writing XML"
    Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
    Timo

  • Creating Binding Between ADf input LOV and ViewObject at runtime

    I am creating binding at runtime between ADf input LOV and with attribute of ViewObject. When we create this binding at design time, following entry is added in pagedef of page:
    <listOfValues StaticList="false" IterBinding="UdfVO1Iterator"
    Uses="LOV_Udf1" id="Udf1"/>
    I am creating this binding at runtime instead of design time by creating JUCtrlListBinding object by following code:
    JUCtrlListBinding vb = new JUCtrlListBinding(rit2,ib,new String[]{"Udf1"},JUCtrlListBinding.LIST_OPER_SET_ATTRIBUTE);
    vb.setName("Udf1");
    where rit2 is RichInputListOfValue control, ib is iterator binding. but i am not finding any way to set "LOV_Udf1" which is name of LOV_Udf1. Kindly help me

    Kindly some one help me

  • ViewObjects, Jtables and custom cellrenderers

    Hi,
    I'm wondering if someone knows a solution to this type of a problem.
    I have a ViewObject bound to a Jtable. Simple enough. Now when I add a new record to this ViewObject manually (not throught the nav bar); the record is already populated, my jtable updates correctly to show that the row has been entered. Now here is the problem:
    I have a custom cellRenderer that is displaying a JComboBox. Now based on the data that is stored on our Database and what row is currently being rendered, the checkbox is either disabled or enabled. Trouble is, as soon as there become more records in the JTable than there is room on the screen assigned to the JTable, my JScrollPane's vertical scrollbar kicks in, which is good and no problems, but every checkbox for all the rows that are displayed when scrolling are disabled.
    Now the reason for this is simple. Code below.
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    boolean state = false;
    if (String.valueOf(value).equals(onValue))
    state = true;
    else if ((String.valueOf(value).equals(offValue)) || (value == null))
    state = false;
    else
    throw new IllegalStateException("warning: unrecognized value: " + value);
    JCheckBox box = new JCheckBox();
    box = new JCheckBox();
    box.setSelected(state);
    box.setHorizontalAlignment(SwingConstants.CENTER);
    if (isSelected)
    box.setBackground(SystemColor.textHighlight);
    else
    box.setBackground(SystemColor.window);
    JPanel panel = new JPanel();
    panel.setLayout(new BorderLayout());
    panel.setEnabled(table.isCellEditable(row, column));
    panel.add(box, BorderLayout.CENTER);
    if (hasFocus)
    panel.setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
    else
    panel.setBorder(emptyBorder);
    if (isSelected)
    panel.setBackground(SystemColor.textHighlight);
    else
    panel.setBackground(SystemColor.window);
    if(isDisabled(row, column))
    box.setEnabled(false);
    else
    box.setEnabled(true);
    return panel;
    private boolean isDisabled(int row, int column)
    Row aRow = tableView.getRowAtRangeIndex(row);
    System.out.println("ROW: " + row);
    if(aRow != null)
    if(aRow.getAttribute("DboType").toString().toUpperCase().compareTo("TABLE") == 0)
    if(column < 5)
    return false;
    else
    return true;
    }else if(aRow.getAttribute("DboType").toString().toUpperCase().compareTo("PACKAGE") == 0)
    if(column == 5)
    return false;
    else
    return true;
    }else
    return true;
    }else if(aRow == null)
    System.out.println("SHOULD NOT BE NULL");
    return true;
    else
    return true;
    The line:
    Row aRow = tableView.getRowAtRangeIndex(row);
    returns null!!! how can this be? Considering tableView is my ViewObject and tableView is the viewObject that is bound to the JTable? It's almost as if the JTable is increasing in size before the ViewObject has it'self added the new row to it's self and the transaction cache?
    Now before you say, "Why don't you just add DBO_TYPE to the JTable?", well because we don't want it displayed to the user. If we did this then I'm somewhat sure it would work, but we should not have to add data to the JTable just for this considering the ViewObject already stores this information, but is just not displaying it onto the screen.
    Any help?

    Haven't checked at all (it's Sunday night for God's sake!) but are we sure it's nothing to do with the fact that getRowAtRangeIndex is relative to the currently displayed rows and the row passed in from the table is absolute?
    Mike.

  • How to make selected and active a child row of a treeTable?

    Hello,
    I am inserting a new child row into a af:treeTable, disclosing it, but I can't figure out how to make it selected and active so the focus of the user to go on it.
    Jdeveloper version 11.1.2.3.0
    This is how I am inserting the child node:
    public void createLocation(RowIterator ri, Key selectedNodeKey) {
            final String locationCategoryViewDef = "model.views.LocationCategoryView";
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    Row foundRow = found[0];
                    String nodeDefname = foundRow.getStructureDef().getDefFullName();
                    RowSet parents = (RowSet)foundRow.getAttribute("LocationView");
                    Row childrow = parents.createRow();
                    //hardcoded locationId
                    childrow.setAttribute("LocationId", 434558);
                    parents.insertRow(childrow);
    }  And this is the treeTable:
    <af:treeTable value="#{bindings.LocationCategoryView2.treeModel}" var="node" varStatus="vaarr"
                  partialTriggers="gaga gag4a ga4a"
                  selectionListener="#{bindings.LocationCategoryView2.treeModel.makeCurrent}"
                  displayRow="selected" rowSelection="single" id="tt1" editingMode="clickToEdit"
                  horizontalGridVisible="true" binding="#{pageFlowScope.treeTableBean.sampleTreeTable}">
        <f:facet name="nodeStamp">
            <af:column id="c5" width="15">
                <af:outputText value="#{node}" inlineStyle="display:none" id="ot1"/>
            </af:column>
        </f:facet>
        <f:facet name="pathStamp">
            <af:inputText value="#{node}" id="ot2"/>
        </f:facet>
        <af:column id="c2" headerText="Location CategoryName">
            <af:inputText value="#{node.LocationCategoryName}" inlineStyle="font-weight:900" id="ot45"/>
        </af:column>
        <af:column id="c6" headerText="Location CATID">
            <af:inputText value="#{node.LocationCategoryId}" inlineStyle="font-weight:900" id="ot6"/>
        </af:column>
        <af:column id="cgg2" headerText="Var INDEx">
            <af:outputText value="#{vaarr.index}"/>
        </af:column>
        <af:column id="c1" headerText="Location Name">
            <af:inputText value="#{node.LocationName}" id="ot3"/>
        </af:column>
        <af:column>
            <af:panelGroupLayout layout="vertical">
                <af:commandLink id="gaga" text="addLocation" inlineStyle="color:red"
                                action="#{pageFlowScope.treeTableBean.createChildren}"
                                rendered="#{node.LocationId == null}" partialSubmit="true"/>
                <af:commandLink id="gag4a" text="delete category" inlineStyle="color:blue"
                                partialSubmit="true" rendered="#{node.LocationId == null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
                <af:commandLink id="ga4a" text="delete location" inlineStyle="color:green"
                                partialSubmit="true" rendered="#{node.LocationId != null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
            </af:panelGroupLayout>
        </af:column>
    </af:treeTable>

    Yes I did now but nothing changes. The current, selected and active row is still the parent node...
    Even I am adding AdfFacesContext.getCurrentInstance().addPartialTarget(this.sampleTreeTable); for just in case..

  • View RowSets and their iterators.

    I'd like to check my understanding of Views, RowSets and RowSetIterators.
    Each ViewObject has a built-in RowSet, others can be created.
    Each RowSet has a built-in RowSetIterator, others can be created. In particular, the wizards create one with "Iter" at the end of the name.
    ViewObjects and RowSets provide convenience methods for manipulating their built-in RowSet and RowSetIterator.
    If I ask for aViewObject.findRowSet(null) I get the default RowSet (and similarly for RowSet.findRowSetIterator(null))?
    Now if there's a ViewLink with this ViewObject as the Master, which RowSet and RowSetIterator are used to drive the detail ViewObject? Is it just these default ones or does the ViewLink somehow respond to currency changes in other RowSetIterators?
    Which RowSet(s) are affected in the detail ViewObject? All the RowSets or just the default one?
    Tony.

    Tony:
    What happens to the iterators of a Detail RowSet when
    its master's default iterator navigates?When the master navigates, the RowSet is re-executed for the new master ==> the RSIs are all reset--positioned at the slot before the first row.
    >
    If I insert a row into a RowSet, do all the iterators
    move currency (this seems to be what's happening)?It depends whether you call insertRow or insertRowAtRangeIndex. If you call the former, the currency is set to the newly inserted row. If you call the latter, the currency is not affected.
    >
    Example:
    We have a many-one ViewLink (master is many, detail
    is one) based on a foreign key in the master
    ViewObject.
    1) We create a new row for the detail ViewObject.
    2) We set the master row's foreign-key attribute to
    null.
    3) We insert the detail row.
    4) We set the foreign-key attribute in the master to
    the new detail row's primary key.
    If we omit step 2 then the detail row gets it's
    primary-key value from the master's foreign key which
    we don't want. This may be due to an association
    between the EntityObjects concerned, rather than a
    result of the ViewLink?
    Now, we have a panel with controls bound to a named
    iterator of the detail view. These controls see the
    new detail row as soon as it's inserted even though
    we don't manipulate this iterator at all. (This is
    what we want, I'd like to understand why/how it's
    happening).
    When a new row is inserted to a RowSet, events are generated (rowInserted followed by navigated). These events propagate through RSI opened on that RowSet. Controls bound to these RSIs receive the events and refresh their display.
    Thanks.
    Sung

  • How can I get the tablename from a known ViewObject?

    I have created an entity and it's default viewobject in the BC4J business components package,and I have built a applictionmodule containing an instance of the viewobject.
    Now I can use the instance's name to visit the viewobject or the entity in Jdeveloper.
    But how can I get the tablename of the entity by the viewobject instance's name ?
    Can you give me any sample statements?

    Assuming you want to do this in your middle-tier, it could go like this:
    ViewObjectImpl vo = (ViewObjectImpl)appModule.findViewObject( "<instance name>" );
    if( vo != null ) {
      // Assuming your VO is entity based.
      EntityDefImpl[] defs = vo.getEntityDefs();
      System.out.println( defs[0].getSource() );
    }If you need the name on client side, then put the code above into a method in you Application Module impl and add the method to the client-side interface.
    Sascha

  • How can I get the tablename from a ViewObject extends an Entity?

    I have created an entity and it's default viewobject in the BC4J business components package,and I have built a applictionmodule containing an instance of the viewobject.
    Now I can use the instance's name to visit the viewobject or the entity in Jdeveloper.
    But how can I get the tablename of the entity by the instance's name ?

    Hi,
    there exist a method getSource() on the EntityDefImp, which can be accessed via EntityImpl.
    Frank

  • CreateInsert and Commit in one operation

    Is there a way to CreateInsert and Commit in one operation? I just want the user to click one button to create a new record.

    Hi..
    You can try as this scenario one way is without bean class also you can with bean any way i will explain how do you do without bean
    Refresh your Data Control and say you have ViewObject name sampleVO and Application Module as AM.
    Drag and drop CreateInsert as ADF Button(DataControl --> AM -->sampleVo --> Operations --> CreateInsert),To fill data for newly created row Drag and Drop sampleVO as ADF - Form(DataControl --> AM--> sampleVo).Now want to commit this form to database for that purpose you can use Commit Operation in your Application Module Drag and Drop Commit as ADF Button(DataControl --> AM --> Operations -->Commit).Now you can successfully inserted data to DataBase using CreateInsert and Commit.

  • Af:query filter state becomes incorrect on navigating away and back to page

    Hi,
    I've added two named view criteria to my VO. One to show all records ('All Records') and one to show records created by the currently logged in user ('My Records'). I've added an af:query element on my page to allow the user to select one of these two named criteria. This all seems to work, however I've noticed I'm getting some strange behaviour when I navigate to a different page and then return to my filtered page.
    When I load the page 'All Records' shows by default, I can switch between 'My Records' and 'All Records' successfully (data set changes). However if I do the following:
    - select 'My Records'
    - navigate to another page
    - navigate back to the original page
    'My Records' is still selected (great) and the table still shows the results of 'My Records' (great), but when I now select 'All Records', I seem to be only operating within the scope of records created by the currently logged in user. So 'All Records' now shows the same as 'My Records'.
    It seems that by navigating away from then back to my page, I'm fixing whatever criteria were being applied to the VO at the time I left the page. Then all queries from that point on operate only on a reduced data-set.
    How can I stop this happening? I'd ideally like to be able to fix this without having to reset the filter back to 'All Records' whenever a user enters the page. I like the fact that the selected search is remembered, I just want All Records not become broken. I've tried pressing 'Reset' on all the queries, but this doesn't help.
    Any ideas on how what's going wrong here?
    Edited by: japher on Aug 17, 2009 3:25 PM

    There are several issues related to ADF Faces query components. One of them is that these components do not remove eventual previously applied view criterias. In fact query components keep track of last applied view criteria since current entry into the page. If you have entered the page, applied a view criteria and executed the query and after that you have switched the view criteria and executed another query, then everything is OK (since you have not left the page and it keeps track of the first applied criteria). But if you have left the page between the two query executions, then the previously applied view criteria remains applied (since you have applied it before current entry into the page) and it affects the query result.
    There are several workarounds of this problem. One of them is to include your ViewObject twice into ApplicationModule's data model - 1st one with 1st ViewCriteria pre-applied and 2nd one with 2nd ViewCriteria pre-applied - and to use two ViewObject instances in your application instead of switching ViewCriterias. Another workaround is to set custom query processing method in "queryListener" property of the query component. You have to implement a custom processQuery() method in some managed bean that clears any unnecessary applied ViewCriterias at the beginning and after that invokes the standard implementation of processQuery() method of the corresponding FacesCtrlSearchBinding. In order to be able to find the corresponding search binding within your custom method you will have to get the binding's name. You can either hard-code it within your custom method or use <af:setPropertyListener> tag to write the binding's name to the pageFlowScope, for example.

Maybe you are looking for