DML with sqlj in app.module

I do DML with the help of stored pl/sql procedures (in packages), and I'm building a bc4j application.
I do custom doDML methods for the entities, and I would like to get use of the generated sqlj wrapper classes for my stored packages.
Is this possible, or do I have to do all in jdbc? How?
Thanx in advance:
Tib

I'm not sure I understand your question correctly, but I will try to answer as I understand it.
The BC4J framework takes care of the DML operations such as insert, update, delete, commit, etc.
If there are additional operations you want to perform, you can create custom methods on either the view object, or the application module, and then export those custom methods and call them from your client. I've included some sample code below for a custom method that calls a stored procedure, and then how I call that method from a JSP client:
package wt_bc;
// --- File generated by Oracle Business Components for Java.
import oracle.jbo.server.*;
import java.sql.*;
import oracle.jbo.RowIterator;
public class wtQueryViewImpl extends oracle.jbo.server.ViewObjectImpl implements wt_bc.common.wtQueryView{
* This is the default constructor (do not remove)
public wtQueryViewImpl() {
public int getTotalHits(String mon, String year) {
CallableStatement stmt = null;
int total;
String totalhits = "{? = call walkthru.total_hits(?,?)}";
stmt = getDBTransaction().createCallableStatement(totalhits, 1);
try
// Bind the Statement Parameters and Execute this Statement
stmt.registerOutParameter(1,Types.INTEGER);
stmt.setString(2,mon);
stmt.setString(3,year);
stmt.execute();
total = stmt.getInt(1);
catch (Exception ex)
throw new oracle.jbo.JboException(ex);
finally
try
stmt.close();
catch (Exception nex)
return total;
This method is called from my JSP client through a custom web bean:
package wt_bc;
import java.io.*;
import oracle.jbo.*;
import oracle.jdeveloper.html.*;
import wt_bc.common.wtQueryView;
public class GetTotals extends oracle.jdeveloper.html.DataWebBeanImpl {
public void render() {
int totalhits;
try
Row[] rows;
// Retrieve all records by default, the qView variable is defined in the base class
qView.setRangeSize(-1);
qView.first();
rows = qView.getAllRowsInRange();
// instantiate a view object for our exported method
// and call the stored procedure to get the total
ViewObject vo = qView.getViewObject();
wtQueryView theView = (wtQueryView) vo;
totalhits = theView.getTotalHits(session.getValue("m").toString(),session.getValue("y").toString());
out.println(totalhits);
} catch(Exception ex)
throw new RuntimeException(ex.getMessage());
null

Similar Messages

  • Error with BC App Module Passivation

    We are seeing an error when BC4J is trying to passivate an application module. It is attempting to persist its state to a databse. It works fine when deployed to the integrated WebLogic instance in JDev, and when deployed to a single standalone WebLogic instance. However, when deployed to a clustered environment, we see the following error, as though it is unable to fetch the name of the passivation table from the app module configuration.
    Partial stack trace:
    oracle.jbo.PCollException: JBO-28030: Could not insert row into table null, collection id 303, persistent id 1
    at oracle.jbo.PCollException.throwException(PCollException.java:36)
    at oracle.jbo.pcoll.OraclePersistManager.insert(OraclePersistManager.java:1920)
    at oracle.jbo.pcoll.PCollNode.passivateElem(PCollNode.java:557)
    at oracle.jbo.pcoll.PCollNode.passivate(PCollNode.java:680)
    at oracle.jbo.pcoll.PCollNode.passivateBranch(PCollNode.java:639)
    at oracle.jbo.pcoll.PCollection.passivate(PCollection.java:465)
    at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:291)
    at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:264)
    We have tried using the implicit defaults, as well as explicitly specifying the DB object names using the following settings:
    <AppModuleConfig DeployPlatform="LOCAL" jbo.project="test.MyProject" name="MyAmLocal" jbo.passivationstore="database" ApplicationName="test.MyAm">
             <AM-Pooling jbo.dofailover="true"/>
             <Database jbo.locking.mode="optimistic" jbo.control_table_name="PCOLL_CONTROL" jbo.txn_seq_name="PS_TXN_seq" jbo.txn_table_name="PS_TXN" jbo.server.internal_connection="java:comp/env/jdbc/BC4JDS"/>
             <Security AppModuleJndiName="test.MyAm"/>
             <Custom JDBCDataSource="java:comp/env/jdbc/MyDS"/>
    </AppModuleConfig>Has anyone seen this issue before and/or have any insight as to what may be causing the problem?

    Indeed I would expect the name of the table, PS_TXN, to be displayed in the message:
    JBO-28030: Could not insert row into table PS_TXN, collection id 303, persistent id 1
    Could you check the full stack trace to see if there is something relevant that would explain it ?
    Could you also add the following Java properties to your project (in the Project Properties > Run/Debug/profile):
    -Djbo.debugoutput=console -Djbo.logging.show.function=true
    and see if some errors preceding the JBO-28030 explain the issue ?
    Regards,
    Didier

  • Can Designer generate ADF Entity Objects, View Objects and Apps Module ?

    Hi all,
    On what way can Designer integrate with JDeveloper (+ ADF) ?
    Can Designer generate ADF Entity Objects, View Objects and Apps Module ?
    Thank you for your help,
    xtanto

    Designer itself has no direct integration with JDeveloper. However, there are three options. First of all, you can get a JDeveloper extension (download this separately) that lets you create a Connection to a Designer repository. From that Connection you can find modules that you defined in Designer and generate Entity and View objects for the tables and columns that you used in those modules, and an Application Module. It does not create JSPs or other user interface objects.
    Another option is to buy JHeadstart from Oracle. This contains a set of code generators and ADF extensions that include an ability to get information from a Designer repository. JHeadstart works fine for non-Designer users too, but was built by the same people who wrote Designer Headstart - they know the repository API intimately.
    The third option is to download Oracle Designer Extension Builder (ODEB) which was just recently made available. This is a product of a collaboration between Designer users from the Oracle Development Tools Users Group (ODTUG) and Oracle to extend the capabilities of Designer with user written tools and utilities. You could use ODEB to write your own generators for ADF Business Components. Or you could wait and see if someone else in the user community does this. I hope that you or whoever does such a generator will be willing to share it with us all.

  • I have continuously over the last 6 months struggled with syncing my iphone and ipod with itunes  The app continually crashes during the picture import.  AND by the way it takes 10-15 minutes before it even attempts to import photos.  The screen says impo

    I have continuously over the last 6 months struggled with syncing my iphone and ipod with itunes  The app continually crashes during the picture import.  AND by the way it takes 10-15 minutes before it even attempts to import photos.  The screen says importing photoes but doesnt try to optimize or anything for 10 minutes.  I have a 3gs with 16Gb so its not a cheap phone.  I have 10Gb free.  I have 6600 photoes.  This is very frustrating and undermines my confidence in your products.  My ipod is an ipod 4 with 16Gb also.  It does the exact same thing to it.  The last time, I had to import photoes a few at the time and with it taking 10-15 minutes each time for 6600 photos it is a long frustrating process.  But it will import every photo a few at a time.  The error message is just that itunes has stopped working.  no hint as to why. AND of course, my phone is out of use for the entire time.  You guys must not want to believe ur phones are a necessary tool...or maybe you dont want the consumer to believe it is.  I have tried to find solutions on your website as well as through other 3rd party communities.  Ultimately they were of no use.  I stumbled onto my solution by accident since Im a bit of a computer geek...a semi-geek.

    I have this issue too, I went into my Windows event viewer. (should have looked at this a year ago when this started)
    it said this
    Faulting application name: iTunes.exe, version: 11.0.2.26, time stamp: 0x51253247
    Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b8f
    Exception code: 0xc0000374
    Fault offset: 0x000ce6c3
    Faulting process id: 0x14d4
    Faulting application start time: 0x01ce194399f166ba
    Faulting application path: C:\Program Files (x86)\iTunes\iTunes.exe
    Faulting module path: C:\Windows\SysWOW64\ntdll.dll
    Report Id: 0eb3c37f-8537-11e2-9351-50465d6737de
    basically whenever I try to sync my ipod touch 4G 64GB it crashes iTunes when it begins the pictures. if im lucky ill get 4-5 on there before it stops responding. its not my system or anything im running win7x64 8GB DDR3 ram (Corsair XMS3) AMD FX Eight core processor.
    It is silly that iTunes cannot add pictures to apple devices. it shatters whatever incline I may have to buy apple products. knda like the Airport Extreem router my dad bought the new firmware, caused my router to not function... why release firmware that breaks a product. -_- <-- off topic but still

  • Need to Return immediately and commit the App Module on a different thread

    I have an action that I want to return fast (immediately) but the server processing takes longer than acceptable. The results of the operation don't matter to the page submitting it and I want it to be able to navigate away even if the operation is not complete. I want to either be able to send a non-blocking server event from the browser or on the server side start a new thread that performs the operation allowing the original thread to return immediately. The new thread would need access to an Application Module in order to commit data. How would I go about accomplishing this?
    Some thoughts
    I've tried creating a ConcurrentLinkedQueue and putting the DataControl on the que, then in the other thread I pull it off the que, process and commit the data. This works unless the page is navigated away from. Then calling dc.getApplicationModule(); returns null.
    I thought about using createRootApplicationModule in the new thread (since the new thread has no context) but don't know how that would work
    This is the code in the run method of the new thread. In this example, I'm adding data to the app module in the original thread and committing the data in a new thread.
    (like I said, it works most of the time.)
    Object[] req = (Object[])que.poll();
    DCDataControl dc = (DCDataControl)req[0];
    try{
    ApplicationModule am = dc.getApplicationModule();
    if (am != null){
    am.getTransaction().commit();
    } else{
    System.out.println("AM:null unable to commit ");
    } catch (Exception e){
    e.printStackTrace();
    finally{
    if (dc!= null){ dc.resetState();} // release app module
    }

    Thanks for the replies. I am aware of the inherent risks of running a separate thread within a managed container.
    The use case is a performance logging operation. We have a internal web app used by a network of franchises with over 1000 users. We log response time and performances statistics to the database. When the user clicks to navigate or commit data, the response time that the user experiences is logged after the page has fully rendered either through a PPR or a full submit. This is done by submitting ADFCustomEvent from javascript on the page after rendering is complete.. The event sends up the time difference from when the user first clicked to when the page was fully rendered. This information is then merged with logged events stored on the users Session that shows the name and response time of every query that was executed during the previous request. Depending on the page this could be up to half dozen to a dozen or more queries. The logging operation as experienced by the browser is generally fast (<200ms) but sometimes can be as long as a second or more when the database gets busy. A half second is too long as makes the app appear sluggish if the user can't type or click immediately after the page has finished rendering. The logged data is aggregated so we know exactly how much of the page load was due to a slow browser/network, how much was database time, webservice call time, etc... If it's due to a slow database we can drill down and see which query is the culprit. These performance metrics are critical to operations and are charted throughout the day so we know exactly what our users are experiencing. All of our users use a custom firefox client that we control. Using this logging framework we were able to determine that upgrading to a Firefox 4.0 based client cut browser render time by more than half a second on average. We can also tell what type of hardware the user is running so can place the blame for poor performance where appropriate. We have determined that pages render considerably faster on Windows 7 than on Windows 98 with the same hardware. We are moving the logging tables off of our exadata database to a separate box to remove that load from the application database. Since we expect the other database not to perform as well we don't want it to affect the user experience, hence the need to log asynchronously. I would like to put the data on a queue and have a background daemon process read from the queue and commit to the database. I would like the daemon thread to be able to use BC components. I would prefer not to resort to using a web service because of the inherent overhead. The logging operation is not a long operation but is of high frequency so should be as streamlined as possible. The load is spread over 6 servers with 4 JVM's each (24 weblogic instances). I know it's possible to use BC components from a plain Servlet (which runs on it's own thread) so what I want is to have something like a servlet thread that loops forever processing my logging queue.
    One other method I am investigating is using my own non-blocking ajax call that callls a servlet to perform the logging. I will need to pull out the timestamp contained within a client side ADF component along with the pages ctrl-state variable that is included with every ADF request as it uses this as the key to get to the data on the session. ADF really needs a non-blocking ADFCustomEvent for this type of request. (send and don't care about the response)
    The client component with the server listener looks like this
    <af:outputText value="#{pageFlowScope.perfClientTS}" visible="false"
    id="perfClientTSField" clientComponent="true">
    <af:serverListener type="logPerfData" method="#{perfLog.logPerfDataAction}"/>
    </af:outputText>
    The script that queues the ajax call after the page loads looks like this
    AdfCustomEvent.queue(perfClientTSField, "logPerfData", {
    typeId : typeId,
    subTypeId : subTypeId,
    responseTime1 : new String(responseTime1),
    responseTime2 : new String(responseTime2),
    openedVia: via
    true);
    I also tried calling the noResponseExpected() method on the event before queuing it but it still blocked the UI and caused an additional side effect in that the client sent two ajax requests instead of one. It somehow thought something on the client side needed to be synced with the server.
    email me and I can send a doc with more details about how our performance logging framework works.
    Edited by: Don Kleppinger on Mar 14, 2012 2:52 PM

  • ADF activation/Passivation - Nested App Modules

    Hi All,
    I have a question related to application module pooling in ADF.
    We are developing a application using adf 11.1.1.7. When we initially designed the application we have created multiple application modules around 14 app modules.
    Then we realized that database connection usage is very high as number of app modules are more.
    To reduce the database connection usage, we have combined all the application modules under one root application module now.
    The connection usage is reduced now, but I have a question on memory foot print.
    1) When multiple application modules are placed under a root, during passivation, will all the state of all nested app modules under the root is written to the PS_TXN table?
    2) If  for certain child modules passivation is not required as we don't need to preserve the state of the app modules across user requests,
    can we configure that at child app module level??

    In regards to question 2, the VOs have a tuning option "Passivate State" which is set on by default which you can turn off.  Please read the associated documentation around this option.
    It's highly recommended you test your application after making this change for any impacts it may have, by doing a round of regression testing with jbo.ampool.doampooling=false.  Note however that option is not supported in production, so ensure to set it back to true.
    CM.

  • "Application module  is not a root app module but has no parent"

    This is to follow up on my answered question on rootAN substitution
    Re: "login session has expired" after am substitution
    I am working on an OAF extension.
    I have a new LOV region. I extended (to be substituted) the seeded VO, call it xxVO. And I have three custom methods using this xxVO that are called from processFormRequest of my controller which extends the seeded controller.
    So putting these methods in rootAM and AM substitution didn't work as some folks pointed out.
    So I created xxAM (extends root AM), put xxVO in xxAM’s data model and put my methods in xxAM, set this xxAM as AMDefinition for my custom LOV region.
    In my controller I do
    OAApplicationModule xxAM = new xxprg.oracle.apps.icx.por.req.server.xxprgRequisitionAMImpl();
    But I am getting
    => oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    at
    xxAM.invokeMethod("handleChangeRequester", parameters);
    I found a few posts on the same topic. One advise was to not instantiate ‘new’ AM but do something like this
    Xo2cAcctOviewExtAMImpl amExt = (Xo2cAcctOviewExtAMImpl )pageContext.getApplicationModule(webBean);
    In this example I am confused about the fact that ‘getApplicationModule(webBean);’ which is used in the signature of the processFormRequest will return a ‘rootAM’, is this correct?
    There was another workaround mentioned in other posts to not use xxAM at all but build a class to mimic an xxAM passing all needed values that custom methods require. In which case how(or better where) do I instantiate xxVO since now xxVO won’t be part of any AM data model?
    Can someone please clarify.
    Thank you
    Anatoliy

    Pratap,
    Thank you for the response.
    The reason I need to use new xxCO on the page is this.
    Seeded page CheckoutLinesPG.
    It has advanced table on it where every column has it's one external region.
    The new LOV region xxRN is put on a page also under this table new column.
    1. When a requester (seeded region on the seeded page) is changed then my xxLOV should reflect the change and be populated according to what is selected in the Requester LOV.
    2. When one-time address is added (another seeded region on the seeded page) my xxLOV should be disabled, when one time address taken out - enabled again.
    So xxCO should apply to the whole page.
    The VO behind advanced table PoRequisitionLinesVO is extended with 2 additional attributes and will substitute, the new xxVO is under xxAM data model.
    All works fine with my methods in the seeded RequisitionAM which I get a handle to in the xxCO. But I don;t know how to get the handle to the xxAM if I put my methods there.
    Thanks,
    Anatoliy
    P.S. just fyi - I know it is not the recommended approach but what I did for now I put all calls into the controller - in the controller I can get a handle to root AM, through that I am getting a handle to xxVO which (!) is substituted during runtime with my xxVO. But if you can figure out how to get a handle to xxAM in my case it will be great.
    Edited by: asmirnov on Mar 24, 2009 2:04 PM

  • Transient VO error when app module pooling shut off

    Hi,
    I am using JDev 10.1.3.3.0 to build an application with ADFBC and JSF.
    I am trying to test the application with the app module pooling turned off.
    There is one failure I am trying to focus on an solve. What I am trying to is to populate Transient VO xyz, navigate to a dialog page using dialog: where the contents of xyz should be displayed in an af:table.
    When AM Pooling is turned on, I see the data.
    When AM Pooling is turned off, I have the right number of rows in the table, but I every table cell contains no data. Its like the binding layer does not restore.
    Could someone explain why this is the case?
    Michael F.

    If memory serves, some people had a similar problem with ML.  See if this helps: https://discussions.apple.com/thread/4156827

  • Why there is spaces between Web App module listings on a web page?

    Why there is spaces between Web App module listings on a web page?
    Here is the web page:
    http://www.mazine.com/test/testpage.htm
    And here is the CSS code:
    http://www.mazine.com/test/css/tablestyle.css

    I only used Photoshop for the layout.  Then I created web-safe images for everything that I used for Dreamweaver.  I uploaded the images to the internet and then image sourced them into the code so that they will be viewed properly in the correct circumstances.  I haven't used HTML since about 2004 and I wasn't very good then.  I've just been thrown back into it and I'm pretty much learning as I go.  This is my second attempt because I wanted to make the newsletter more eye-catching.  My first one is very basic and without a background image at all and that looks fine in pretty much all email clients.  I tested it with Litmus.  All except for Windows Live Mail, where the images didn't act as links but as static images.  It works fine with the others I tested manually.  Those being Gmail, Yahoo and AOL.  I will try the display:block and get back to you.  Thanks for your suggestions.

  • What's the best practice to get App Module on Jdev 10.1.3 using Struts/ADF?

    Hi,
    I read Mr. Muench's post stating that the best way to execute an App. Module method is to make the method part of the client interface and then drag and drop it on a form as a button ...
    In another post Muench says that a another way to get the App Module is using getDataProvider() method, I tried and found that this worked in:
    // standard event handler interface
    // on PageController class
    public class MyFormPageController extends PageController
    public void onUpdate(PageLifecycleContext ctx)
    AMServImp am;
    am = (AMServImpl)ctx.getBindingContext().getDefaultDataControl().getDataProvider();
    am.myMethod( ... );
    am.getTransaction().commit();
    I really like the second option because is closer to what I used to do in 10.1.2 with an event handler receiving DataActionContex parameter. Besides, is not clear to me in the former method with the drag and drop how the form inputs are assigned to the method parameters ....
    I would like to know however what is the best way and why ?
    Any comments ?
    -OM
    Message was edited by:
    omar71

    According to JSR 227, which ADFm is implementing, the view/controller portions of your application aren't really supposed to be touching the business services, or even the data controls, at all. They're supposed to do all model manipulation entirely through the databindings.
    This is just another bit of "code separation"--much like MVC code separation--that should make the application a bit easier to maintain. Your application module could change dramatically--maybe even be replaced by an EJB session bean--and all you have to do is change the .dcx file and your page model files, rather than searching through your code. Maintainability and readability is the advantage here; I don't think there could possibly be any slowdown by calling ctx.getBindingContext().getDefaultDataControl().getDataProvider(), since that's what the bindings would do anyway.
    Well, of course there's the "ADF supports going this way declaratively", which is not to be sneezed at as an advantage.
    As to how to put the form values in to the method binding: Look up the <af:setActionListener> tag (e.g., using full-text search in the help). You can nest that into your commandButton or commandLink tags and use it to set method parameters.
    Best,
    Avrom

  • Nesting App Modules from ADFLibs - jdev 11.1.2.3

    Hello:
    I have a dashboard application with 6 tabs. On each tab is a bounded task flow from an ADFLib. Note: each BTF has its own App Module.
    In the Master DashBoard App,  the ADFLibs BTF's are dropped as regions in each tab. The Master App has its own application module and I want to nest each of the BTF App Modules under the single App Module in the Master app.  The reason is that each tab of the application currently creates a seperate DB connection. I want the Master App to only create one DB connection for the entire application.
    In the resource pallet, I can see the App Modules from the seperate ADFLibs, and I have added these App Modules to the Master Project, but the newly added AM does not display under the Master App Module for me to nest. (in App Module ->- Data Model --> Application Module Instances)
    How can I nest multiple AM's from ADFLibs under a single Master App Module?  ( the AM from ADFLibs do not display in Application Module Instances in the Master App)
    Thanks

    Have I added the application Modules to the Master Model?
    Answer:
    In the Master, In the Resource Pallet, I highlighted the Application Module in the ADFLibs (from Subsystem), right clicked and selected Add to Project. But this did not make the App Module display in the Master App Module Application Module Instances. (Note: my subsystem adflibs are deployed from ViewController with dependency on Model. I tried to hightlight App Module above and add to Model Project of Master in above) This caused WebLogic to fail to deploy.
    What is the correct way to add an App Module from an ADFLIb subsystem and add the AM to the Master App so it displays in the Master App Module Application Module Instances?
    All subsystems should use the same connection and all subsystems are set to No Controller Transaction and Share data controls with calling task flow is checked for all subsystem.
    More testing revealed:
    One thing to note:   each of my subsystem, a deployment profile was created on the ViewController with dependency on its Model project.  When I added the subsystem project above to add the AM, I adding the App Module from the adflib to the Model project of the master. This caused WebLogic to fail during deploy.
    So I tried another test. In the subsystem, I created another deployment profile, on just the Model project and created an adflib. I added this new adflib to the Model project of the Master. The App Module from the subsystem now shows up in the Application Module Instances. (which I selected and moved over to the right to nest under Master App Module.  This time the application ran, but still have one connection per tab.)
    Do you create ADFLibs with a deployment profile on the VC with dependancy to the Model Project?  Or do you create two seperate ADFLibs for subsystems, one for VC project only and one for Model project only?
    Thanks for the help.

  • App module view object row currency and task flows

    Hello -
    Using JDev 11gR1. My application uses ADF Rich Faces with ADFBC.
    I have case where I want to
    a. select a row in a table based on a view object
    b. hit a button to invoke a method in an application module.
    c. in the app mod method, call getMyViewObject().getCurrentRow() to get the row selected by the user
    d. "do something" with the row
    In 10.1.3, this worked fine.
    In 11gR1, I am having problems:
    1. The above situation works fine if I have a regular page.
    HOWEVER,
    2. The above situation does NOT work if my table is in a page fragment in a task flow. (The getCurrentRow() returns NULL.)
    For case #2 I've checked the following:
    * verified that the selectedRowKeys and selectionListener attributes were set on the table in the page
    * verified that I'm using the correct app module instance (I have nested application modules).
    * experimented w/various transaction and data control scope settings in the task flow definition.
    So... from those details is there something obvious I am doing wrong? It looks like cases #1 and #2 above use different row set iterators. Is there a way to grab the correct row set from within my app module method? Does this have something to do with the data control scope defined by the task flow? (For 11g do I need to "rethink" sticking logic in the app module and instead placing it within a managed bean get access to my ADFBC objects via the bindings layer?)
    Thank you for reading my question,
    -- Scott

    See this article for View Object tuning tips:
    http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
    Are you planning to use this AM as a nested AM inside other application modules?
    If you don't the "selection AM" will have its own, separate database connection/transaction.
    If you do, it will share connection, transaction with its containing "root" AM.
    It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

  • Separate App Module, View Object based on Select not EO: Best practice?

    Hi,
    I have a list of base tables(parameters) that are used everywhere in my application for selection components (List, Combo, Radio).
    I'm considering creating a separate app module with a view object based on query for each table.
    I have created a BaseTableAM application module for managing those tables, Entity objects and View Objects in update mode.
    Those tables are rarely changed.
    Example of table:
    ItemType
    item_type_id = primary key
    name = description
    In the BasetableAM:
    ItemTypeEO entity object
    ItemTypeVO updateable view object based on related entity object.
    Now in my project I will create combo boxes for selection of the item_type_id.
    Separate application module:
    SelectionViewAM composed of View Objects based on Select statements and not on Entity Objects.
    Example of view object ItemTypeViewVO:
    SELECT ItemType.ITEM_TYPE_ID,
    ItemType.NAME
    FROM ITEM_TYPE ItemType
    All view objects in this application module will be read-only and for selection only.
    By basing all those View Objects on select statements not based on Entity Objects I suppose there will be no locking and "value changed" management => less overhead.
    Is this a good practice?
    Being read-only I could have based those View Object on Entity Object with flag updateable set to no, what would you recommend?
    By creating a separate Application Module for those selection view objects, I know that update will not be possible.
    Thank you for your advice.
    Frederic

    See this article for View Object tuning tips:
    http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
    Are you planning to use this AM as a nested AM inside other application modules?
    If you don't the "selection AM" will have its own, separate database connection/transaction.
    If you do, it will share connection, transaction with its containing "root" AM.
    It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

  • Accessing an app.module's client interface methods in other app module

    Hi all,
    We are developing an application with number of projects (one for each module). We have got a common project with an application module, entity and view objects which are common for the entire application. For reusability, this common project is shared in session scope since most of them are of static nature.
    In the shared application module's implementation class, a common method has been included that will be used for data filtering by constructing/appending where clauses in a particular application scoped view object. This method has been exposed as client interface method so that other projects can make use of it. The common project is compiled as an ADF Library jar for accessing it in other projects.
    For accessing the exposed client interface method, from the view controller layer, we can include its reference in the page definition file and can execute the method from a managed bean by finding the operation binding from the page definition. But, in case if we wish to access the method in another model project, we could not do so.
    Now, my questions are:
    1. Is it the correct location(Shared App Mod. Impl) for including the logic to filter the data?
    2. Is it possible to access the app. module impl method in another project's impl classes (Let it be entityImpl or viewObjectImpl or viewRowImpl or AppModImpl) ?
    3. If it is possible, how it has to be done?
    Thanks and regards,

    Strange, the same question here {thread:id=2187487}
    Timo
    Edited by: Timo Hahn on 08.03.2011 12:02
    @john You beat me agian

  • BC4J, JSP, accesing a remote app module deployed as an 8i EJB session bean

    hi everybody,
    i am reposting this question since the thread went somewhat off-topic ...
    i have successfully deployed my Jdev 3.2 developed app module to my remote 8.1.7 db server as an EJB session bean
    i am able to test it via the Business Components Tester ...
    i am also able to test it from my wizard-generated Business Components JSP App using DataWebBeans ...
    but when i try to access it from a JSP data tag page I get the following error:
    Excepcisn:
    javax.servlet.jsp.JspException: JBO-28300: Piggyback read error
    void periodoswebtags_html.PeriodoView_Browse._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.jsp.app.JspApplication.dispatchRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void oracle.jsp.JspServlet.doDispatch(oracle.jsp.app.JspRequestContext)
    void oracle.jsp.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void oracle.jsp.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void oracle.lite.web.JupServlet.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.MimeServletHandler.handle(oracle.lite.web.JupApplication, java.lang.String, int, oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupApplication.service(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.JupHandler.handle(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    void oracle.lite.web.HTTPServer.process(oracle.lite.web.JupRequest, oracle.lite.web.JupResponse)
    boolean oracle.lite.web.HTTPServer.handleRequest(oracle.lite.web.JupInputStream, oracle.lite.web.JupOutputStream)
    boolean oracle.lite.web.JupServer.handle(oracle.lite.web.JupInputStream, oracle.lite.web.JupOutputStream)
    void oracle.lite.web.SocketListener.process(java.net.Socket)
    void oracle.lite.web.SocketListener$ReqHandler.run()
    and the JBO-28300 error is undocumented ... :(
    i have included a library containing the <mybcs>CommonEJB.jar and <myappmodule>EJBClient.jar files into my JSP projects
    the JSP data tag page is a wizard-generated trivial browse page
    TIA,
    p

    hi everybody,
    just fixed ... :) ...
    i added the following libraries to my JSP data tag project and everythig works fine ...
    Oracle XML Parser 2.0
    JBO Runtime
    SQLJ Runtime
    HTH,
    p

Maybe you are looking for

  • Accessing PL/SQL table in SQL query

    Hello, Is it possible to use plain SQL to query PL/SQL table? In my case this table is returned by UTL_HTTP.REQUEST_PIECES function, which is defined as: create or replace package utl_http is type html_pieces is table of varchar2(2000) index by binar

  • My FlashDrive is no longer listed under my Computer, nor does its LED light once plugged in to a USB port.

    Hi, The FlashDrive was listed under my Computer once plugged in to a USB port of either a computer of mine. It was working well yesterday with all my Computers, HP laptop with a USB 3.0, 2.0.(Windows 7 64Bit), and with my Desktop Computer with P 4(Tw

  • Data Import from SAP R/3 to SAP MDM 7.1 without SAP PI

    Hi All, I have a requirement to import Vendor Master data from SAP R/3 to SAP MDM 7.1 on a regular basis. What are the Options available for data transfer between these two systems without any middleware(like SAP PI,etc). I checked the SAP Documentat

  • How to pass a litral string into cursor variable?

    Hi All I have a code like below: I need to select the following table,column with the criteria as such but it looks like the literal string does not work for cursor variable. I can run the SQL in sqlplus but how I can embed that in PL/SQL code?? -Tha

  • Error in mapping program in scenario

    Hi all,            here i am facing an issue which is to be fixed very urgently. please help me masters. here i am having a single source structure and multiple receiver structures. after confirming many sources i finally started my work with the hel