ADF business components: persistent negative IDs in the database

Hello

We use ADF 11 g with ADF BC as the model layer. All our database tables have a column ID, which is populated by a sequence and never shown to the user. ("IDs techniques".) In British Colombia ADF we have configured our entity objects with the attribute Id set as primary key. The type of the attribute is set to "oracle.jbo.domain.DBSequence". On the tab sequence, we set the name of the sequence in the sequence that corresponds to the table (we have a sequence for each table in the database).

Our problem is the following. If we create a new record in our ADF Faces UI and a business on the database rule generates an error during validation after which correct us the error and resubmit the registration, a record with a negative identification gets in the base. If there was no error in business rule, we get an ID that corresponds to the 'nextval' in the sequence, as expected.

Even though I know that ADF BC uses negative ID in the cache of objects entity for new records, I have no idea how and why these negative ID end up in the database. So far, they have been any problem in the database. But since this is unexpected behavior, I'm not entirely sure that the negative ID will not cause problems in the future. My questions:
< ul > < li > is this design 'by' behavior or is it a bug? < /li >
< li > if it is "by design": these are negative IDs guaranteed as being unique? < /li >
< li > could it be caused by a configuration error in our model project? Where should I start looking for such a mistake? < /li >
< li > could it be caused by a configuration error in our database? Where should we start to look for such a mistake? < /li >
< li > would it be a bug in the ADF BC? < /li > < /ul >

Best regards
Bart kummel

Bart,

(1) it's by design
(2) No.
(3) No.
(4) No.
(5) no

;)

