Should ADF Entity Object Map to Database Table or View?

We are building a new 3-tier JClient/ADF application. We have mapped most entity objects directly to database tables. Now that we are preparing to deploy, our DBA is angry; he believes that all entity objects should be mapped to database views. The developers see this as a headache, UML can not forward/reverse changes, and now we have another layer of abstraction, which doesn't seem to serve a useful purpose. What is the best practice in a new 3-tier application?

Hi,
I'm still having problems but I found out why these tables are returning errors. The username I've been given by the DBA to connect to the database is CONSULTA, but this user is only for querying purposes, the actual objects reside on a differente schema, of course, which is PROD. So the line:
"CONSULTA"."ESTADOS"@"PROD@AYADEV_LOCATION" "ESTADOS"
raises an exception because the table ESTADOS is not located on that schema, but on PROD. If I query the table from SQL Plus with:
SELECT *
FROM [email protected]@AYADEV_LOCATION
then there's no problem at all.
Why is this? How do I instruct OWB to point to the correct schema or to avoind fully qualifying the table name?
Please help me, I'm kind of confused here.
Best Regards,
--oswaldo.
[osantos]

Similar Messages

  • ADF Entity Object

    Is it true that
    1) Against every request, for data, from the screen (ViewController UI), the data is fetched from the related Entity object only and no request is fired to the database at any level.
    2) When both Application Server & database Server are up, Entity Object & the related database table are always completely synchronized (Whether data is changed manually directly at database level or through related ViewController UI).

    Hi,
    see the documentation
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2?topic=bc_acaches_html
    and
    http://www3.nexpak.com/bc4jdoc/bc_ahowdoesbltcachedata.htm
    Frank

  • How to mapping Entity beans to existing database tables.

    dear all
    how can i mapping Entity beans to existing database tables and not to create new table in Orion.
    thanks for any input.
    seabin

    * You define the name of the table that an Entity EJB maps to in orion-ejb-jar.xml. For eg:<entity-deployment name="MyEntityEJB" data-source="MyDS" table="MY_DB_TABLE" ...>* If you don't want to let Orion create the tables for your EJBs, have the following entry in either of the files given below:<orion-application autocreate-tables="false" ...>1) <orion-home>/j2ee/home/config/application.xml (global effect)
    2) orion-application.xml file of that particular application (application specific)
    HTH.

  • Refreshing Entity Objects after Altering the table

    Hi,
    My Entity Object is based on a table... and View Objects on the Entity Objects. Now if I alter the table (just changing the width of the column), that change is not visible on the Entity Object. Is there any way I can automatically refresh the Entity Objects after altering the table(only column width is changed).
    (Changes made to Entity Objects manually are reflected in the View Object correctly.)
    Regards
    Faiyaz

    'changing the width of the column' means changing the size of the column in the table description in the database. For e.g.. In the original table I had a column OIL_KEY NUMBER(6). Now I change the column to be of size 12 i.e. OIL_KEY NUMBER(12). This does not get refreshed in the Entity Object.

  • 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.

  • Passing SQL Server identity attributes values into adf entity objects

    Hi all.
    I'm using Jdeveloper 10g for developing an ADF Swing application based on MS SQL Server DB.
    Does anyone know if it is possible to pass SQL Server identity attributes values into the correspondent attrributes of adf entity objects, like we do with Oracle DB Sequence.
    The problem is that i should somhow implement cascade deleting of detail view objects, so i should use the composition association. But since i cant fill the primary key attribute with appropriate value (that is actually a ms sql server db sequence value) i always get
    the following exception: oracle.jbo.InvalidOwnerException: JBO-25030 as i try to create a new pair of master/detail objects.
    Thanks in advance.
    Alex.

    The approach is good. but i still dont understand how i can address the sql server db sequence (identity field) programmatically...
    The code offered
    SequenceImpl sequence = new SequenceImpl("PRODUCTS_SEQ",getDBTransaction());
    setProdId(sequence.getSequenceNumber());
    generates something like this:
    select deq_name.nextval from dual
    but this syntax works for oracle only... and not for sql server...
    Edited by: Timin on Mar 26, 2009 6:34 AM
    Edited by: Timin on Mar 26, 2009 10:25 AM

  • Generating an Entity Bean from a Database Table

    I am following the tutorial "How Do I: Generate an Entity Bean from a Database
    Table?" and in that process doing the "Configuring a Data Source". This is the
    message I get when I configure a data source per the tutorial and click OK. This
    data source exists and the information is correct that I have supplied.
    Do I need to put the MS jars somewhere to enable this?
    See attached file

    I've just figured it out. An input source also takes a Reader in its constructor. I was thinking that it only took an InputStream, and as the Serializer requires you to set a Writer on it, I was finding it impossible to convert between bytes and chars. Now, I have simply set a blank CharArrayWriter on the Serializer, got a char[] from it once the Serializer has written the Document to the stream, and then constructed a CharArrayReader with this char[]. It works fine now. Not that anyone read the problem anyway cos I solved it a few minutes after I posted it. Considering it first cropped up about 4 months ago and it has been niggling ever since, I am pleased!

  • EJB mapping to database tables

    Hi Experts,
    I am moving my application from JBoss server to Netweaver server. For this i have to do all the maaping in ejb-jar and ejb-j2ee engine and persistence xml files. I am wondering the way how can i use my existing database tables for mapping to persistence xml.
    Every example says i have to create java dictionary project but if i go like this then i have to create hundreds of tables again which are already in my SQL database. Please let me know how i can map my database tables to my application fro deploying to Netweaver server.
    Thanks in Advance
    Regards,
    Chirag

    Hello,
    Java Dictionary stores its metainformation in xml - files, it meight be possible to create them on basis of existing tables.
    But: Java Dictionary only supports the default "system" - database that is unterneath NWAS.
    As i understand your problem, you want to connet to an other (existing) database - so you will have to create the mapping in persistence.xml. I would try to use a xml transformation to create persistence.xml
    hope it helps
    Johannes

  • Mapping of an entity EJB to multiple database tables using CMP?

    Can one entity EJB have attributes split between (mapped to) multiple databse tables?
    Would CMR work properly between two such entity EJBs (both mapped to multiple database
    tables).

    Hi Milos.
    Can one entity EJB have attributes split between (mapped to) >>multiple databasetables?
    A CMP Entity should be always mapped a record in a single DB table.
    Thanks.
    Ji Zhang
    Developer Relations Engineer
    BEA Support

  • Entity bean mapping to multiple tables.

    Hello,
    Is it possible to map several tables with only one BMP?
    if so please send me an example (class bean)
    Thanks in advance

    hi,
    yes, entity bean can be mapped to multiple tables provided it is bean managed entity bean.
    since, container cannot prepare complex quries so that we need to rely on bean managed persistance.
    Ex : Assume you have two table like X, Y
    where X table having fields (int x primarykey, varchar str) and Y table having fields (varchar name primarykey, int y).
    Now you should design a primary key class of your own as shown below:
    public class BeanPriamkey implements java.io.Serializable
    protected int x;
    protected String name;
    public BeanPramkey()
    //initialzation part
    public BeanPramkey(int x,String str)
    //initialzation part
    public String toString()
    //return object value as string
    public int hashCode()
    //return an int value
    public boolean equals(BeanPramkey)
    public int getX()
    return x;
    public String getStr()
    return str;
    now your entity bean would be like this
    public class Mybean implements EntityBean
    int x,y;
    String str,name;
    BeanPriamkey primekey;
    public BeanPrrmkey ejbCreate(int x,String name)
    //fetch the rows from the tables X and Y ;
    //if the rows exists int the tables create beanprimkey object with x and name and return refernce of the Beanprimkey class object
    public BeanPrimkey findByPrimarykey(BeanPrimkey )
    //first extract values of x and str from BeanPrimkey
    and chek X and Y table for corresponding rows if exists return the reference of BeanPrimkey else return null
    public void ejbStore()
    BeanPrimkey prikey = (BeanPrimkey) entityContext.getPrimarykey();
    int x = prikey.getX();
    String st = prikey.getStr();
    update X and Y tables using x and str;
    public void ejbLoad()
    BeanPrimkey prikey = (BeanPrimkey) entityContext.getPrimarykey();
    int x = prikey.getX();
    String st = prikey.getStr();
    fetch the rows from X and Y tables using x and str;
    and assing the row values to bean instance variables.
    public void ejbPassivate()
    //code for release the resources
    public void ejbActivate()
    //code for aquiring the resource
    public void setEntityContext(EntityContext ec)
    this.ec = ec;
    protected EntityContext ec;

  • Entity object on a transient table

    Hi
    I have the following requirement where I need to create a monitoring UI based on a transient table.
    When a process is invoked, it creates a transient table for co-ordinating the tasks across its multiple child processes (in parallel). I need my ADF code to first check if that table is present and then redirect to a monitoring page built on top of this table. This page should not be accessible when the transient table is dropped from the database.
    Please suggest some approach to achieve this. I don't want to throw any exception to user saying that the table is missing. My code should handle it and conditionally to show the monitoring page.
    Thanks

    You could use a method call activity in a task flow (see [url http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/taskflows_activities.htm#BACFBDAE]docs). Your method call would invoke a service method on the Application Module that could execute a query (probably a read-only view object would be a nice way to do this) to check the data dictionary to see if the table exists. Then, depending upon whether the table exists or not, your method call can return one of two values, which can be used as the control flow case to take the user to the monitoring page or to wherever else you want them to go.
    I've not ever built this type of functionality before, but it seems like a workable approach.
    John

  • How to create Entity object for Non Database Object.

    Friends,
    I have a requirement something like, I will be getting some huge amount of data from external system via CORBA, I have to display the data in jsff page in <af:table>. My requirement is If User updates any of the row I need to identify what are all the rows user updated and Need to invoke again a CORBA call for only UPDATED Rows.
    Basically here, I am not dealing anything with the Database, I assume using Entity we can find out a status of the row whether the row is updated/deleted/created .
    How can I create an Entity object in this case.
    Any help will be highly appreciated !!!
    Thanks

    The basics steps are described here http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadveo.htm#sm0328
    and here http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvvo.htm#sm0341
    You need to change the underlying data source from pl/sql to meet your requirements (CORBA).
    Timo

  • ADF Entity Object: Securable Operation "Create"?

    Hello,
    I have the following scenario: Within one view I have a table bound to a view object that bases on an entity object. The view also contains a "create insert" button.
    Now I want to secure the "create insert" operation with a certain application role. However, within the entity object I can only activate the removeCurrentRow, read and update options as securable operation. Is there any way to control the creation of new items?
    Regards,
    Michael

    Hi.
    welcome to forum!
    Maybe this post can be useful http://andrejusb.blogspot.com/2011/03/how-to-enable-create-operation-security.html

  • Multiple updateable adf entity objects

    I've got a situation that is real similar to something that's covered in the developer's guide, yet it's just different enough that I need to get someone's help. I have a view object that is based on two entity objects. These 2 entity objects have a one to one association with each other. They both share the same primary key (hris_id). There is no foreign key relationship between them. This hris_id column for one of the entity objects has been set as a DBSequence type so that it's value can be set by a sequence. When i want to create a new row via this view object, I need to know where/when I can get this sequence generated value from the first entity object so that when the second entity row gets created, i can use this value (hris_id) from the first entity object to populate the hris_id column in the table for the "second" entity, since both tables will need to share the same value for hris_id column. Just not sure about where in the code this needs to happen. Any ideas? Thanks.

    Hi,
    I think your situation is similar as described in the guide.
    Override create in your view object row class, create first and second entity and probably you need to copy key value from first to second entity.
    Try this:
        @Override
        protected void create(AttributeList attributeList) {
            Entity1Impl newEntity1 = getEntity1();
            Entity2Impl newEntity2 = getEntity2();
            try {
                newEntity1.create(attributeList);
                oracle.jbo.domain.Number hrisId = newEntity1.getHrisId().getSequenceNumber();
                newEntity2.create(attributeList);
                newEntity2.setHrisId(hridId);
                .Rado

  • Human Task Bulk API calls from ADF Entity Object

    Dear all,
    Jdev: 11.1.1.7.1
    We have a requirement where in human task APIs need to be invoked on status changes of an ADF Entity (EO). We presently achieve this in the afterCommit() method and all is well.
    But we are looking to leverage the Human Task bulk update APIs and am wondering how to do that.
    The EO does support a batch mode - Is there a batch mode API that we can override to place the bulk update API call?
    Thanks

    in version 11.1.1.6 getInputStream() and getContent() do not work, this is know bug you can find in the oracle support at
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=175895926830291&type=DOCUMENT&id=1451100.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state=tlzphlagm_69
    there you can find a .zip file with a full example code.
    Actually Oracle does not consider it a bug:
    "This issue was reviewed by Engineering in Bug 13873092 and is not considered a bug. There is a workaround to retrieve task contents through 'WFTaskUpdate' Servlet as described in the attached Sample project."
    but in my opinion it is a very big bug endeed, and it drove me mad for days! :(
    Anyway here is a snippet with the workaroud in case you do not have access to the oracle support site:
    if att is you attachment and wfContext is your workflow context set somewhere
    AttachmentType att;
    IWorkflowContext wfContext;
    instead of doing this
    InputStream inputStream = att.getInputStream();
    do this
    String contextId = wfContext.getToken();
    String attachmentURL = WFUtils.getTaskUpdateURL(att.getTaskId(), contextId, "" + att.getVersion(),att.getName(),
    Constants.WFTASK_QUERY_ATTACHMENT_BUTTON_KEY_NAME);
    if ( attachmentURL == null ) {
    System.out.println("Unable to generate URL to get attachmentcontent");
    try {
    URL url = new URL(attachmentURL);
    URLConnection conn = url.openConnection();
    InputStream inputStream = conn.getInputStream();
    } catch ( Exception e ) {
    e.printStackTrace();
    hope this helps
    Massi

Maybe you are looking for

  • Window pop-ups when gaming

    I bought a Y50 gaming laptop recently and am having an issue I can't seem to stop. When I am in a game (Team Fortress 2) often the last app I used just pops up and I have to ALT tab back into the game. First it was the Lenovo assistant so I uninstall

  • Can we add a new attachment to an existing SC from any other custom page in SoCo PO View

    Hi Experts, Need your expert advice on the below requirement. We have created a custom view in SoCo PO page. There we have a New custom view called Notes&attachement.which contains same value from Notes & attachment of Shopping Cart. We are updating

  • MacBook Pro 13" mid 2009 won't see hard disk

    I'm changing a harddrive in a friends MBP, but it can't see the new harddisk. When attaching the new harddisk via USB it boots up perfectly, but when inserted in the casing and connected with the internal cable, it won't recognise the harddisk. When

  • InContext and Spy Tabbed Panels

    First I have to get it out of the way that I'm with everyone else who thinks it's silly that there is no indication as to what the InContext service will cost. Even if you could throw a ballpark out there it would help people decide whether or not to

  • No Service (Again).

    I reside in Charlotte NC and am ONLY able to call the VZW toll free customer service number (can't get through doing *611) and cannot receive any incoming calls. I am able to text a fellow iPhone VZW customer with no problems. Customer service stated