How to execute the SQL statement in the Application Module

Hi people
I´d would like to know how I can execute a SQL statement like "remove user" in the Module to request... prepareSession method...
I m using Jdev 10 with ADF Faces
Thank you

This is possible, but you should think twice about it.
If this can be done with an EO/VO do in this way.
If you can't do it with an EO/VO you can yourself the DB operation (ApplicationModule.getDBTransaction ()) and use a call of createStatement (...) do what you want.

Timo

Tags: Java

Similar Questions

  • How to execute a SQL statement that is stored within a SQL Table

    Hello

    If someone please help me with the following problem I would be eternally grateful

    I have a SQL statement that is stored inside a certain SQL table, I want to use this SQL statement inside my PL/SQL procedure.

    Thought a simple solution was to get the SQL statement in a table, and then run it, but how could I do so exactly with PL/SQL? I only started to play with PL/SQL in the last days.

    Thanks in advance!

    This is what it looks like more or less:

    Display result for:

    ---------------------

    SELECT TRIM (OBJ_VALU_TXT)

    OF OBJ_VALU_DOC

    WHERE TYPE_OBJET = 'FLD '.

    AND OBJECT_CODE = 15443

    AND OBJ_VALU_CD = 'CAB '.

    ORDER BYDOC_SEQ_NO

    00001

    ------------------------------------------------------------------

    SELECT

    VALUE (MAX (RECEIPT_NO) + 1,: OUT-COMP-FACTOR)

    THE FRONT DESK

    WHERE (RECEIPT_NO BETWEEN

    (: OUT-COMP-FACTOR AND: OUT TO A NUMBER) OR

    (RECEIPT_NO >: OUT-COMP-FACTOR AND)

    (: OUT-TO-NUMBER = 0)

    Here's a demo of your condition.

    create table t (col1 varchar2 (200));

    table created

    insert into values t ('select * from double ');

    1 row inserted

    declare
    v_col varchar2 (200);
    v_val varchar2 (200);
    Start

    Select col1 in t v_col;

    run immediately v_col in v_val;
    dbms_output.put_line (v_val);
    end;

    -----
    X

    Use in the clause, you can use as many variables as needed. But the basic approach remains the same.

    But storage in DB SQL is not an efficient design.

    Ishan

  • How to get the Application Module - ADFC-10001

    Hello world

    I use jdev 11.1.1.7 version. In my project, I have a form that is rendered in the portal by clicking on a link. When I click on the link, it opens the form for the first time, if I close the form and try to open it again, it works but if I close and try to open it for the third time, it does not work and it gives an error associated with rendering after debugging the data control. , I realized that somehow, it cannot find the data for the third time control.

    If I use the code to get the below request form

    BindingContainer DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCDataControl cDataControl = bindingContainer.findDataControl("ComplianceModuleDataControl");

    or if I use iterator

    BindingContainer links = getBindings();

    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("CriminalHistoryVO1Iterator");

    RowSetIterator rsi = dciter.getRowSetIterator ();

    It gives an error like this

    javax.faces.FacesException: javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001: failed to instantiate the class "com.metro.PreQualComplianceBean".

    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)

    at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)

    Caused by: javax.faces.FacesException: javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001: failed to instantiate the class "com.metro.PreQualComplianceBean".

    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:261)

    at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)

    at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:513)

    at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:782)

    at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)

    Somehow the iterator returns null for third click.

    In summary, in my third click, I can't make the data control, which may cause this problem. This is a really urgent situation. I'll appreciate any help.

    Thank you

    Melis,

    Hi user

    the first thing you should not write these methods to the constructor, instead create method to expose layer model through client and use in taskFlow as default activity

    It is not recommended to use the code in the constructor of beans as if there is that no bean exception will not be instantiated

    Why are you applicationModule at the bean? no need for this just write your code in the AMImpl class and use through the link layer

    It's the best coding practice, you have to try

    Thank you

  • Satellite U400 - 15G - overheating-how to change the cooling module?

    Hello

    My Satellite U400 15 G is overheating (CPU up to 70 ° c). NEITER in Google nor in the manual, I can find a statement, how to open and change the cooling module. (I'm only trying to change mine, because garranty is already gone)

    Does anyone know how to open the laptop/notebook and how to change the cooling module?

    Thanks in advance

    Post edited by: bla42

    Before you continue just a matter of discussion:
    Let's say I help you with this and damage you something or broke a plastic part, what you will do in this case?
    I mean you probably know that you can get a few small important parts as separate components.

    By the way: this description may be provided in the manual. Disassembly of the laptop is authorized personal only. When you buy a new car it is no description how to disassemble the entire engine, right?

    By the way: Jeanine's right. See this page. There are many useful tips on laptop disassembly procedure.

  • OMSA on windows server 2012, "Execute the application" does not not under alert management action alert

    Hello, please help

    I'm working on this guide: xyfon.com/.../setup-email-notifications-dell-openmanage

    It works for my windows 2003 server with open handle to this topic. But I'm unable to open manage to send an alert to a system windows 2012. It works in command line, but not the part of absolute path 'Execute the application' the management of alerts. I tried all the suggestions in the thread. Anyone know if this works for the win2012 or how to make it work?

    Thank you
    Fred

    Ah, in fact it seems that it may work now. Have to do with how I was testing the temporary disability or maybe I have changed some things between tests. I tried a few times over, and it seems to have triggered the email which will now be sent

    The absolute path to the application, I used is:

    C:\DellSMTPNotify\DellSMTPNotify.exe 3

    without the quotes around it.

    Thank you

  • Tecra R10 - how to remove the memory module?

    Hello!

    How to remove the memory module?

    Get the following message and for me, it means that one of the modules is broken:

    Out of memory error
    Address = H 00034000
    Read Date = H 28034000
    Write data = H 00034000

    For my opinion, the computer should start up again when I remove the memory broken slice?

    The Australia has soon

    Hello

    You can easily remove the memory modules.
    I think that the Bay is placed at the bottom of the unit.
    Remove the screw that is blocking the Bay, and you will have access to the module.

    Here is a video of how do this on another Satellite L500 laptop. But the procedure is not very different on Tecra R10
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=81

    I hope this helps a little

  • NB200 - how to find the 3G module for it?

    Hello

    Pls how I find the 3G module in my NB200 - PLL20E?

    Thank you

    Hello

    What do you mean exactly?
    You want to upgrade your NB200 with a card 3G?

    If yes then you must make sure that your NB200 could be improved using this card.
    I'm not sure if this is possible.

    But don t give up boyfriend Toshiba authorized service partner in your country could provide details.
    Guys might be able to tell if this is possible and could provide a good 3G module

    If you get more details please share with us!

    See you soon

  • How to view the application menu in the app?

    Hi all

    Does anyone know how to view the application menu in the app?
    The ultimate effect is that when you see the user swipe down from the top of the screen, the menu of the application.

    Thank you very much.

    Please check the recent threads or duplicate search before posting questions: http://supportforums.blackberry.com/t5/Cascades-Development/Application-Menus/td-p/1785653

  • How to hide the application programmatically?

    Hello

    How to hide the application by programtically?

    Thank you.

    Just to clarify this point, here's what you need to do to use the lines that I gave you:

    In the fieldChanged for the button method, you must run the lines that I showed you.

    This will put your UiApplication in the background.  The user will be able to bring to the forefront again by pressing the icon or choosing the form of application for the selector of the task.

    The user can in fact do roughly the same thing by pressing menu and selecting ' Application Switch, if it appears in the menu.  And that's roughly the same by pressing the menu key and then selecting another application in the selector of the task.

    If this isn't what you want, then please describe what you want again and why it's different from this.

  • How to install the application in the folder "Applications" on Storm (Bold).

    Hi guys.

    I'm looking for how to install the application in the Applications folder on the storm.

    Google map is installed in the folder "Applications" when installing it from the web.

    I would like to know how to do it.

    Please share the knowledge.

    Thanks in advance.

    Take a look at this thread.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=31323&query.ID=68...

    Concerning

    Bika

  • I downloaded Photpshop elements 13: how to open the application?

    I downloaded Photpshop elements 13: how to open the application?

    for windows, you have downloaded an exe and a 7z file. put them both in the same directory, then click on the exe file.

  • How to send the value of the variable to the application module to servlet?

    HII...
    How can you send a value to the application module to the servlet or jsp page when we call the function from the application module...
    as the return type of function module of the application must be zero when it to add in the client interface...

    Your Java Bean must be serializable. A quote from what is displayed when you click on 'Help' in the ' Add method on the client interface screen:

    A list of the generated methods available for export (only the public methods with parameters and return types that are primitive or implement that the Serializable interface will appear in the list).

    John

  • Important conceptual issue on the Application Module, maximum Pool size

    Hi all

    We have a critical issue for the default settings of the Application Module (taking a data source DB connections)

    I know that on the Web, it is generally suggested that each request must end with a commit or rollback when executing blocks PL/SQL 'directly' on the DB without the intervention of service framework ViewObject/BC/entity.

    Now, for some reason, we started to develop our applications with the thought that each Web Session référenceriez exactly a DB session (open any instance taken AM pool) during the duration of the session, so that the changes made by each session Web DB session would never interfere with the changes made by 'other' Web Sessions to 'other' DB sessions.

    In other words, because of this persuasion, we implemented often sort of "transactions" that open and close (with commit or rollback) every DB session not in and after a single HTTP request, but during several HTTP requests.

    As think of a concrete example of this scenario:

    1. the user presses the button "insert." An HTTP request is triggered. The action listener is running and ends with the insertion of rows in a table via a block PL SQL (not via the ViewObjects API).
    2. no commit or rollback after the PL/SQL block above is still done.
    3. Finally, the user presses a button of 'Validation' or 'Dismantling', taken from the appropriate call to the AM methos.

    These three applications are what I called the "transaction".

    Literature, it is clear that there is no guarantee that the couple HAVE istance + DB session is the same in all applications.
    This means that, during step 2, it is possible that another user can do reference the same 'pending' AM / DbSession for its needs and 'fly' sort the work done via PL/SQL after step 1. (This happens because sessions taken poolside are always cancelled by default).

    Now my question is:
    Suppose that we have defined the parameter 'Maximum Pool size' to the very many (always less than the maximum number of concurrent users):
    Is there a guarantee that all applications will be isolated in this case?

    I hope that the problem is clear.
    Let me know if you want more details.

    Hello

    No, I don't think that there is a specific guarantee - at least according to the documentation. You could open an SR with support for asking the question and ask them to refer the matter to the development. The way to ensure things would be to disable AM pooling, which, according to the literature, is not a configuration supported for production.

    I know it's probably not what you want to hear, but if you hired me to come and consult with you, my recommendation would be to redefine the architecture you have. In the end, you'll be happier with the results. If you have an API of PL/SQL, you use, you could write an extension of the generic framework for your EOs that could take advantage of the API of PL/SQL instead of SQL calls (there was little prior work on this and N of Frank, recently said that he would become an EMG effort, but not until next year). If you did, you can further increase your PL/SQL, but without violating the rule "don't let state pending in the session DB".

    John

  • get the Application Module during the invocation of Taskflow delimited

    Hello dear developers,

    I have a filter that maps just before the Faces Servlet and fill some attributes in the HttpSession before it proceeds with the request

    [...]

    If (_clientUser! = null & &! _clientUser.isEmpty ()) {}

    session.setAttribute (CLIENT_USER_URI_PARAM_NAME, _clientUser);

    filterChain.doFilter (servletRequest, servletResponse);

    return;

    }

    [...]

    There are some practical information for which task flow should be addressed within the URI,

    faces/ADF. Task-Flow? ADF.tfId = Task-Flow-Definition-ID & adf.tfDoc=/WEB-INF/task-flow-definition-id.xml

    After I continue the application there is a method call within the bounded workflow that is called before the display (allows to call the current view), making it default business

    [...]

    activity < default > doStuff < / default activity >

    [...]

    The method itself is in a Managed Bean PageFlowScoped, which is added to the task-flow-definition - id.xml

    This is the method that is called before the "MainPage"-view of doStuff ".

    public class {controller

    [...]

    public void doStuff {}

    FacesContext ctx = FacesContext.getCurrentInstance ();

    Card sessionMap = ctx.getExternalContext () .getSessionMap ();

    String clientUser = (String) sessionMap.get (CLIENT_USER_URI_PARAM_NAME);

    AppModImpl am = getApplicationModule();

    DBTransaction transaction = am.getDBTransaction ();

    do more things

    }

    [...]

    }

    public AppModImpl getApplicationModule() {}

    FacesContext fc = FacesContext.getCurrentInstance ();

    Application app = fc.getApplication ();

    ExpressionFactory elFactory = app.getExpressionFactory ();

    ELContext elContext = fc.getELContext ();

    {ValueExpression valueExp = elFactory.createValueExpression (elContext, "#{data.", Object.class "}") AppModDataControl.dataProvider};

    AppModImpl m = valueExp.getValue (elContext) (AppModImpl);

    am back;

    }

    Everything works well so far. But if I try to get the Module of the Application. There is not.

    This app normally isn't any what DataControl, because is just a root application which different components of blocks that have been added by ADFLibrarys, but I added a DataControl to the DataBindings.cpx and an iterator for the MainPagePageDef (just to understand a DataControl in links) but still no result.

    Do you have any tips for me how I can access the application Module? FacesServlet should have been already created the necessary FacesContext managed Bean is called at the moment or it only creates a new FacesContext time a real (jspx/jsf) Page loads?

    Yours,

    Matthias Schnell

    I got a response:

    Here is the block message that has helped me to understand.

    Andrejus Baranovskis Blog: How to fix error of initialization of the control Data with the ADF libraries

  • How to execute the sql statement in the file beats?

    I want to execute after the statement
    C:\ > sqlplus/nolog
    SQL > conn scott/tiger
    SQL > select * from tab;

    I know I can achieve it following test.bat and testdb.sql file
    test.bat is:
    sqlplus/nolog @testdb.sql

    TestDB.SQL is:
    Conn scott/tiger
    Select * from tab;

    Now I don't want to use the sql file, I want only use bat file, as follows:
    test.bat is:
    sqlplus/nolog
    Conn scott/tiger
    Select * from tab;

    When I run test.bat, I find only one sqlplus /nolog execute statement, do not execute other statements.
    (1) I want to know if there is a method to run the SQL file by fighting without a sql file? How to make it happen?
    (2) if I call the sql file, how to hide the password of user? Because I don't want other people to know scott password, if I use conn scott/tiger in testdb.sql, other person can see testdb.sql and the password. Is there a good way to avoid?

    Thank you!

    It works a bit different in Windows. Create a file is like this:

    (
      echo conn scott/tiger@orcl
      echo spool c:\temp\list.txt
      echo select sysdate from dual;
      echo spool off
      echo exit
    ) | sqlplus -s -l /nolog
    

Maybe you are looking for

  • Plugins installed disappear when I restart my computer

    I am running Firefox 3.6.13. I had a file corruption problem and had to reformat the image of the factory and then reinstall all my software. I used mozbackup firefox backup settings. I have restored and he handed my favorites and passwords very well

  • X 1 carbon model CF 20 mistakes during the process of MDT

    I got the new model of the X 1

  • Configure the setting to allow the computer to sleep

    I recently booted Media Center on my PC.  Since then, when I activate "sleep mode" on my computer the monitor turns off and the computer sounds like it is always on.  In the past, I could hear the drive spin down and the fans go off.  Is there a way

  • AP1242 - requires antennas?

    Hello Product ref: AIR-LAP1242AG-E-K9 Looking to buy one of these for a SOHO location (probably not a very difficult environment). Is essential to buy antennas to connect the RP - TNC connectors, or can the AP1242 make wireless without them? Thanks i

  • Windows 7 on the startup disk

    I downloaded Windows disk boot provided with my PC and it worked fine for about 18 months. Now after wiping my PC and re - install the boot disk, I need a product key for continue to use Windows. I did not and am sure I have never. Can someone help m