Now for the explanation. Sequence name you set up is just for information purposes only - it is not actually cause ADF fill the value using the sequence. To do this, you must either write database triggers or you can use an extension framework class to have occur in the model layer - in my view, such an extension class is documented in the developer gude (search for DBsequence, I've not worn to hand at the moment). Negative numbers are only temporary placeholders.

John

Tags: Java

Similar Questions

  • EJB or ADF (with the HELP of REST), the 12 c ADF business components

    Hi all

    I have a simple question to ask. I need to create a project to expose Web services from another project and third party possible.

    I need to use Rest services producing Json.

    So my question is: can I create my Web services using EJB or ADF business components? That who and why?

    EJB seems to be a little more simple/fast to implement.

    Best regards

    Luis Cabaco

    You have experience in the use of EJB or ADF BC in other projects? This could influence your decision.

    This moment (12.1.3) to produce the JSON ADF BC, you will need to code the solution.

    The plan should provide declaratively to expose REST JSON ADF BC in the next 12.2.1 release.

  • ADF business components

    Hello

    In Jdeveloper 11g from, we have many ways to create models and objects of the base entity.

    For example new slot > > ADF components we have two choices a) create table Table b) ADF entity objects ADF business components

    My question is: what is the difference between the two and which is more standard and recommended method of creating CRUD application?

    Thank you

    Rubi

    Hello

    It's like asking which way in Rome. The result is the same that you find yourself in Rome.

    The business components of table creates EO, VO, and AM only once and it is easy to start (a beginner option).

    Table OS, this is for when you want to create the template manually. If you are a developer experienced ADF BC who knows how to build from VO of entity objects, but also associations and view links manually then this option more puts you in control, so to speak. (option expertise and probably my choice)

    But as said, the end result is the same, you find yourself in Rome.

    Frank

  • where to learn ADF business components?

    Hello

    can you please share a link regarding on the use of references to adf business components. all ebook titles or a book would also be appreciated. : D

    Kind regards
    Simon

    Published by: 848858 on April 24, 2011 03:27

    http://blogs.Oracle.com/Shay/2010/02/how_do_i_start_learning_oracle_adf_and_jdeveloper.html

    should give you a start.

    Timo

  • ADF business components: create a form to add a new record

    Hello

    I use Oracle JDeveloper 11g Version 11.1.1.2.0 and ADF framework to build the application. My application is using Oracle ADF (data controls) business components.

    I am trying to create a form that allows a user to enter data for a new record and then validate this record. I was able to create the shape of the ADF and CreateInsert and commit buttons doing drag and drop the opinion of the entity and its operations since the data controls. This allows to add a new record to the table using two command buttons (createInsert and validation).

    I need to do it using only one button. How can I do?

    Thanks, Alex

    Not really clear on your use case, but [url http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html] This shows how two declarative actions with one click

  • ADF business components Type map Oracls vs Java

    What advantages and disadvantages of each one card

    I thank in advance

    Take a look at this link in the developer's guide:
    http://docs.Oracle.com/CD/E16162_01/Web.1112/e16182/bcintro.htm#sm0062

    The scope of Java to map Oracle and Oracle areas type plan manage numeric data differently. When you create a new application of the type mapping default Java extended for Oracle maps the digital data to the Java.Math.BigDecimal > class that inherits from java.math.Number. The default value of Java.Math.BigDecimal corresponds to the way that web view Fusion application layer, consisting of elements ADF Faces, retains the alignment of digital data (such as numeric values > posted by ADF Faces of fields on a web page). Whereas the areas of the Oracle type that maps digital data from the oracle.jbo.domain.Number class, may not display the data with alignment scheduled by some ADF Faces > components. Apart from this alignment problem, the plan of type Oracle areas remains a valid choice and applications without ADF Faces components will work without problem.

    Thank you
    Nini

  • Check the installed oracle components are actually used in the database

    I got a new database I have to optimize. So I think to delete some installed components that I think are not be used somehow in the database (IE procedures calls etc.). I see a whole bunch of components as "ODD", 'ORDIM', which I think are not used, but previous DBAs have installed them. So, is it possible to make sure that no part of the database are actually using these components so that I can remove these components. Also, what are your expert comments on it?

    Is it a production or a development environment? If an object is not used then this isn't necessarily a problem (performance wise) unless it is either cluttering up your dictionary or raising concerns regarding the consumption of unnecessary space. Personally, I would recommend that it is preferable to resolve what is to be used / taken of resources. It is maybe once a year report or a few old utility out once a year, the best monitoring, why those things are there.

    If you go down the road of a fall, rather than drop anything immediately block accounts for an agreed period to ensure that the scheme is not used & check all references other schemas of objects in the schema that you intend to drop, potentially of audit to check if they are being called by other patterns / verification dba_dependencies between schemas and objects using a hierarchical query to check the sub-levels.

    There are also quite a few standard Oracle components that are installed by default that have interdependencies and not necessarily be used in the dictionary (control dba_features_usage_statistics)

  • ADF business components: how to apply where Clause to the new lines

    Hello world.
    I develop Web Application from merger under Jdeveloper 11.1.1.0.1.
    I read this post http://blogs.oracle.com/jheadstart/rowmatch/
    And I have a question. How should I configure rowmatch if I instance the same viewobject except 2 2 viewobject defined on the same entity.

    If you use view criteria to make your filtering and scoring mode 'filter' of the Victoria Cross to be "Both" (database and in-memory), then the framework will automatically use your filter to filter the lines again without having to write code or use your own rowMatch object.

  • Active Data Guard on DB 11 g and ADF business components

    Does anyone has experiences using business against a data source Active Data Guard components? Y at - it something ADF BC specific, you might need to know/set up regarding the parameters of the Application Module. Of course, we would read only your with her. Sorry it kinda turns out to be a beautiful finished question just want to know if it's a go or one thing more than any other possiblity.

    TheOtherDave,

    It should work perfectly. One thing you will need to know is the passivation of State mechanism used by ADF BC can use a store based on files or DB-table-based store. Obviously, if you want to use the DB-table-based store, you will have to configure it to point to a database where you can write to DB tables, which will be probably different from your database pending of DG. Otherwise, I can't think of specific issues (but I don't him have not personally tested).

    John

  • Declarative components ADF business components with

    Hi, I created a generic project in jdev

    Created DeclrativeComponent and Application Module defined in the project. My idea is to deploy the declarative component with App module in an ADF library jar.

    Created a test page in this project and was able to read the records in the db using the app module.

    But when I deploy as ADF Lib and when I try to access the db through my added pot this pot is unable to internally find the app module.

    same code is running independently but fails when added to another project in the jar.

    public static DeclarativeComponentAMImpl getAm() {}

    DeclarativeComponentAMImpl am;

    FacesContext CF = null;

    Application app = null;

    ExpressionFactory elFactory = null;

    ELContext elContext = null;

    ValueExpression valueExp = null;

    try {}

    CF = FacesContext.getCurrentInstance ();

    App = FacesContext.getCurrentInstance () .getApplication ();

    elFactory = app.getExpressionFactory ();

    elContext = FacesContext.getCurrentInstance () .getELContext ();

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

    } catch (Exception e) {}

    e.printStackTrace ();

    }

    AM = (DeclarativeComponentAMImpl) valueExp.getValue (elContext);

    am coming as null here when executing it in another project by adding this as jar lib adf

    am back;

    }

    I need assistance to the deployment of adf lib with the two component function declarative with his app module.

    Help, please

    BC4J configuration add inside the Databindings.jpx solved the problem

  • ADF against the REST business components to access data

    Hello

    JDeveloper 12.2.1

    We are about to build a custom application of ADF that must run completely on the site.

    Given that we build it from scratch, we want to start with last 12.2.1

    There is also no specific use cases where another application has consumed our application services.

    With the recent versions of JDeveloper and ADF, there was a lot of improvements made to REST etc. and other industry standards

    I came across some discussions about to consider the use of these new features

    https://groups.Google.com/Forum/#! Searchin'/adf / methodology/repairman$ 20services/adf-methodology/u0dz4x4w2xU/15xrimlxQaYJ

    https://groups.Google.com/Forum/#! Searchin'/adf / methodology/repairman$ 20services/adf-methodology/zpMv4PqOKhI/Qws0C4IBBYAJ

    We plan to use the default ADF Business components to access data, because our requirements and I am more inclined to the use of these.

    That is to say, using the ADF business components based on database objects directly (using a thin driver for data source)

    But I also want to determine if there is any other good reasons to use other ways to talk to the database (such as RESTful services) as shown in the links above.

    I believe, if we must use RESTful services to access the data, then it should be in the following scenarios.

    a. If the database is on a cloud (as if we use DaaS)

    b. There are already services available for the access to these data, and just build the user interface

    But if we build the application from scratch, which is supposed to be running on site, then I would choose the ADF business components to access data via a thin driver for the data source.

    Someone can correct me if I am wrong in my thinking?

    Thanks for any help.

    Sameer

    Without knowing your situation, I would say that it seems that the use ADF BC is the right way to go.

    It will allow you not only to access your database, but also add logic and to create complex data structures and relationships – all in a layer that is outside your database.

    Your ADF UI can then link directly to this ADF BC layer.

    If in the future you will need other interfaces to access the same logic through REST services - then that in 12.2.1 you can expose ADF BC as REST services will give you this ability.

  • Customization examples of Error Messages from the Business components

    Hi I followed this example and this: http://jobinesh.blogspot.de/2011/03/customizing-business-components-error.html, I followed the instructions but its does not work wins my request I re - create the problem, I check with the sample of work I did everything what I see in the sample of work, but mine does not always someone can check what I'm missing I download in this host file I used http://www.datafilehost.com/download-9d37bd8a.html hr diagram. am using jdeveloper 11.1.1.6.0
    I created the two class and one of them
    <Application xmlns="http://xmlns.oracle.com/adfm/application"
                 version="11.1.1.59.23" id="DataBindings" SeparateXMLFiles="false"
                 Package="view" ClientType="Generic"
                 ErrorHandlerClass="view.CustomErrorHandler"
    
    what else am i missing what have i not done,i know am mssing something but don't know what,the sample does not show step by step implementation,it just have a working solution,if somebody know step by step  implementation can you pls explain to me
    Published by: adf009 on 12/03/2013 12:09

    Published by: adf009 on 03/20/2013 14:44

    Hello

    Well, you've learned that samples should be provided on the HR diagram. Also try to put the steps to see the mentioned number.

    Anyway, here's the anwer-

    You missed a step. See link [Fusion Developer Guide | http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcadvgen.htm]... Go figure - 'Figure 37-9 project properties displays Message Resource Bundles' - this is the step failed. So just add your package customized to the ADF BC project.

    This should solve you problem... Let me know if you need examples updated the.

    Thank you
    Rajdeep

  • ADF business Concepts Ejb components n

    peoples. Sorry to ask this stupid question.

    the reason behind this issue.

    the most often use adf business components I don't know. but now I'm learning with blogs of experts help. In some blogs, people with Ejb concepts.

    But what some I know ejb.




    My doubt:

    for desiging a transaction based projects. and several people work on my form.

    What should I use.

    components of business EJB or adf. suits for orientation of the transaction.

    Please guide me...

    One is suitable for the semantics of transaction.

    Are you choose probably depends on your background. If you are already well versed in EJB/JPA, then you would follow this approach. If you are already versed in Oracle Forms or ADF BC, then BC ADF would be a logical choice. I will also say that Oracle seems to have invested more effort into the side ADF BC of things, so if you're still undecided, so perhaps this observation can swing you to the side ADF BC.

    John

  • All ADF Faces components are suggested to have IDS

    JDeveloper 11 GR 1 (11.1.1.1.0) material emits warnings in the code editor if ADF Faces components have no ID is specified in the page. 'S done it by marking the corresponding component tags using orange lines below them. Why some components should have IDs if we must not reference them anywhere? (For example, most < af:group >, < af:separator >, input/output components with no dynamic link with other components and so on.) Is there a way to remove warnings "When using ADF Faces, it is suggested that all components have IDS" appear on the screen, because these fake warnings (which are everywhere) could prevent see me more most important possible?

    You can disable this message by using the tools-> preferences-> audit Faces-> profiles-> Rules-> ADF-> ID of component rules

  • How toggle and show/hide in the ADF faces components

    Hello

    In my application, I need to toggle and show/hide in ADF faces components based on a user manipulates some components. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    For use to hide/show the Visible property and toggle use ReadOnly property.
    Set them to some EL Expression as #{ == ? : }
    Also set the PartialTrigger on this attribute pointing to the parent attribute

    Don't forget to fix biased/AutoSubmit submit = true to the parent component.

    Amit

Maybe you are looking for