Business components mapped to EJB 2.0 local entity beans

Hi ,
I read about the new feature in JDev 903 that is "Creating business components mapped to EJB 2.0 local entity beans". but I am not able to find any documentation on it.can anyone provide me any link or help on this topic.
Thanx,
Prasoon

Prasoon -
For JDeveloper 10g, version 9.0.5.1, there is information on this topic located in the help:
Building J2EE Applications >
Working with the Business Tier >
Developing Enterprise JavaBean Applications >
Using Business Component Entity Facades
Hope this helps,
Lynn
Java Tools Team

Similar Messages

  • BC4J DAOs vs. Local Entity Beans

    We are beginning a brand new project and trying to evaluate the costs/benefits of using BC4J entity objects versus local entity beans for our persistence needs.
    I've read the "Simplifying J2EE and EJB Development with BC4J" white paper including the "How Does EJB 2.0 Change the Picture?" section, but that seems to have been written at a time when EJB 2.0 support was a rarity.
    I'd like to get some feedback from people who have had experience with both. We are basically starting this application from scratch, although we have relational tables from our legacy C++ application that will serve as the basis for the Java object model. So what would we gain/lose by using entity objects?
    I must admit, I'm leaning toward using entity beans over a vendor-specific persistence framework, but if there are compelling reasons to choose entity objects (besides those mentioned in the white paper), I'd like to hear them. Please speak slowly, as I'm new to BC4J. :)
    Thanks for your time.

    I've read the "Simplifying J2EE and EJB Development with BC4J" white paper including the "How Does EJB 2.0 Change the Picture?" section, but that seems to have been written at a time when EJB 2.0 support was a rarity.IMO there's no change.
    What Sun doesn't tell you in the specs, but is much talked about on theserverside.com and in most
    anti-patterns threads, and in the up coming book J2EE Anti-Patterns; EJB Entities are basically
    broke with no solution. Reason: EjbStore() can throw an exception due to DB constraint violation
    after the business method returns. This drives the scenario where all business integrity is
    forced up into the middle tiers (EJB and business mediator tiers). etc etc ... EJB Entities are
    useful for the 5% to 1% of a business model and application that is transactional IMO.
    I.E. 95%++ of most apps/web sites are read only. Why use a heavy and expensive transactional
    component for reading rows from a DB to be displayed on an Inventory screen? The only reason
    to do this is if you have stock in Sun and your appserver vendor or want your project to last
    forever or get canceled. -- Seriously, do your home work, using Entities as your persistance
    tier mediator, for the 95% of your project that's read only, and for reports which involve
    joins, select criteria etc etc will be a serious problem to just code and even bigger problem
    to be responsive and scalable.
    Do this experiment: implement a report that joins several tables, selects on where criteria,
    orders by some attribute in EJB Entity bean technology. Seriously try to code this solution.
    Hint: spray water on your appserver box since it'll almost explode. :)
    Then try: do the same report in SQL. One SQL statement usually will do it and it's all in the
    DB. The data returned to the middle tier is ready for JSP formating.
    Try another EJB experiment: implement a finder based on criteria that returns a Collection.
    Do the same in SQL: time the perf difference.
    Hint: Maybe you're getting the picture, that EJB Entity 2.0 --> 10.0 what-ever, never wrote into
    the specs any means for joins, or high perf finders based on criteria.
    My opinion and experience: EJB Entity is good for one portion of a project if that; the single
    part that's transactional (usually the shopping cart or similar). All other data access needs
    to be through a DAO tier that's SQL based. With BC4J you get transactional support too, so
    why bother with EJB, except to be wrapped by SLSB's for remotability from the client.
    I'd like to get some feedback from people who have had experience with both. We are basically starting this application from scratch, although we have relational tables from our legacy C++ application that will serve as the basis for the Java object model. So what would we gain/lose by using entity objects? I'm at the end of phase one of a medium scale BC4J project which was initiated after scrapping
    a Sun Blueprint J2EE 1.2 architecture for the above reasons, plus the unmentioned time to market
    issue. We found hand coding the Sun architecture to be 400% slower, if you don't hit any of the
    above mentioned bumps in the road. We never got to reports, which would have been imposible without
    custom DAOs.
    I must admit, I'm leaning toward using entity beans over a vendor-specific persistence framework, but if there are compelling reasons to choose entity objects (besides those mentioned in the white paper), I'd like to hear them. Please speak slowly, as I'm new to BC4J. :)You're not the first to ask this question nor the last. Sun's happy talk in the face of their
    king has great cloths sell job to fend off .net will take more than just J2EE Anti-patterns books
    to displell. Try the reports and finders experiements in EJB 2.0. You'll no doubt learn alot
    and read more news group posts in the process.
    Heck, you might even discover that 903 oc4j's CMR and EQL can instantiate 1000's of Entity beans,
    JNDI entries, return a Collection of handles, your client get the ValueObjects and build a report
    in less than a minute and 100's of customers can do this simultanteously. __NOT__ :)
    Cheers,
    curt

  • Is it possible to map the cmp fields of the entity bean with out dictionary

    Dear sirs,
    I have created the EJB project module and WEB Module. Now i have to map the CMP fields of the entity bean to the underlying table. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
    I have got some error while mapping an EJB's CMP fields to the table through dictionary. I was actually intended to map 79 fields but it gives an error that more than 64 fields are not allowed while building the dictionary.
    1. Can you tell me what could be the possible reason?
    2. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
    Kindly helo me,
    Sudheesh K S

    Hi,
    Sudheesh please check up if the below link helps,there are other ways of writing the persistent.xml for container managed entity bean.
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/f695f0c84acf46a4e0b31f69d8a9b7/frameset.htm, probably in the studio you cannot browse through tables not in  the java dictionary,but manually editing it may still solve the problem.
    Also here is another link that specifies the databases supported by J2EE Engine.
    http://help.sap.com/saphelp_nw04s/helpdata/en/66/a5283eeb47b40be10000000a114084/frameset.htm
    The below link shows how to specify the database vendor and datasource
    http://help.sap.com/saphelp_nw04s/helpdata/en/e1/67fc3ee241ba28e10000000a114084/frameset.htm
    Hope you are able to solve the problem.
    Do let us know if you come up with the solution.
    Regards,
    Harish
    Message was edited by: HARISH SUBRAMANIAN

  • Calling Local Entity Beans from another Application

    Hi,
    I packaged all my Local entity Beans in 1 single Application (APP1.EAR).
    I then I have another Application (APP2.EAR) which is made of Session Beans which require access to the APP1 application.
    I'm using this code to achieve this:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "manager");
    env.put(Context.PROVIDER_URL, "ormi://<host>/APP1");
    context = new InitialContext(env);
    ... (BeanLocalHome)context.lookup("java:comp/env/ejb/BeanLocal");
    I get the Following Exception:
    javax.naming.NameNotFoundException: java:comp/env/ejb/BeanLocal not found
    1) is there any problem with this code?
    2) can local interfaces be accessed by another Application (or can they be accessed only by the same application) ?
    Regards.
    giuseppe.

    Hi ,
    thank you for your answer.
    I'm still in trouble:
    these are the steps:
    App1.jar entity beans.
    App2.jar Session bean.
    I embedded the App1.jar into the App2.ear
    dir :
    App1.jar
    App2.jar
    application.xml (added the App1.jar)
    then I added this in the ejb-jar.xml deployment descriptor for App2.jar
    <ejb-link>../App1.jar#BeanName</ejb-link>
    for each entity bean.
    But I still get :
    javax.naming.NameNotFoundException: java:comp/env/ejb/BeanNameLocal not found
    java.lang.Object com.evermind.server.ApplicationContext.lookup(java.lang.String, boolean)
    ApplicationContext.java:110
    java.lang.Object com.evermind.server.ApplicationContext.lookup(java.lang.String)
    ApplicationContext.java:66
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    What am I missing ??
    Thanks.
    giuseppe.

  • Cannot lookup local entity bean through JNDI

    I have an local entity bean with local-jndi-name as "ejb/Address". After deployed
    to WL 8.1 server and tested on the Admin page, I got:
    The EJB Address has not been tested successfully. There was a problem determining
    the JNDI Name of the given bean.
    When looking up this bean by:
    Object ref2 = context.lookup("ejb/Address");
    or
    Object ref2 = context.lookup("java:comp/env/ejb/Address");
    or
    Object ref2 = context.lookup("/ejb/Address");
    I got the same error:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    remaining name: /app/ejb/iitga_ejb.jar#Address/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
    -- Failed initializing bean access.
    Has anyone successfully deployed/lookuped local entity beans in WL 8.1 server?
    Thanks,

    Does the ejb have a jndi binding?
    "Henry Niu" <[email protected]> wrote:
    >
    I have an local entity bean with local-jndi-name as "ejb/Address". After
    deployed
    to WL 8.1 server and tested on the Admin page, I got:
    The EJB Address has not been tested successfully. There was a problem
    determining
    the JNDI Name of the given bean.
    When looking up this bean by:
    Object ref2 = context.lookup("ejb/Address");
    or
    Object ref2 = context.lookup("java:comp/env/ejb/Address");
    or
    Object ref2 = context.lookup("/ejb/Address");
    I got the same error:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    remaining name: /app/ejb/iitga_ejb.jar#Address/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
    -- Failed initializing bean access.
    Has anyone successfully deployed/lookuped local entity beans in WL 8.1
    server?
    Thanks,

  • Exposing local entity beans to web tier?

    Hello all,
    I have a question concerning basic design issues with EJB and the JSP presentation
    layer. Currently, I have designed a system using all local component interfaces
    of EJB 2.0. I currently have the following architecture in place:
    EJB --> Servlets (WebWork Actions) --> JSP
    I'm utilizing the session facade design pattern where the business logic in encapsulated
    in session beans, which internally access the entity beans, etc. However, I am
    doing something of the following:
    sessionBean.getUserAccounts() which returns a Collection of actual UserAcountLocal's.
    I then am passing this collection off to the JSP just to cycle through each entity
    bean and display the data via its getXXX() methods. No modifications to the entity
    beans are being done directly in the Actions/JSPs, rather they are modified through
    methods of the session beans. Now I know that there is the concept of DTO (Data
    transfer objects), which send the data from the particular entity bean to a regular
    java bean for presentation. I know that DTO's increase performance if one is using
    remote interfaces, because there is less network traffic that occurs via that
    transport method. However, I know that WebLogic performs excellent caching of
    entity beans, so that multiple invocations of get() methods on entity beans will
    not make a trip to the database each and every time the get() method is called.
    So, my question is: Is it "safe" to continue with the current way I am designing/coding
    the system? I just find it a bit tedious to create value objects for each and
    every entity bean, if I know that I will not be calling setXXX() methods from
    within the presentation layer. Also, with EJB 2.0 and the introduction of local
    component interfaces, it seems that issues regarding limiting the amount of network
    traffic don't seem to be so relevant. Any suggestions/tips are appreciated. :-)
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669

    use dtos
    the main reason is that if you call a getXXX() method on a local or remote
    interface from your servlet then that bean is retrieved again (as the
    servlet is outside the transaction involved in the initial retrieval)
    For example if you retrieve 100 users and want to display them in a html
    table with the user id, first name and lastname then there end up being more
    than 300 SQL statements executed (this is unless your ejbs are readonly)
    If you have a tool (like sql server profiler) that traces sql statements i
    recommend you use it to see the staggering amount of sql statements that are
    being executed by your current code - then DTOs will look much more
    appealing (it worked for me) :).
    I would also recommend using dtos when performing updates. Basically work
    towards your servlets never directly accessing anything entity bean related.
    Some people extend this further and have the DTO as the single argument in
    the create method of an entity bean - I havent done this yet myself but it
    looks like a good idea to me.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello all,
    I have a question concerning basic design issues with EJB and the JSPpresentation
    layer. Currently, I have designed a system using all local componentinterfaces
    of EJB 2.0. I currently have the following architecture in place:
    EJB --> Servlets (WebWork Actions) --> JSP
    I'm utilizing the session facade design pattern where the business logicin encapsulated
    in session beans, which internally access the entity beans, etc. However,I am
    doing something of the following:
    sessionBean.getUserAccounts() which returns a Collection of actualUserAcountLocal's.
    I then am passing this collection off to the JSP just to cycle througheach entity
    bean and display the data via its getXXX() methods. No modifications tothe entity
    beans are being done directly in the Actions/JSPs, rather they aremodified through
    methods of the session beans. Now I know that there is the concept of DTO(Data
    transfer objects), which send the data from the particular entity bean toa regular
    java bean for presentation. I know that DTO's increase performance if oneis using
    remote interfaces, because there is less network traffic that occurs viathat
    transport method. However, I know that WebLogic performs excellent cachingof
    entity beans, so that multiple invocations of get() methods on entitybeans will
    not make a trip to the database each and every time the get() method iscalled.
    So, my question is: Is it "safe" to continue with the current way I amdesigning/coding
    the system? I just find it a bit tedious to create value objects for eachand
    every entity bean, if I know that I will not be calling setXXX() methodsfrom
    within the presentation layer. Also, with EJB 2.0 and the introduction oflocal
    component interfaces, it seems that issues regarding limiting the amountof network
    traffic don't seem to be so relevant. Any suggestions/tips areappreciated. :-)
    >
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669

  • User threads and local entity beans

    I have started a background thread to handle transferring large files via ftp. This thread needs to be able to access the entity beans via a local interface (to log its progress). I have started oc4j with -userThreads (debugger -Doc4j.userThreads=true) and I get the NameNotFoundException when trying to find the beans via a local home interface.
    The code looks like this:
    <code>
    InitialContext context = new InitialContext();
    JobLocalHome home = (JobLocalHome)context.lookup(JOB);
    JobLocal job = home.findByPrimaryKey("java:comp/env/ejb/JobLocal");
    </code>
    This code works perfectly when called from the context of another bean, but not from the background thread. Can background threads use local interfaces? Or do I have to have remote interfaces on these beans just to allow the background thread to operate?

    Hi - Resolved this one
    The Target for the compiler was set wrong in Jdeveloper!!!
    Set to "default" resolved this
    Tks

  • Nested EJB QL Query in Entity Bean

    Hi All
    We are using CMP based Entity bean which has name <i>EmployeeBean</i> with a field pSALARY. We want a finder method which return an employee with maximum salary. we are using following Query.
    <b>select object(b) from EmployeeBean  b  where
                        b.pSALARY = (select max(c.pSALARY)  from EmployeeBean c)</b>
    But we validate the query in NWDS but we get following error
    <b>EJB QL statement is invalid. See General User Output View for details.</b>
    General User output view is blank. so we could not analyze the error in this query.
    can anybody tell us what's wrong with this Query. Or else how we should formulate the query in another way so that it gives us required result.
    Thanks in Advance

    Hi
    just try  like this...
    MAX() and MIN() can be used to find the largest or smallest value in a collection of any type of CMP field. It cannot be used with identifiers or paths that terminate in a CMR field. The result type will be the type of CMP field that is being evaluated. For example, the following query returns the highest amount paid for a Job.
    <b>SELECT MAX( job.pSALARY )
    FROM EmployeeBean AS c, IN (c.EmployeeBean) AS job</b>
    The MAX() and MIN() functions can be applied to any valid CMP value including primitive types, strings, and even serializable objects. As you may recall, a CMP field can be a serializable application object that is converted to a binary field and stored in a database. The result of applying the MAX() and MIN() functions to serializable objects is not specified, however, because there is no standardized way of determining which serializable object is greater than another.
    The result of applying the MAX() and MIN() functions to a String is type depends on the underlying data store used. This uncertainty results from problems inherent in String comparisons, which are addressed fully in the section "The Problems with Strings."
    just refer this link also..
    http://www.theserverside.com/articles/article.tss?l=MonsonHaefel-Column5
    Regards
    Kishor Gopinathan

  • EJB 3.0: CMP Entity bean from view

    Hi,
    I have created an entity bean from a database view.
    I don't have a good filed to use as id in my view. So I want to generate the id in my entity bean.
    How can I do this ?
    Thanks

    Hi,
    I didn't get your question.
    CMP is something, which can be done by hand.
    So maybe it is better, to do it manually.
    Bea has some workaround, I am sure.
    Maybe it is something with deployment descriptors, which
    have to be configured to the underlying database.
    Sorry for my stupid first answer.
    Volker.

  • How can I control the EJB's Transaction with entity bean

    If I use entity bean, the Transaction is managed by container.and I want to create JDBC Connection by myselft ,not the Datasource,how is the transaction is controlled by the container,if transaction is not controlled ,how can I control it??

    Hi,
    If you want to control the transaction your self then you need to use javax.transaction.UserTransaction interface and methods defined by it.
    Hope this helps
    Vishal

  • EJB 2.0 cmp entity beans problem with 8.17

    I have a little application as client JBuilder,Weblogic 7.0 on the middleware
    and 8.17 personnal at the backend,with Cloudscape java database,it worked fine.
    I have two tables in it,with a one-to-many relationship,the ClientID from the Clients Table is foreign key in the other.
    But now with 8.17 I have a RollbackException(cannot create Factures instance with the foreign key field null)so I cannot create any instance at the many side from the relation because the ClientID which is with EJB2.0 not a cmp field,is put automatically by the container in the table,
    but this process seems not to work with 8.17,
    what can I do?
    Have someone a solution?

    Hi,
    I didn't get your question.
    CMP is something, which can be done by hand.
    So maybe it is better, to do it manually.
    Bea has some workaround, I am sure.
    Maybe it is something with deployment descriptors, which
    have to be configured to the underlying database.
    Sorry for my stupid first answer.
    Volker.

  • Business Components for Java entity beans of J2EE

    What is the future of Business Components for Java with the new standard entity beans of the sun Java 2 Entreprise Edition?
    Thanks.
    null

    The Standard Entity Beans are a component (JavaBean) that can be a small piece of the ultimate application needs.
    Oracle Business Component for Java is a complete framework that has numerous features that make developing COMPLETE applications easy.
    Please download the white paper on Business Components, try your hand at creating an application with Business Components (using the wizards) and you will see that Business Components for Java is much more than a simple (/complex) reusable component, it is a complete framework which maked developing N-tier applications almost trivial by allowing you to focus on writing your business logic while the framework takes care of all the application infrastructure and the necessary plumbing.
    Sincerely,
    John@Oracle JDeveloper Team http://technet.oracle.com
    null

  • How to persist local entity reference?

    I had a remote entity bean A hold a reference to a remote entity bean B's handle. Now I change them to local entity beans. But Local entity bean doesn't support Handle and I found local entity stub is not even Serializable (WebSphere5.0). How do I persist local entity bean B's reference? This is kind of non-container managed relationship. Why ejb2.0 spec doesn't support local entity Handle? How do you do non-container managed relationship without handle?

    "I had a remote entity bean A hold a reference to a remote entity bean B's handle."
    You hold a reference; as in an instance variable? If so, how did you use the handle? What did you do with the reference when the entity was stored or passivated?
    "Now I change them to local entity beans. But Local entity bean doesn't support Handle... Why ejb2.0 spec doesn't support local entity Handle? "
    Handle objects are intended to assist with holding for long-lived references to remote objects by avoiding the potential problems associated with holding a reference directly to the remote object. Since there are no concerns with respect to working remotely, Local objects do not need a Handle. Just hold reference to the Local directly, like you would any other object.
    "...and I found local entity stub is not even Serializable."
    Well of course not, it's not a remote object. One of the main points driving the use of local interfaces is to limit access to components. Hence only components within the same JVM as the Local can access it.
    "How do I persist local entity bean B's reference?"
    What do you mean by "persist"? Were you actually storing the Handle object into the database?! If so, then I see why you wanted a serializable Local Handle.

  • Adf business components n Ejb Concepts

    peoples. sorry for asking this silly doubts.
    reason behind this question.
    most often use the adf business components i doesnt know it. but now i am learning with help experts blogs. In some blogs, peoples using Ejb concepts.
    but ,some what i know ejb.
    My doubt:
    for desiging an transaction oriented projects. and multiple peoples work on my form.
    what should i use.
    ejb or adf business componets. which is suitable for the transaction orientation.
    please guide me.....

    Either is suitable for transaction semantics.
    Which one you choose would likely depend upon your background. If you are already well versed in EJB/JPA, then you would follow that approach. If you are already versed in ADF BC or Oracle Forms, then ADF BC would be a logical choice. I will also say that Oracle seems to have invested more effort in the ADF BC side of things, so if you are still undecided, then maybe that observation can sway you to the ADF BC side.
    john

  • Difference between business components and EJB

    hello guys, do anyone knows what is the core difference of using ADF Business components and EJB Session Beans ??

    this blog might help http://blog.whitehorses.nl/2012/03/26/adf-11g-bc4j-or-ejb3/
    Timo

Maybe you are looking for

  • Sample Flash applications that can be embedded on DMD

    Does anyone have any sample flash applications that read their configuration data from an external file and that can be embeded in a DMD presentation? And MOST IMPORTANTLY with the .fla file? The ciscoet.com portal has plenty of samples but they are

  • Loading external XML data into XMLObject

    hey all, i've been working on a basic fl2 app that generates a list of posts from an external XML file located on my server (www.omedia.mobi/forum.xml) The swf file is also located there in the same directory .(crime.swf). The app runs fine in the em

  • ABAP proxy web service authentication

    Hi, We are trying to develop an ABAP proxy for a web service call on ECC6 (SP14). The web service (provided by another SAP system) uses basic authentication. The proxy has been created as has the logical endpoint/service (via SOAMANAGER). In the endp

  • My ipod does not appear in tunes

    my ipod does not appear in tunes

  • Getting APPCRASH event on InDesign CS5 on only one file

    I suddenly started having problems last night while trying to re-open a particular file.  The problem details are included below.  I'm not familiar with the "techie jargon" so in advance, please excuse my limited knowledge on this topic.  Here are th