ADF BuessServices Layer With Toplink In Jdeveloper 11.1.1.3.0

hi,
i want to use Toplink / EJB as my BuessServices Layer, I can't get userfull help from google and orecle , Can you give me some sample /Demo or advice?
thank you very much~

Hi,
not sure what your problem is. However, have a look here - its the 9th sampl from top: http://apex.oracle.com/pls/apex/f?p=9830:32:0::NO
Frank

Similar Messages

  • Creating an O/R layer with TopLink from Ant or a script

    We're currently using JDeveloper and BC4J to generate an O/R layer that simply creates a BC4J entity for each table in our schema with the appropriate associations between tables. The problem with this approach is that it is very brittle. Any change in the database breaks the BC4J layer and we have to recreate the entire thing. Using the JDeveloper wizzard is labor intensive and we want to automate the task of creating a new O/R layer with a script or Ant task, but unfortunately there is no way to do this with JDeveloper.
    Can we use TopLink to generate an O/R layer using a script or Ant task instead of the workbench? It would be a great time saver for us if we could point TopLink to our schema and have it generate an entity per table with the correct associations without having to use the workbench.
    Thanks.

    I have seen some customers do this, although not necessarily with ANT (it was a while ago). We do ship the Deployment Descriptor DTD (search your TopLink install for *.dtd). That should help you generate the mappings. You're on your own with the code, none of the code gen API's are available on the command line outside the MW.

  • Serious problems with TopLink in JDeveloper

    Is there any sane way to regenerate TopLink Java objects from Oracle tables? Specifically, I have changed an Oracle table and need it reflected in both the Java object and the toplink-mappings. I don't see any way to do this in the IDE so I've resorted to deleting the Java object, and removing the descriptor for that object; then recreating both. Now, this has opened a huge can of worms.
    First of all, if the .class files for TopLink Java objects already exist, the IDE will refuse to overwrite them: instead it will append "1" or "2" etc to the new object. The Erase from Disk option in JDeveloper does not remove class files -- just source. So I need to physically go deleting class files every time I need to recreate a TopLink Java object.
    Secondly, removing the descriptors within JDeveloper does not appear to take effect unless you physically restart the IDE!!! This issue drove me nuts for two days. Upon deleting and recreating a TopLink Java object, the fields in the object were continuously being appended as "field1", "field2", "field3" to the class descriptor. Only shutting down the IDE and restarting it seemed to reset the mapping file.
    Thirdly, for whatever reason, JDeveloper will sometimes completely forget what "toplink-deployment-descriptor.xml" is and never allow you to generate it again. Instead it generates something called "toplink-ejb-jar.xml" which promptly blows-up any POJO portion of my project with a "Can't find toplink-deployment-descriptor.xml" error.
    Is anyone else having these problems or are you all using Hibernate?!

    Hi Anuj.
    Your sequence doesn't work for me. The only way I can reliably rebuild my TopLink project is as follows:
    1. Clink on TopLink Mappings, and Remove descriptors from the TopLink Structure pane
    2. For all descriptors in step 1, select the TopLink Java objects and "Erase from Disk"
    3. ** For all Java classes selected in step 2, manually delete all the corresponding .class files from the project's class directory **
    4. ** RESTART IDE **
    5. From Project node, generate TopLink objects anew

  • Newbie: does ADF install/run with Eclipse instead of JDeveloper?

    Hi,
    Can ADF install/run with Eclipse instead of JDeveloper?
    Thx
    -Rob

    If you mean can you design ADF applications with Eclipse then yes, you can do that with Oracle Enterprise Pack for Eclipse. It isn't as full-featured as the JDeveloper experience, though.
    More info: http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html
    Tutorial: http://www.oracle.com/webfolder/technetwork/eclipse/adf/gettingStarted/Tutorial/ADFwithOEPE_1.html
    If you meant something else, please be more specific!
    - Joonas

  • Bad performance when using  complex database view with Toplink

    Hi
    Problem description
    1. I have a complex query that collects the data from many DB tables. For this reason I create a database view based on this select. Using EJB 3.0 with Toplink I
    mapped this view to a java object the same way I map database tables. The method I use to get the results is:
    snippet code...
    public List<VwKartela> VwKartela(Integer pperid) {
    List<VwKartela> results = null;
    Session session = getSessionFactory().acquireSession();
    ExpressionBuilder bankfile = new ExpressionBuilder();
    Expression exp1 = bankfile.get("perid").equal(pperid);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(VwKartela.class);
    query.setSelectionCriteria(exp1);
    results =(List<VwKartela>)session.executeQuery(query);
    When running the select on the view prom SQL Plus I haven’t any performance problem.
    2.Question: How can I improve the performance? I referenced to Toplink docs but I didn't improve the it.
    Have anyone any experience is such cases?
    Thank you
    Thanos

    Hi
    After my last tests I conclude at the followings:
    The query returns 1-30 records
    Test 1: Using Form Builder
    -     Execution time 7-8 seconds
    Test 2: Using Jdeveloper/Toplink/EJB 3.0/ADF and Oracle AS 10.1.3.0
    -     Execution time 25-27 seconds
    Test 3: Using JDBC/ADF and Oracle AS 10.1.3.0
    - Execution time 17-18 seconds
    When I use:
    session.setLogLevel(SessionLog.FINE) and
    session.setProfiler(new PerformanceProfiler())
    I don’t see any improvement in the execution time of the query.
    Thank you
    Thanos

  • Error while deploying Spring PetClinic Demo App(with Toplink OR )on OC4J

    Hi All,
    I am trying to deploy sample app provided with spring framework on oc4j with Toplink as my OR layer, but i am facing issues with the deployment
    App fails to start with error finding "org.springframework.orm.toplink.support.CommonsLoggingSessionLog"
    this is found in toplink-applicatio context.xml file
    i found that this class is missing in spring framework.
    please help to get the jar files
    Thanks
    Raghavendra

    i got the class files. actually in 10.1.3 these class files are put in a different jar file spring-toplink.jar
    The Main issue here is that 10.1.3 toplink production is yet to be integrated into spring 2.
    petClinic will work fine if we use 10.1.3 developer preview edition
    Thanks
    Raghavendra

  • How to Create and Remove CMP Entity with Toplink in same transaction??

    Hi, i have a problem to create and delete cmp intances with toplink.
    I create a entity bean and remove the same entity bean in the same transaction.
    ie. my method have this code:
    bean a = homeBean.create(pk);
    a.remove();
    bean a = homeBean.create(pk);
    this code throws a javax.ejb.DuplicateKeyException
    Toplink not remove CMP, execute the two calls of create first.
    What configure toplink to support this case ??
    Is this possible ??
    I Can't controling the transaction manualy i'm using CMP entity beans with CMT.
    tanks.
    Message was edited by:
    Carlos Lacerda

    BM,
    If you want to import the utils package into your code, then the location of the utils package has to be in your CLASSPATH. JDeveloper uses libraries to define a project's CLASSPATH.
    I'm not sure exactly what's going on here, but you might want to read the information about packages and class libraries in the online documentation. It's under:
    User Guides
    -> Working with JDeveloper
    -> Packages and Class Libraries
    Blaise

  • Why ADF Business Components and TopLink

    Hi All,
    Why are there two types of components in Businses Tier? (ADF Business Components and TopLink). Even through there are other types, I can visualize the use of other components but ADF Business Components & TopLink seems to serve the same requirement.
    Can some one provide me information on what is the difference between these two and when to use which one?

    ADF Business Components (aka BC4J) are different from Toplink from approach point of view. Basically if you are more comfortable with SQL and want fine grain control over what and how SQL are run against the database, BC4J is the way to go, because, it's you who write the queries(in ViewObjects)
    If you are from more of java backgroup and can visualize things in term of Object and relationships among objects, so on and so forth then Toplink would be the right choice.
    Pls see the post by Shay in his blog:
    http://blogs.oracle.com/shay/2006/03/10
    regards - rutwik

  • ADF Query Panel with Tree Table -- Add Fields

    I created ADF Query Panel with Tree Table using JDeveloper 11G. Under Advance Search, Add Fields pull down only list the fields in the master table. My questions are,
    1) Can I search fields in detail table? If yes, how can I do it?
    2) How can I customized this pull down list? Currently it just show the entire view of master table with unnecessary id type data.
    Thanks in advance.
    Edited by: kxc on Nov 9, 2009 9:21 AM

    1) Can I search fields in detail table? If yes, how can I do it?
    Are there anyway to search the second level node?You can. But you need to evaluate if the arrangement works for you.
    I assume you have a view link from the master to detail VO.
    To do so, in your master view criteria (the one which you use in the query panel), shuttle the attributes of your detail VO (in master attributes list, you'l see the detail view link accessor - on selecting this, the detail atteributes are available to you)
    In the Add Fields, it shows as student_id AND student_name. I was unable to delete the student_id field in the view since it is PKYou can set its 'display' UI hint to 'hide' in your VO.

  • ADF 11g + getting the user details in ADF BC layer

    Hello,
    I am using Jdeveloper build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.553
    How to get the user name and roles in ADF BC layer? . I need to get the username in entity layer,view layer and am layer.
    Is there way to write common method to get the username from session data??
    Any advice??
    Thanks
    RB

    Hi,
    You can get User name using EL ---adf.context.securityContext.userName
    and also using---getUserPrincipalName()
    Thanks,
    Vijay

  • Set the value of an adf number slider with java script

    Hi,
    i develop a adf 11 webapplication with JDeveloper 11.
    in one page i use the number slider component and i wish to set the value with a clientlistern in javascript.
    is this possible??
    thanks,
    hannes

    Hi,
    did you try
    slider = AdfPage.PAGE.findComponent("<sliderId>");
    slider.setProperty("value",<your value>);
    Frank

  • How to add adf faces in component pallete of jdeveloper 11g?

    how to add adf faces in component pallete of jdeveloper 11g?

    Hi,
    the replacement of ADF Faces HTML components in JDeveloper 11 is Trinidad. For existing applications, a migration path will be provided in JDeveloper 11 production. I wouldn't recommend configuring ADF Faces in JDeveloper 11.
    You an configure ADF Faces Components in JDeveloper 11 by :
    - Tools --> Manage Libraries
    - Create a User Library
    - select ADF Faces adf-faces-impl.jar
    - Enure the namespace is not af or afh but something different to not cnflic with teh ADF Faces RC components
    Note that adding the ADF Faces components to the component palette will not make them show in the ADF binding context menu nor will it automaticaly set up the web.xml file. The components are available as any other JSF library set
    Again, I wouldn't go this way ;-)
    Frank

  • Problems with toplink in a ROLAP application - please , I need help

    Hello,
    I am not too much experieced with toplink but I want use it for building a ROLAP (relational OLAP) client (something like Discoverer Plus) . Because of an database bug , Oracle Warehouse Builder can not generate materialized views creation scripts that help in agregation . This bug wiil be eliminated in 11gR2 database . OWB generate these materialized views creation scripts in a clob column of database but these scripts is not valid. These scripts can be extracts from database , corect and run .
    This ROLAP-enabled schema is a star schema (a fact table in center sourounded by dimensions tables , with FK in these tables) generated by OWB . It does not have a PK associated with fact table.
    Because of this fact , when I try to generate a status report of map associttiaded with tables from schema , I receive this
         Descriptor SalesCube -> No primary keys specified in SSB.SALES_CUBE table.
    Discoverer Plus does not complain about this PK missing, but it knows fact tables does not have PK .
    Please give an ideea,
    TIA.
    Aurel

    I am using jdeveloper 10.1.3.1 and I get the following error :
    Exception [TOPLINK-6044] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException Exception Description: The primary key read from the row [DatabaseRecord( ORG_DIM_V.FARMACIE_NUME_FARMACIE => Titan 1 => 357142.3)] during the execution of the query was detected to be null. Primary keys must not contain null. Query: ReadAllQuery(app5.model.OrgDimV); nested exception is: Exception [TOPLINK-6044] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException Exception Description: The primary key read from the row [DatabaseRecord( ORG_DIM_V.FARMACIE_NUME_FARMACIE => Titan 1 => 357142.3)] during the execution of the query was detected to be null. Primary keys must not contain null. Query: ReadAllQuery(app5.model.OrgDimV)
    and ,of course, I have a primary key , but on the column ORG_DIM_V.DIMENSION_KEY .
    ORG_DIM_V is o view on the table ORG_DIM and I build PK with this two statements:
    ALTER VIEW SSB.ORG_DIM_V ADD CONSTRAINT org_dim_v_pk PRIMARY KEY (DIMENSION_KEY) disable novalidate
    ALTER VIEW SSB.ORG_DIM_V MODIFY CONSTRAINT org_dim_v_pk RELY
    What's happining?
    Many thanks,
    Aurel

  • "ADF Query panel with table" on a mobile device?

    In an app made for a mobile device, I would like to make a simple screen or set of screens that has a similar features as the "ADF Query panel with table" you get when dropping the All Queriable Attributes on a normal form.
    Can anyone point me to a tutorial or help file that can get me started? Or is this something needing to be built from scratch?

    Thanks, but I've already gone through that tutorial and while it does cover the basics it doesn't go into any detail nor provide a 'next step' reference. It also is missing a couple of steps in the middle to make it work right (unless I missed something.)
    It covers making a quick edit screen and a browse records screen but no search type functionality.
    All of the tutorials I've gone through from Oracle so far seem to be at that same level. They provide a high level overview of what you can accomplish but there is no followup, next step or references.
    I'm starting to feel like the whole process for learning ADF with JDeveloper is
    1. Look at the shiny things you can make with the step by steps.
    2. ....
    3. Now your an expert (Profit)
    Or, of course, pay thousands of dollars to take a class from Oracle.
    I'm not against taking some training when needed, but since our team is still in the process of choosing a framework and IDE, I am looking for a bit more on the front end before I commit us.
    Back on topic... I'm sure I can bang out a couple screens to make this work, but I'm not sure its worth the effort at this point. If I have to go that route I may as well knock out an Android app in Eclipse.

  • Please Help With toplink deployment

    Hello
    I have a simple j2ee application that runs great in jdeveloper but bombs when I deploy it to my OAS server.
    JDev Version 10.1.2
    OAS 10.1.2
    Technologies used
    Struts, toplink
    I have 1 table I mapped with toplink, I have a toplink-deployment-descriptor.xml, sessions.xml and a TopLink Mappings.
    I have a struts action called kicker.
    In kicker I do the following:
    <code>
    oracle.toplink.tools.sessionconfiguration.XMLLoader xmlLoader = new oracle.toplink.tools.sessionconfiguration.XMLLoader("META-INF/sessions.xml");
    oracle.toplink.tools.sessionmanagement.SessionManager sessionManager = oracle.toplink.tools.sessionmanagement.SessionManager.getManager();
    DatabaseSession session = (DatabaseSession)sessionManager.getSession(xmlLoader, "default", Thread.currentThread().getContextClassLoader());
    Vector objects = session.readAllObjects(t3.model.NibuSalaryWorksheets.class);
    System.out.println(objects.size());
    request.getSession().setAttribute("results",objects);
    return mapping.findForward("success");
    </code>
    Then in a jsp page I iterate over the results collection and print it out.
    When I try to deploy this it blows up on the server with the following error :
    Local Exception Stack:
    Exception [TOPLINK-6007] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception Description: Missing descriptor for [class t3.model.NibuSalaryWorksheets].
    Query: ReadAllQuery(t3.model.NibuSalaryWorksheets)
    Can someone please help me, I am desparate to use toplink over ejb's but I can't get it to run on the server.
    thanks
    troy

    Seems to be some kind of classloader issue.
    You can check if the session has a descriptor for the class by calling,
    session.getDescriptor(Class.forName("t3.model.NibuSalaryWorksheets"));
    It is most likely that the class is on the classpath twice.
    Instead of loading the sessions.xml with the thread class loader you could try using the classes class loader.
    i.e.
    DatabaseSession session = (DatabaseSession)sessionManager.getSession(xmlLoader, "default", t3.model.NibuSalaryWorksheets.class.getClassLoader());

Maybe you are looking for