Why ejbActivate and ejbpassivate methods are not in the stateless bean

please give me clearly

You can translate "activate" and "passivate" as follows:
activate means "please fetch the last state for this stateful session bean from the persistent store"
passivate means "the container is going to unload this stateful session bean from memory, so please persist its state in the persistent store"
Neither of those statements apply to stateless session beans, because they're stateless. There's nothing to persist. One SLSB is as good as another for servicing a request. They don't care who their last client was.
%

Similar Messages

  • Why addcomponent and removecomponent method are not in component class,

    Hi,
    why addcomponent and removecomponent method are not in component oand component class,
    Thank you

    java.awt.Container has the appropriate add and remove methods:
    http://java.sun.com/javase/6/docs/api/java/awt/Container.html
    If that seems odd to you, you need to think about the Composite Pattern:
    http://en.wikipedia.org/wiki/Composite_pattern
    [url #" style="display: block; background-image: url('http://upload.wikimedia.org/wikipedia/en/1/13/Compositepattern.png'); width: 406px; height: 271px] 

  • EjbActivate() and ejbPassivate() methods are called million times!!! :(

    Hello All,
    Am I missing some thing here?
    We have a project with many Entity Beans, and all of them have relations with one another. The simple example I can give is Entity A has one to many relation with Entity B.
    i.e There could be one Entity A and for this there could be many Entities B these two entities are managed by CMR fields.
    Entity A has a PK, this would act as a FK in Entity B.
    In the EJB Post create method of Entity B I am trying to find a suitable entity A and trying to execute setEntityA(suitableEntityA), while this method is getting executed here is the things that happen
    the container tries to find all Entity B (if there are 10,000 records in B table then ejbActivate() of B is executed 10,000 times) then it sets the relation with Entity A, then at the end of the Transaction the container will call ejbPassivate() method on Entity B 10,000 times!!! oh god what is happening here...!!!?????
    can some one tell me if I am missing some settings?
    The same thing happends for all the other EJBs which have one to many CMR fields, i.e ejbActivate() and ejbPassivate() of each of these Entity Beans will be called for those many number of times for as many records found in the Datbase of the corresponding Entity.
    I have the follwing setting in my orion-ejb-jar.xml file
    <entity-deployment name="EntityA"
    max-tx-retries="0"
    max-instances="-1"
    location="EntityA"
    table="A"
    data-source="jdbc/oracleDS"
    exclusive-write-access="false"
    locking-mode="optimistic"
    update-changed-fields-only="true"
    delay-updates-until-commit="true">
    similar xml construct for Entity B also!!!
    If some one knows more about this please let me know.
    Thank you
    -Mallik

    Found one more thing for this CMP-CMR relationship and ejbActivate() and ejbPassivate() process of CMP Entity's.
    In this above example if say
    Entity A (Dept) ------ Entity B (Employee) (1:M) has one to many relationship
    Employee holds a FK value which is PK in Dept (dept_id).
    Suppose asssume that there are 10,000 employees working for a dept_id = 5.
    (i.e there are 10,000 records in Employee that references Dept table with dept_id =5)
    Now I want to add one more employee to this dept_id = 5, then I create an Employee entity and in the ejbPostCreate() method of Employee entity I lookup Dept Entity with Dept_PK=5, until this every thing is fine. Now I call setter method with in Employee Entity to set the dept such as setDept_dept_id(detpEntity5), at the execution of this method EJB container calls starts calling Employee Entity's the ejbActivate() method for 10,000 times this equals the number of references Employee table has to Dept table with Dept_ID=5, then at the end of the transaction the container calls ejbPassivate() method 10,000 times to passivate all those ejbs that it activated.
    Did some one experience the same thing with CMP EJBs? please let me know what I have to do to avoid such things?
    Thank you
    Mallik

  • HT4061 I need to sync my iphone and ipad to my new computer.  I just downnloaded itunes in it.  my song and album files are not in the new downloaded itunes.  how do I import them in?

    I just downloaded itunes on my new computer which uses Windows 7. I need to sync my ipone 4S and ipad to it.  I noticed my complete song and album files are not in the new itunes.  how do i get them imported to the new itunes.  Would syncing my iphone and ipad do it?

    In iTunes, go to File>Add File to Library or File>Add Folder to Library.

  • I transferred my iPhoto FACES to my mini iPad and: (a) they are not in the alphabetical order I had them in, (b) some of the FACES have been deleted, (c) the EVENTS I checked off in iTunes do not all appear in the iPad?

    I transferred my iPhoto FACES to my mini iPad and: (a) they are not in the alphabetical order I had them in, (b) some of the FACES have been deleted, (c) the EVENTS I checked off in iTunes do not all appear in the iPad?

    Go to your Pictures Folder and find the iPhoto Library there.
    Right (or Control-) Click on the icon and select 'Show Package Contents'. A Finder window will open with the Library exposed.
    Look there for the iPod Photo Cache. Trash it. Start iPhoto and try sync again.
    Regards
    TD

  • I started a creative cloud student membership but Premiere Pro and After Effects are not in the app

    I started a creative cloud student membership but Premiere Pro and After Effects are not in the app and won't download from the adobe website, all that happens is that the creative cloud app opens and sends me to the list of programs available for download which still do not contain Premiere Pro and After Effects

    Premiere Pro and After Effects are 64 bit only apps.
    They require a 64 bit computer and a 64 bit operating system.
    If you're running Windows 7 32 bit or Windows 8 32 bit then you will not be able to download, install or run Premiere Pro or After Effects.
    See http://www.adobe.com/products/creativecloud/faq.html#desktop-products
    Which desktop applications in Creative Cloud require 64-bit operating systems?
    With the new CC apps, most of the pro video and audio applications now require 64-bit operating systems to run. These native 64-bit applications include Adobe Premiere® Pro CC, Adobe Audition® CC, After Effects® CC, Prelude® CC, and SpeedGrade® CC. Flash Professional CC, Photoshop CC and Lightroom® also require 64-bit on Mac OS.

  • I can not delete or compose an email on iphone 5.  The icon and delete button are not on the screen.

    I can not delete or compose an email on iphone 5.  The icon and delete button are not on the screen.

    I had the same problem.  I completely powered down the iphone and then powered it back up.  I then had the bar at the bottom of the email app that I think you are looking for.
    iPhone5, OS6

  • Iphone 5 - Not working and usual options are not correcting the issue

    My iPhone 5 will not start.  I have tried many options listed on this site, however I have been unsuccesful in resolving the issue myself.
    This is an issue that I had last May, which resolved itself after 2 or 3 weeks.  I was discussing this with Apple support but got no answer on how to fix it.  As it 'self fixed' (i.e. I did not do anything new that I was not trying for 2-3 weeks already and the phone just began operating normally) I guessed it was fixed so I stopped looking for a solution to a problem that did not exist any more.
    However, the problem started again last week. 
    That is to say, the iphone powered down and could not be restarted immediately.  I used the 'hard start' option which worked a couple of times, but now it will not restart.  During an 'up' period, I upgraded the software to the lastest public release thinking that this might help.  However, it has not.
    Now, I only get a visual of the USB cord and a message to connect to itunes.  When I connect to itunes it does not recognize the phone but does recognize that there is a software error.  When I try to restore, it does not work as it brings me back to the error message.
    Anyone any ideas?  I am trying to organise the final pieces of my wedding in 6 weeks and I really need the phone to work right now! I will be contacting apple directly in the mean time, but if anyone has any ideas I would be very grateful.
    Thanks.

    Still I can't do anything ... the phone still same when i tried to re do the steps again given that itunes can't restore the phone " unkown error "
    What to do ?/??

  • Using ADL when Application.xml and Content.swf are not in the BIN directory

    Hello, I am trying to use the air debug launcher (ADL) to
    launch a simple air app. My issue is I am trying to have ADL launch
    this app from outside of the bin directory of the SDK. Whenever I
    try to pass adl the full path to the Applicaiton.xml file it says
    "application descriptor not found" Does anyone know how to get
    around this? How can I run an AIR app that is outside of the bin?
    My situation C:\AIR has the Applicaiton.xml and Content.swf
    files, then a directory way below C:\Program Files\....\..... has
    the bin directory. I can run adl using its full path C:\Program
    Files\....\bin\adl, but when I pass it the full path for
    Application.xml it fails.
    By the way when I put everything in the bin, or below the bin
    it works just fine.

    If you're receiving this error message then the full path
    you're specifying for application.xml must be incorrect.

  • Golden gate extract and replicate process are not running.

    All,
    I am trying replicate data between two oracle databases using golden gate.
    I am trying this scenario in a single machine(two databases and golden gate are on same windows machine)
    1. I have two databases PROD, UAT both are running on 11.2 oracle home.
    2. Created the ggate user both the databases, and enabled supplemental logging.
    3. Ran the following scripts in both databases.
    SQL> @marker_setup.sql
    SQL> @ddl_setup.sql
    SQL> @role_setup.sql
    SQL> grant GGS_GGSUSER_ROLE to ggate;
    SQL> @ddl_enable.sql
    4. Connected the source database (PROD) in ggsci prompt
    GGSCI (home-c07402bbc5) 79> add extract ext1, tranlog, begin now
    add exttrail C:\app\Bhanu\Goldengate\lt, extract ext1
    edit params ext1
    EXTRACT ext1
    USERID ggate@PROD, PASSWORD 123456
    RMTHOST home-c07402bbc5, MGRPORT 7840
    rmttrail C:\app\Bhanu\Goldengate\lt
    ddl include mapped objname bhanu.* // bhanu is a schema in PROD database.
    TABLE bhanu.*;
    5. Connected the target database(UAT) in ggsci prompt
    add checkpointtable ggate.checkpoint
    edit params ./GLOBALS
    GGSCHEMA ggate
    CHECKPOINTTABLE ggate.checkpoint
    add replicat rep1, exttrail C:\app\Bhanu\Goldengate\Mt,checkpointtable ggate.checkpoint
    edit params rep1
    replicat rep1
    ASSUMETARGETDEFS
    userid ggate@UAT, password 123456
    discardfile C:\app\Bhanu\Goldengate\rep1_discard.txt, append, megabytes 10
    map bhanu.*, target kiran.*;
    After that started the extract, replicat using
    start extract ext1, start replicate rep1
    Now the status.
    GGSCI (home-c07402bbc5) 103> info all
    Program Status Group Lag Time Since Chkpt
    MANAGER RUNNING
    EXTRACT STOPPED EXT1 00:00:00 00:11:43
    REPLICAT STOPPED REP1 00:00:00 00:21:16
    Can you please help me what is wrong in my setup and why extract and replicate process are not running.
    Edited by: user12178861 on Nov 19, 2011 11:22 AM

    Thanks for your quick reply.
    I have done few changes but extract, replicate process not running.
    couple of points I would like to share with you regarding my setup.
    1. I am using single golden date instance to replicate the data between PROD and UAT databases.
    2. GGSCI (home-c07402bbc5) 1> dblogin userid ggate@PROD,PASSWORD 123456
    Successfully logged into database.
    GGSCI (home-c07402bbc5) 2> info all
    Program Status Group Lag Time Since Chkpt
    MANAGER RUNNING
    EXTRACT STOPPED EXT1 00:00:00 01:23:29
    REPLICAT STOPPED REP1 00:00:00 01:33:02
    GGSCI (home-c07402bbc5) 3> VIEW REPORT EXT1
    ERROR: REPORT file EXT1 does not exist.
    GGSCI (home-c07402bbc5) 4> start er *
    Sending START request to MANAGER ...
    EXTRACT EXT1 starting
    Sending START request to MANAGER ...
    REPLICAT REP1 starting
    GGSCI (home-c07402bbc5) 5> VIEW REPORT EXT1
    ERROR: REPORT file EXT1 does not exist.
    GGSCI (home-c07402bbc5) 6> info all
    Program Status Group Lag Time Since Chkpt
    MANAGER RUNNING
    EXTRACT STOPPED EXT1 00:00:00 01:24:10
    REPLICAT STOPPED REP1 00:00:00 01:33:44
    Target :
    GGSCI (home-c07402bbc5) 1> dblogin ggate@UAT,PASSWORD 123456
    ERROR: Unrecognized parameter (GGATE@UAT), expected USERID.
    GGSCI (home-c07402bbc5) 2> dblogin userid ggate@UAT,PASSWORD 123456
    Successfully logged into database.
    GGSCI (home-c07402bbc5) 5> add replicat rep1, exttrail C:\app\Bhanu\Goldengate/lt,checkpointtable ggate.checkpoint
    ERROR: REPLICAT REP1 already exists.
    GGSCI (home-c07402bbc5) 6> delete replicat rep1
    Deleted REPLICAT REP1.
    GGSCI (home-c07402bbc5) 7> add replicat rep1, exttrail C:\app\Bhanu\Goldengate/lt,checkpointtable ggate.checkpoint
    REPLICAT added.
    GGSCI (home-c07402bbc5) 8> edit params rep1
    GGSCI (home-c07402bbc5) 9> start er *
    Sending START request to MANAGER ...
    EXTRACT EXT1 starting
    Sending START request to MANAGER ...
    REPLICAT REP1 starting
    GGSCI (home-c07402bbc5) 10> info all
    Program Status Group Lag Time Since Chkpt
    MANAGER RUNNING
    EXTRACT STOPPED EXT1 00:00:00 01:29:46
    REPLICAT STOPPED REP1 00:00:00 00:00:48
    3. Is mandatory that I need two golden gate instances running each side ?
    Thanks for spending your time on this problem.

  • Why to use Interface if methods are not implemented??

    Hello,
    I am having a problem to clearify as, why to use the interfaces which defines only methods and no implementation??
    When a class implements an interface the methods are implemented by the class itself, don't you think that the same functionality can be achieved if the class defined the method itself...
    The why to use interfaces, just that the same method name can be used by many classes or some other reasons..

    did you google on that? There is lots of information I am sure explaining why you code to an interface defined type rather than a class defined type.
    However, fundamentally you are correct, classes define their own type. The idea is that you use an interface because it allows you to have more than one implementation. Plus you can more easily change the structure of your program if you later wish if you did not use the class type directly.
    You get better answers if you ask in the Patterns forum below.

  • HT4059 Why Indian authours and Indians books are not available in your iBooks store.

    Why Indian authours and Indians books are not available in your iBooks store.

    Thats because Indian publishers may have not signed an agreement with Apple. Worst part is even if I want to publish a book for free using official iBooks Author, it does not publish on Indian iBooks Store.

  • HT3775 why some times video and audeo files are not opening in my Mac? sir plz advise me the application i need to download.thanks.

    why some times video and audeo files are not opening in my Mac? sir plz advise me the application i need to download.thanks.

    why some times video and audeo files are not opening in my Mac? sir plz advise me the application i need to download.thanks.

  • My copy and paste functions are not working, does anyone know why this might be happening?, my copy and paste functions are not working, does anyone know why this might be happening?

    my copy and post functions are not working, does any one know why this may be happening and what I could do to fix it? Thanks!

    Have you tried rebooting?

  • My control center and notification center are not showing when I swipe in there respective locations. Does anybody know why?

    My control center and notification center are not showing when I swipe in there respective locations. Does anybody know why?

    Thank you for the sugestion, but it was working fine both on the lock screen and on my home screen. I check all my settings and it is how it was from Friday, when I got the iPhone 5s. It just stop working.  The only way I can fix it is by shutting down the phone. It will work for a while, then it won't. 

Maybe you are looking for