Entity Beans and Session beans to represet Business lOgic

How cam we implement Entity Beans and Session beans to represent Business Logic.
Can anyone explain how can we do this.
Regards...

I have session beans calling method in entity beans and any client
doesn't have access to entity beans, only via session beans.
If i define security policy and method permissions for session beans
only, do entity beans use that permissions when calling their methods
from sessions beans OR should i define the security policy for entity
beans separately?If you want to set the permission on individual
methods of entity bean ( with different roles)
you have to do it separately.
If you want to delegate the Authenticated user along with
the method call to the Entity Bean you can use
run-as-identity-principal.
For more detail please check out the EJB2.0 Spec.
-utpal

Similar Messages

  • Can Entity Bean with Home Business Method replace Stateless Session Bean?

    Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
    I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.

    Requires-new makes the container start a new transaction. Only use that flag
              at the point that you are certain that a NEW transaction should BEGIN. I
              suggest you use Required as your default for all methods in the application,
              and only change that to anything else when you are certain that you should.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "A.J,LEE" <[email protected]> wrote in message
              news:3ba5adb2$[email protected]..
              >
              > I find it result in "dead lock"
              > when I call RequiresNew attributed CMP method in session Bean.
              > Then, Is it possible to use CMP which is set with "RequiresNew"
              transaction attribute?
              >
              > I Wonder why.
              >
              > Thanx in advance.
              

  • Should "Session Facade" Contain any Business Logic

    Hi ,
    According to link
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html
    i.e. Core J2EE Pattern a session facade i.e. Enterprise Session Bean can directly call Entities and DAOs which seems to me adding more complexity to the system rather than reducing. According to my opinion Session Facade should not do any DAO Calls or Entity Reference directly rather it should delegate request to corresponding Handlers (i.e. POJOs) that should further call Service Objects i.e. simple POJOs for DAO calls because I hope this would cause more simplicity rather than adding every thing to Session Bean.
    Note: I want to discuss in EJB 3.0 scenario.
    Looking Forward:
    Asad Ali Rathore.

    946651 wrote:
    i.e. Core J2EE Pattern a session facade i.e. Enterprise Session Bean can directly call Entities and DAOs which seems to me adding more complexity to the system rather than reducing. For some applications yes (I hesitate to say: most), for some, likely those with more complex transaction management requirements, the additional layer is actually a benefit. Its all a matter of perspective; for example if you use JPA then you can argue that that is already a 'dao' and you don't need yet another DAO layer.
    The heart of the matter is: just because that article exists doesn't make it the truth. Do what you think works, not what Sun thought worked.

  • EJB3 - Architecture overview and encouraging re-use of business logic...

    Hi all,
    I am currently learning EJB 3 and have created a blog to share what I have discovered so far. My main interest is promoting re-use so that I can use Spring, EJB3 or another other communication framework.
    I would value any thoughts on what I've written on my SpikyOrange blog.
    Many thanks,
    Rob.

    your spring book seems to refer to EJB prior to the EJB 3.0 standard, when it was still incredibly clunky and hard to maintain. Seeing that you have the O'Reilly Enterprise Javabeans 3 book, I am convinced you will get on the right track now as I personally recommend that book everywhere I can (I get money from the author you know...)
    Even if EJB 3.0 has improved vastly over its predecessors, there is nothing stopping you from combining parts of Spring with EJB technology, and/or even JSF (which in my opinion is one of the cleaner web frameworks around, especially with all the supporting libraries like richfaces and JBoss Seam).
    One complaint about your blog: can you please consider using paragraphs? That large tree of text is hard to read this way!

  • Using JDO under BMP entity beans

    I have an entity bean that is a BMP which uses JDO under the hood. The Oc4J document says that "Bean-managed persistence entity beans manage the resource locking within the bean implementation themselves" in the advanced subject chapter. Ok can someone in oracle add an extra line eloborating on that statement ?
    I am stuck in trying to pass a test that can do concurrent modify of an entity bean. I had 2 or more threads trying to modify one single BMP entity bean object concurrently. The database vendor recognizes one bean had the lock and deny locks to any other beans. Who should block the call to the database until one thread releases the lock on the object ? The developer ? J2EE container ? Database ?
    J2EE tenet "Developers are shielded from concurrency and threading issues while implementing business logic" Does that still hold ??
    An object Person's salary value and his benefit information are tried to be modified at the same time by different external system(salary administrator, benefit's administrator). But I dont want the user to see the lock on the object error, but instead I require a pessimistic lock on the BMP. Why does Oc4J not support pessimistic concurrency option for BMP ?

    Kurien,
    If you wish to bring something to the attention of the "Oracle dev team", I suggest you try Oracle's "MetaLink" Web site:
    http://metalink.oracle.com
    It is the official Oracle support Web site.
    These forums are for the Oracle community. Oracle Corporation employees are not obliged to even visit these forums.
    By the way, I am not an Oracle employee.
    Good Luck,
    Avi.
    P.S. For your information, you may find Debu Panda's blogs of help:
    http://radio.weblogs.com/0135826/

  • Caching data with Entity Bean

    Hello,
    I am performing some tests concerning the benefit of caching data with Entity Bean.
    Here is the case :
    I have an Entity Bean with a business method getName() to retrieve a name field in the EJB.
    I understand that in order to cach data, I have to set the NOT_SUPPORTED transaction attr for this method. In this way, when this method is called, the ejbReload() is not called and the data is retreived from the EJB ready instance (and not from the database).
    Is it true and is it the good way to use the cach mechanism ?
    Now if we consider that this instance is the only one in the ready stage, and it is never pooled (it seems so !), what about a modification of the database from a tier (or from an other EB instance)? The Entity Bean is not able to see this modification seence it does not call the ejbLoad method.
    Is there a way to force an Entity Bean to be periodically polled in order to recover data from the data store when activated ?
    Thanks in advance,
    Thierry

    No, This is wrong way of doing what you want. Most of the application servers provide various configuration settings for this. Eg. caching mechanism, interval on when to call ejbLoad and ejbStore, read only beans. You have to check the documentation for this.
    --Ashwani

  • CAN'T LOOKUP SIMPLE ENTITY BEAN : ''JAVAX.NAMING.NAMINGEXCEPTION: LOOKUP ERROR''

    Hello, we were forwarded to this forum from TAR section of Metalink. We are facing a problem with JDev-RC2/OC4J-9.0.3 and seems that we are hitting Bug 2276197. The BUG is marked as internal and therefore we can't see it. So, it's not clear where the problem is, if in JDev or OC4J or both ?
    Testcase Step-by-step:
    1. Invoke JDeveloper 9.0.3.815
    2. Create a workspace & a project.
    3. Create an default Container-managed Entity Beans frim Tables.
    4. Create Sample Java Client with "Connect to OC4J Embedded in Jdeveloper" and run it, it gives above error.
    You can download a testcase that is part of TAR-2125538.995, that we opened on Metalink.
    Please help. Thanks in advance.

    Hi Radim,
    Personally, I have played a little with JDeveloper, but I am not
    actively using it for my development -- I prefer to do most things
    myself. True, the JDeveloper wizards do a lot of the work for you,
    but at least (with my way), when something goes wrong, I have a
    better idea of where to look.
    So I can't help you much on the JDeveloper side, but an app is an
    app regardless of how you develop it, so I'll offer a list of things
    to check (just in case you haven't already done so :-).
    I haven't looked at your test case, but from your description, I
    assume you have a standalone java client. Again, I assume JDeveloper
    handles the details for you (and it may be doing it wrong -- as
    you suggest), but the way you do your JNDI lookup depends on the
    type of client you use. For a standalone java client (that is also
    deployed to OC4J), your "initial context factory" class should be:
    com.evermind.server.ApplicationClientInitialContextFactory
    and your "provider URL" should be:
    ormi://<host>/<app-name>
    where <host> is the name of the computer where OC4J is running
    (you can also use "localhost") and <app-name> is the name given
    to your application at deployment time. Again, JDeveloper handles
    the deployment, but the "app-name" should also appear in the
    "server.xml" configuration file which is usually located in the
    "config" subdirectory of the OC4J home directory.
    The lookup string for your entity bean should be the "logical"
    name, meaning the name of your bean prefixed with "java:comp/env".
    Again, I guess JDeveloper handles the bean name part for you,
    but the bean name appears in the "ejb-jar.xml" file under the
    "ejb-name" element.
    So if you've already checked all of the above, then please excuse
    me for not telling you anything you don't already know.
    Good Luck,
    Avi.

  • Where to implement my Business Logic in ADF?

    Hi,
    I am new to Oracle ADF. I found this forum very useful to get my queries and doubts answered. Thanks to the participants.
    I am basically from Struts background,
    Where i design my UI in jsp pages using Struts tags,
    Actions and some utility classes handles my most of the business logic (generally called as Business Layer)
    Then i have custom DAOs or Data Layer to query or update the data in database.
    Now as I am into new Project and I have to learn Oracle ADF.
    I started learning this by following some questions in the forums and various sites (from Google).
    I got info on How to create Entity Objects, Value objects etc.
    But my major doubt is where shall i write my Business Logic in this stack?
    I can easily drag and drop my data controls into my JSF page and create table, forms or charts. But if i have a multi line business logic, say for a Submit button, In which i may be doing the following steps -
    a.  Get data pertaining to user role , department, his tenure in the department etc
    b. On submit do processing based on data collected in above step.
    c. update data in data base.
    d. initiate an approval process
    e. call some business process for Approval
    f. Audit Trail
    g. Transaction handling
    and so many other steps (I know most of you will have gone through these situation before starting work on ADF)
    Now, in the above scenario in Oracle ADF layers where shall i write this whole bunch of logic or steps and then forward the user the page depending upon the outcome of this logic.
    Please let me know where to write all this??
    Thanks a lot,
    Amit
    Edited by: ur.amit on May 13, 2010 4:58 PM

    Generally speaking all of that code would reside in the app module Impl classes or the View object Impl classes - for VOs and AMs you can expose subclasses and add code in there - you can then define whether any of your methods should be exposed to the client, in which case they appear in the Data Controls panel as operations.
    General word of advice -keep business logic code in the Model - don't be tempted to start trying to access your AMs and do any of this stuff from the ViewController project. Keep it nice and simple and just access ALL the business logic code through ADF Model.
    Hope this helps
    Grant

  • Business logic in Database layer or in Middle layer.

    I am converting my form 6i client server application to .net 3 tier web architecture application using oracle 10g database.
    My application is a very data centric, millions of records calculations happen in many processes.
    I have a problem while presenting my design approach to engineering board in my company.
    Approach 1
    Put business logic in backend database layer.
    I proposed to put business logic in backend packages rather than putting it in middle .net layer and create web shell services in middle layer which would call these packages and show the data on screens.
    Approach 2
    Put business logic in middle tier .net layer.
    My company engineering board are more keen for this approach because they think this is the latest approach and now days nobody put business logic in database and moreover we would be having clear separation between data and logic.
    But my concern is we may have network latency issues in approach 2 because we need to move millions of records data back and forth between database and application server.
    Could you please suggest, which approach is best and why?

    My views:
    1. If it is a data centric operation, like you have mentioned, it will be a bottleneck to transfer the required data to middle tier for processing
    2. If you are going to support one and only one RDBMS as a backend ever, I don't see a reason to take an approach which is mostly taken in case one needs to support databases from different vendors as back end.
    3. If you are convinced that yours is the only application that would ever connect to this database, then you can add the business logic in the middle tier; If not, let it be in the database in form of triggers/procedures/functions/packages etc.
    4. Last but not the least, having business logic in the database would call for faster processing and that you can use all features of that particular RDBMS to full extent, in case needed.
    I always support having the business logic in the database layer (not that I hate business logic in application/middle tier) but there can be exceptions.
    Just my two cents :-)

  • Business logic in PL/SQL?

    Hello,
    I am designing a 3-tier, web-based intranet application for my client. It's going to be a WebSphere portal app with Struts, running on Oracle 8.1.7.
    One of the requirements is to implement the business logic in the back-end (PL/SQL), not in Java (although that is what I'm used to do). The reason probably has something to do with fear of performance issues ("the more code runs in Oracle, the faster") and resource planning ("more people here know Oracle better than Java").
    This unusual (?) choice in my humble opinion leaves me with two major issues; how to cache database results and how to perform the O/R mapping.
    I know how to use CallableStatements and JDBC, but I'd really like to avoid such a solution now we have EJB 2.1 and Hibernate and everything. And without caching as done by any sensible app server I fear performance issues.
    Does anyone know a tool that can perhaps generate Java code and performs the O/R mapping? Or a tool that avoids me having to implement up to a hundred (!) CallableStatements and ResultSet-To-JavaBean mappings. I've seen Apache's commons-dbutils that seems to do this.
    Does anyone have experience implementing business logic in PL/SQL and calling procedures from Java? Is performance really an issue here?
    Thanks in advance for any input,
    regards,
    Bram Rooijmans

    This unusual (?) choice in my humble opinion leaves me
    with two major issues; In non-trivial applications excluding all business logic from the database is usually an architecture or design bug. Businesses do use the database directly due to legacy, tools, comfort level, etc. And in those cases the data still needs to be consistent. Not to mention that for some business logic the database can be orders of magnitude faster in running it versus external logic.
    On the other hand I would consider it a bug as well if someone told me that all the business logic must be in the database and no where else. (At the very least I would suspect and question their definition of business logic in that case.)
    I know how to use CallableStatements and JDBC, but I'd really like to avoid such a solution now...How are you going to implement any non-trivial business logic in oracle without using stored procs?
    Does anyone have experience implementing business logic in PL/SQL and
    calling procedures from Java? Not sure of the question. Certainly I have implemented business logic in PL/SQL. And many people have used stored procs via java.
    Is performance really an issue here?No idea. That is a dependency of your system, not of java/databases in general.
    I have seen java only solutions that even with scalling take hours to do operations that could be done in much less time using the database itself.
    I have seen requirements which would have taken hours even in the database and changing the requirements meant it took less than 2 minutes. (It had nothing to do with java nor the database.)
    I have seen code implementations which took significant database processing time where the entire solution could have been done without the database at all.
    I have seen solutions where, due to business requirements, the same business logic was implemented in different languages and in slightly different ways in each. Implementing the logic in stored procs meant that all of the systems that used it now would be using the same rules. In that case it is possible that the solution was actually slower. But if it was it was not noticed and the consistency was much more important.

  • Can Write Full business logic in web Dynpro ?

    Hi All
           We are developing many Iviews with WebDynpro and
           same time where we need to write the pure business logic ?
           Can we write in Web Dynpro ? Any issues on this ?
    Any one can help me on this pl
    regards
    rakesh

    At a purely technical level, then you can of course write business login in Web Dynpro - after all, it is still just Java (or ABAP). The real question here is whether that is a good idea.
    I think that Web Dynpro works best as a presentation and application-flow framework - actual business logic is best implemented in another layer. This can be done in EJBs in Java, but in most SAP landscapes my experience is that the business logic layer is best implemented in ABAP, since the ABAP back-end is most naturally the place where all business logic exists. Of course, if you only have Java developers and you are using Java Web Dynpro, then an EJB-based business logic layer may be more comfortable to implement.
    Hope this helps,
    Darren
    <a href="http://www.fortybeans.com/">blog</a>

  • Session vs Entity Bean in Business Layer???

    Hi,
    I am developing a Hotel Management System project, I am planning to use the following softwares for it:-
    Presentation - JSP
    Web controller - Action class(Struts)
    Business Layer - Session Facade( Stateless Session Bean)
    DAO - Hibernate
    DB - Oracle 9i
    Model - ValueObject
    This is what i have decided to use to build the flow of the application.
    I have an idea about JSP,STRUTS,HIBERNATE & ORACLE. Since i have used it before.
    But in the case of business layer, i have doubt (since i am going to use EJB for the first time) whether to use a Session bean or entity bean where i will be writing my own queries(Stored proc.) as well as i will be using the predefined functions of hibernate to store the data .
    I also want to know whether i need to go for StatefullSB or Stateless SB if i use a sessionfacade(which i have planned to do)??
    When in what situation i need to for this approach???
    Please provide an answer for this & pls. do mention my flow is right or
    wrong??
    Excepting ur valuable thoughts..
    Thanks,
    JavaCrazyLover

    Hi
    I also want to know whether i need to go for StatefullSB or Stateless SB if i >use a sessionfacade(which i have planned to do)??
    When in what situation i need to for this approach???That depends on how your application will be used.
    Stateless and Statefull session bean are different.
    If you want to keep informations such as shopping cart, you can use Statefull.
    If you plan to have a huge number of request at time, Stateless can be faster.
    You can also keep your information such as shopping cart in the session scope of your web jsp tier. (if you use only web client.)
    In your case, i would choice, Stateless.
    Anybody, correct me if i'm wrong.
    Tks.

  • How many ejbCreate() can be in Session and Entity Bean???

    Hi,
    How many ejbCreate() method can be in a Session and Entity
    Bean???
    How many can be in Stateless and Stateful SessionBean???
    How many can be in CMP and BMP SessionBean???
    Thanks,
    JavaCrazyLover

    How many ejbCreate() method can be in a Session
    ion and Entity
    Bean???For Stateful Session Beans and Entity Beans, as many as you'd like.
    Stateless Session beans can only have one, since their ejbCreate methods can not take any parameters.
    >
    >
    How many can be in CMP and BMP SessionBean???If you mean CMT/BMT(Container-Managed transactions / Bean-Managed Transactions), then
    the answer is the same. The create method requirements are independent of the transactional nature of the bean.
    If you really mean CMP/BMP(Container-Managed Persistence / Bean-Managed Persistence) , it doesn't apply to session beans, only entity beans. However, even for entity beans, CMP vs. BMP has no bearing on the rules regarding # of create methods.
    --ken
    >
    >
    Thanks,
    JavaCrazyLover

  • NON-transactional session bean access entity bean

    We are currently profiling our product using Borland OptmizeIt tool, and we
    found some interesting issues. Due to our design, we have many session beans which
    are non transactional, and these session beans will access entity beans to do
    the reading operations, such as getWeight, getRate, since it's read only, there
    is no need to do transaction commit stuff which really takes time, this could
    be seen through the profile. I know weblogic support readonly entity bean, but
    it seems that it only has benefit on ejbLoad call, my test program shows that
    weblogic still creates local transaction even I specified it as transaction not
    supported, and Transaction.commit() will always be called in postInvoke(), from
    the profile, we got that for a single method call, such as getRate(), 80% time
    spent on postInvoke(), any suggestion on this? BTW, most of our entity beans are
    using Exclusive lock, that's the reason that we use non-transactional session
    bean to avoid dead lock problem.
    Thanks

    Slava,
    Thanks for the link, actually I read it before, and following is what I extracted
    it from the doc:
    <weblogic-doc>
    Do not set db-is-shared to "false" if you set the entity bean's concurrency
    strategy to the "Database" option. If you do, WebLogic Server will ignore the
    db-is-shared setting.
    </weblogic-doc>
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jinsong,
    You may want to read this to get more detailed explanation
    on db-is-shared (cache-between-transactions for 7.0):
    http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1127563
    Let me know if you have any questions.
    Regards,
    Slava Imeshev
    "Jinsong HU" <[email protected]> wrote in message
    news:[email protected]...
    Thanks.
    But it's still not clear to me in db-is-shared setting, if I specifiedentity
    lock as database lock, I assumed db-is-shared is useless, because foreach
    new
    transaction, entity bean will reload data anyway. Correct me if I amwrong.
    Jinsong
    "Slava Imeshev" <[email protected]> wrote:
    Jinsong,
    See my answers inline.
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    Thanks for your reply, actually, I agree with you, we need to
    review
    our db
    schema and seperate business logic to avoid db lock. I can not say,guys,
    we need
    to change this and that, since it's a big application and developedsince
    EJB1.0
    spec, I think they are afraid to do such a big change.Total rewrite is the worst thing that can happen to an app. The
    better aproach would be identifying the most critical piece and
    make a surgery on it.
    Following are questions in my mind:
    (1) I think there should be many companies using weblogic serverto
    develop
    large enterprise applications, I am just wondering what's the maintransaction/lock
    mechanism that is used? Transional session / database lock,
    db-is-shared
    entity
    I can't say for the whole community, as for my experience the standard
    usage patthern is session fasades calling Entity EJBs while having
    Required TX attribute plus plain transacted JDBC calls for bulk
    reads or inserts.
    is the dominant one? It seems that if you speficy database lock,
    the
    db-is-shared
    should be true, right?Basically it's not true. One will need db-is-shared only if thereare
    changes
    to the database done from outside of the app server.
    (2) For RO bean, if I specify read-idle-timeout to 0, it shouldonly
    load
    once at the first use time, right?I assume read-timeout-seconds was meant. That's right, but if
    an application constantly reads new RO data, RO beans will be
    constantly dropped from cache and new ones will be loaded.
    You may want to looks at server console to see if there's a lot
    of passivation for RO beans.
    (3) For clustering part, have anyone use it in real enterpriseapplication?
    My concern, since database lock is the only way to choose, how aboutthe
    affect
    of ejbLoad to performance, since most transactions are short live,if high
    volume
    transactions are in processing, I am just scared to death about
    the
    ejbLoad overhead.
    ejbLoad is a part of bean's lifecycle, how would you be scared ofit?
    If ejbLoads take too much time, it could be a good idea to profile
    used SQLs. Right index optimization can make huge difference.
    Also you may want cosider using CMP beans to let weblogic
    take care about load optimization.
    (4) If using Optimization lock, all the ejbStore need to do
    version
    check
    or timestamp check, right? How about this overhead?As for optimistic concurrency, it performs quite well as you can
    use lighter isolation levels.
    HTH,
    Slava Imeshev
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    We are using Exclusive Lock for entity bean, because of we do
    not
    want
    to
    load
    data in each new transaction. If we use Database lock, that means
    we
    dedicate
    data access calls to database, if database deadlock happens,
    it's
    hard
    to
    detect,
    while using Exclusive lock, we could detect this dead lock in
    container
    level.
    The problem is, using Exclusive concurrency mode you serialize
    access to data represented by the bean. This aproach has negative
    effect on ablity of application to process concurrent requests.As
    a
    result the app may have performance problems under load.
    Actually, at the beginnning, we did use database lock and usingtransactional
    The fact that you had database deadlocking issues tells that
    application logic / database schema may need some review.
    Normally to avoid deadlocking it's good to group database
    operations mixing in updattes and inserts into one place so
    that db locking sequence is not spreaded in time. Moving to
    forced serialized data access just hides design/implementation
    problems.
    session bean, but the database dead lock and frequent ejbLoad
    really
    kill
    us,
    so we decided to move to use Exclusive lock and to avoid dead
    lock,
    we
    change
    some session bean to non-transactional.Making session beans non-transactions makes container
    creating short-living transactions for each call to entity bean
    methods. It's a costly process and it puts additional load to
    both container and database.
    We could use ReadOnly lock for some entity beans, but since weblogicserver will
    always create local transaction for entity bean, and we found
    transaction
    commit
    is expensive, I am arguing why do we need create container leveltransaction for
    read only bean.First, read-only beans still need to load data. Also, you may seeRO
    beans
    contanly loading data if db-is-shared set to true. Other reason
    can
    be
    that
    RO semantics is not applicable the data presented by RO bean (forinstance,
    you have a reporting engine that constantly produces "RO" data,
    while
    application-consumer of that data retrieves only new data and neverasks
    for "old" data). RO beans are good when there is a relatively stable
    data
    accessed repeatedly for read only access.
    You may want to tell us more about your app, we may be of help.
    Regards,
    Slava Imeshev
    I will post the performance data, let's see how costful
    transaction.commit
    is.
    "Cameron Purdy" <[email protected]> wrote:
    We are currently profiling our product using Borland
    OptmizeIt
    tool,
    and we
    found some interesting issues. Due to our design, we have
    many
    session
    beans which
    are non transactional, and these session beans will access
    entity
    beans
    to
    do
    the reading operations, such as getWeight, getRate, since
    it's
    read
    only,
    there
    is no need to do transaction commit stuff which really takes
    time,
    this
    could
    be seen through the profile. I know weblogic support readonly
    entity
    bean,
    but
    it seems that it only has benefit on ejbLoad call, my test
    program
    shows
    that
    weblogic still creates local transaction even I specified
    it
    as
    transaction not
    supported, and Transaction.commit() will always be called
    in
    postInvoke(),
    from
    the profile, we got that for a single method call, such as
    getRate(),
    80%
    time
    spent on postInvoke(), any suggestion on this? BTW, most of
    our
    entity
    beans are
    using Exclusive lock, that's the reason that we use
    non-transactional
    session
    bean to avoid dead lock problem.I am worried that you have made some decisions based on an improper
    understand of what WebLogic is doing.
    First, you say "non transactional", but from your description
    you
    should
    have those marked as tx REQUIRED to avoid multiple transactions
    (since
    non-transactional just means that the database operation becomesits
    own
    little transaction).
    Second, you say you are using exclusive lock, which you shouldonly
    use
    if
    you are absolutely sure that you need it, (and note that it
    does
    not
    work in
    a cluster).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Jinsong Hu" <[email protected]> wrote in message
    news:[email protected]...
    >

  • Container Managed Entity Beans and Client Identifier in Oracle

    Is it possible to use Container Managed Entity Beans (EJB with CMP)
    in a way that the Oracle database sessions still know the
    individual Client Identifiers of the actual users
    (not just the Identifier of the proxy user defined in the
    Connection Pool)?
    If Yes: How?
    If No: The consequence would be that the
    technologies EJB with CMP cannot be user together with
    Oracle Virtual Private Databases (VPN) because VPN requires
    some kind of Client Identifier.
    I am grateful for any hint.
    Regards,
    Martin Siepmann
    +49 (0)163 / 7765328

    Not quite an auto-incrementing PK, but it is managed by the container. the following is from the turorial
    Generating Primary Key Values
    For some entity beans, the value of a primary key has a meaning for the business entity. For example, in an entity bean that represents a phone call to a support center, the primary key might include a time stamp that indicates when the call was received. But for other beans, the key's value is arbitrary--provided that it's unique. With container-managed persistence, these key values can be generated automatically by the EJB container. To take advantage of this feature, an entity bean must meet these requirements:
    * In the deployment descriptor, the primary key class is defined as a java.lang.Object. The primary key field is not specified.
    * In the home interface, the argument of the findByPrimaryKey method must be a java.lang.Object.
    * In the entity bean class, the return type of the ejbCreate method must be a java.lang.Object.
    In these entity beans, the primary key values are in an internal field that only the EJB container can access. You cannot associate the primary key with a persistent field or any other instance variable. However, you can fetch the bean's primary key by invoking the getPrimaryKey method, and you can locate the bean by invoking its findByPrimaryKey method.
    Maybe that is good enough
    christina

Maybe you are looking for

  • Audio and video played inside of apps will no longer work.

    I use several apps to listen to audio and within the last few days I tried listening to NPR but when I hit "play" it would just buffer and never play. I then attempted to download some podcasts via iTunes as an alternative and kept  getting an error

  • How to repair the failed delta from R/3 - 0CCA_C11

    Hi experts, Due to R/3 refresh the delta load from 0CO_OM_CCA_9 -> 0CCA_C11 is failed on july19, 2008. but on July 20 another delta is successfully loaded in to the cube after the R/3 refresh. My question is I can reinit the cube from R/3 and do a fu

  • Doubt abt proxies

    hi this is seshagiri. i have doubt abt proxies. when u created ABAP server proxy,objects were generated.     1. ABAP interface     2.structure for data type     3. structure for msg type WAT IS THE DIFFERENCE BETWEEN DATATYPE STRUCT AND MSG TYPE STRU

  • Font too large on itunes screen.  How do I reduce it?

    Just downloaded latest itunes.    The font is huge and you can't get very much on the screen.    How do I reduce the size?   Searched everywhere but can't find any view option to do this.

  • Motivations to buy a Mac Powerbook

    Dear all, I am thinking to buy a Mac Powerbook. However, I need advice from Mac fans. What are good and bad points about using a Mac Power book? Thanks a lot! SONY   Windows XP