Need help about entity bean relationshi

I have two entity bean,userBean(userid,username,password,email)and subscriptionBean(email,subtopic).so email column is FK,right?
but both email,subtopic fields in subscriptionBean are NOT set to be unique,i mean there should be many same email address with difference subtopic subscriptions.
so NO primaryKey in my second entity bean.is it OK?

Hello,
Your EJB MUST have a primary key !, so add a field ( maybe subscriptionId) to you bean which will be unique.
Regards,
Sebastien Degardin.

Similar Messages

  • Very Basic Question about Entity Beans !!!  Need your help.

    Hi,
    I have the following requirement:-
    ==============================
    There is an application A, whose multiple instances can run
    at the same time. There is some data/variable which is to be
    globally shared (i.e by all the instances). I have thought of using
    Entity Beans and putting that data in a single record in DB.
    Approach A:-
    ~~~~~~~~~~~
    Instance 1 of A (with Entity Bean ) -
    -> Database (only 1 row exist)
    Instance 2 of A (with Entity Bean ) -
    Approach B:-
    ~~~~~~~~~~~
    Instance 1 of A
    -> Entity Bean -> Database (only 1 row exist)
    Instance 2 of A
    My Query is:-
    1) In Approach A, both the instances of Application
    have their own Entity Bean (running in same JVM as them,
    packaged with Application)..Now both the entity bean instances
    represent 1 row on Database...At one time only 1 Entity bean
    will be performing the operation (read/write, other will be
    disallowed).
    2) In Approach B, both the instances of application(or Client) using
    the same Entity Bean - which is representing 1 row of Database
    Which is correct....I have read somewhere instance of Entity Bean
    corresponds to 1 row of database....If that is the case, Approach
    A would be wrong..
    Please help.

    1 Entity bean for 1 row is not true. An entity bean can represent data from multiple tables also. The correct statement is 1Entitybean for 1 resultset.
    So in case 1, u have 2 instances of Application running so it should not be an issue.

  • Need help about Hidden Markov Model model

    I want to make classification for EEG signal using Hidden Markov Model
    algorithm based on neural network.
    plz need help about how to implement this algorithm using LABVIEW.
    if not I want another thing to make classification.
    any one know information about this topic, send me a reply
    thanks

    Have you derrived the HMM that you want to implement?
    If so, post the algorithm and we can provide comments on how to implement it using LabVIEW.
    Message Edited by Ray.R on 04-12-2010 12:54 PM

  • Need help about ref cursor using like table

    Hi Guys...
    I am devloping package function And i need help about cursor
    One of my function return sys_refcursor. And the return cursor need to be
    join another table in database . I don't have to fetch all rows in cursor
    All i need to join ref cursor and another table in sql clause
    like below
    select a.aa , b.cc form ( ref_cursor ) A, table B
    where A.dd = B.dd
    I appeciate it in advance

    My understanding is that you have a function that returns a refcursor and is called by a java app.
    Because this is a commonly used bit of code, you also want to reuse this cursor in other bits of sql and so you want to include it like table in a bit of sql and join that refcursor to other tables.
    It's not as easy as you might hope but you can probably achieve this with pipelined functions.
    Is it a direction that code should be going down? yes, eventually. I like the idea of pulling commonly used bits of code into a SQL statement especially into the WITH section, provided it could be used efficiently by the CBO.
    Is it worth the effort given what you have to do currently to implement it? possibly not.
    what else could you do? construct the sql statement independently of the thing that used it and reuse that sql statement rather than the refcursor it returns?
    Message was edited by:
    dombrooks

  • Need help about boot SUNFIRE V120

    Hi all....
    I need help about how to change boot from boot net to boot disk....
    after i installed sun solaris 10 at my sunfire v120, then reboot the machine ... this sunfire still boot from net not from disk...
    can i change it?
    please i really need help ....
    thanks

    If its booted, try "eeprom boot-device=disk"
    If your at the OBP, "setenv boot-device disk".
    If that doesnt work check the value of "diag-switch?".
    It could be booting off the the diag-device instead

  • Need Help about 3D and revolving in illustrator

    I really need help about 3D, Please tell me that How i create 3D in illustrator
    i want to revolve text or shape around any object like this, any plugin? or other software required for this?
    if somebody know this it will be really help full
       http://rcgrafix.fizwig.com/1452732-large.jpg    
       http://rcgrafix.fizwig.com/1384370-large.jpg
       http://rcgrafix.fizwig.com/1062180-large.jpg
    Thanks
    Arsi

    if links are not working try Copy and paste it in to your browser address bar
    thank you

  • Need help about the SHA Message Digest ? & what is use of Message Diagest ?

    need help about the SHA Message Digest ? & what is use of Message Diagest ?
    1>i have one program of making message digest
    2>which requires two files name
    3>one for input like txt
    4> second is out put file of message digest
    can any one tell what is the use of second generated file .

    MessageDigest md = MessageDigest.getInstance("SHA");
    FileInputStream fis = new FileInputStream(args[0]);
    byte[] b = new byte[1024];
    int readed = -1;
    while((readed = fis.read(b)) > 0)
         md.update(b, 0, readed);
    fis.close();
    FileOutputStream fos = new FileOutputStream(args[1]);
    byte[] d = md.digest();
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < d.length; i++) {
         String str = Integer.toHexString(d[i] & 0xff);
         sb.append(str.length() < 2 ? "0" + str : str);
    fos.write(sb.toString().getBytes());
    fos.close();

  • Need help about 1015

    need help about 1015 it says connect iphone to itunes on screen i did it but it doesnt work and says unexpected 1015

    Try restoring it: Make sure you are following the instructions in this procedure to the letter.  Here they are, with emphasis on some easily overlooked requirements:
    Disconnect the USB cable from the iPhone, but leave the other end of the cable connected to your computer's USB port.
    Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.If you cannot turn off the device using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the device turns off, release only the Sleep/Wake button.
    Continue pressing and holding the Home button while you reconnect the USB cable to the device. The device should turn on.
    Note: If you see the "low battery" screen, let the device charge for at least ten minutes to ensure that the battery has some charge, and then start with step 2 again.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears (iTunes icon and USB connector) release the Home button.
    If necessary, open iTunes. You should see the "recovery mode" alert ("iTunes has detected a phone in recovery mode").
    Use iTunes to restore the device.
    If you do not see the "Connect to iTunes" screen, try these steps again.
    If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    If you have backed up the iPhone in the past, select the device in iTunes and choose "restore from backup".

  • Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with my Ipad,

    Hi, Need help about ios7 upgrade, after this upgrade I cannot watch youtube or any video with Ipad, and Iphone as well
    I think my wireless rooter's setting has some problem but cannot found anything to solve,
    I can watch if there is another wireless network , I tried this option in another place who has wireless network and I can watch.
    Do you have any idea to do these setting , I dont have any problem when Ipad has 6.1.3 IOS,
    need help
    thanks

    Thanks
    I will and share the result.

  • Questions about entity bean caching/pooling

    We have a large J2ee app running on weblogic6.1 sp4. We are using entity beans
    with cmp/cmr. We have about 200 EntityBeans and accessed quite heavily. We are
    struggling with what is the right setting of max-beans-in-cache and idle-time-out.
    The current max heap setting is 2GB. With the current setting (default setting
    of max-beans-in-cache to 1000, with a few exceptions to take care of cachefullexceptions)
    we run into extended gc happening after about 4 hours. The memory freed gradually
    reduces with time and lurks around the 30% mark after about 4 hours of run at
    the expected load. In relation to this we had the following questions
    1. What does caching mean?
    a. If a bean with primary key 100 exists in the cache, and the following
    is done what is expected
    i. findByPrimaryKey(100)
    ii. findBySomeOtherKey(xyz)
    which results in loading up bean with primary key 100
    iii. cmr access to bean with
    primary key 100
    Is the instance in the cache reused at all between transactions?
    If there is minimal reuse of the beans in cache, Is it fair to assume that caching
    can only help loading of beans within a transaction. If this is the case, is there
    any driver to increase the max-beans-in-cache other than to avoid CacheFullException?
    In other words, is it wrong to say that max-beans-in-cache should be set to the
    minimum value so as to avoid CacheFullExceptions.
    2. Again what is the driver of setting idle-time-out to a value? ( We currently
    have it at 30 secs) Partly the answer to this question would again go back to
    what amount of reuse is done from cache? Is it right to say that it should be
    set to a very low value? (Why is the default 10 min?)
    3. Can you provide us any documentation that explains how all this works
    in more detail, particularly in relevance to entity beans. We have already read
    the documentation from weblogic as is. Anything to give more explicit detail?
    Any tools that can be of use.
    4. What is the right parameter (from among the things that weblogic console
    throws up) to look at for optimizing?
    Thanks in advance for your help
    Cheers
    Arun

    The behaviour changes according to these descriptor settings: concurrency-strategy,
    db-is-shared and include-updates.
    1. If concurrency-strategy is Database, then the database is used to provide locking
    and db-is-shared is ignored. A bean's ejbLoad() is called once per transaction,
    and the 'cache' is really a per-transaction pool. A findByPrimaryKey() always
    initially hits the db, but can use the cache if called again in the same txn (although
    you'd simply just pass a reference around). A findByAnythingElse() always hits
    the db.
    2. If concurrency-strategy is ReadOnly then the cache is longer-term: ejbLoad()
    is only called when the bean is activated; thereafter, the number of times ejbLoad()
    is called is influenced by the setting of read-timeout-seconds. A findByPrimaryKey()
    can use the cache. A findByAnythingElse() can't.
    3. If concurrency-strategy is Exclusive then db-is-shared influences how many
    times ejbLoad() is called. If db-is-shared is false (i.e. the container has exclusive
    use of the underlying table), then the ejbLoad() behaviour is more like ReadOnly
    (2. above), and the cache is longer-term. If db-is-shared is true, then the ejbLoad()
    behaviour is like Database (1. above).
    Exclusive concurrency reduces ejbLoads(), increases the effectiveness of the cache,
    but can reduce app concurrency as only one instance of an entity bean can exist
    inside the server, and access to it is serialised at the txn level.
    You can't use db-is-shared = false in a cluster. So Exclusive mode is less useful.
    That's when you think long and hard about Tangosol Coherence (http://www.tangosol.com)
    4. If include-updates is true, then the cache is flushed to the db before every
    non-findByPrimaryKey() finder call so the finder (which always hits the db) will
    get the latest bean values. This overrides a true setting of delay-updates-until-end-of-tx.
    The max-beans-in-cache setting refers to the maximum number of active beans (really
    beans that have been returned by a finder in a txn that hasn't committed). This
    wasn't checked in SP2 (we have an app that accidently loads 30,000 beans in a
    txn with a max-beans-in-cache of 3,000. Slow, but it works, showing 3,000 active
    beans, and 27,000 passivated ones...).
    This setting is checked in SP5, but I don't know about SP4. So you do need to
    size appropriately.
    In summary:
    - The cache isn't nearly as useful as you'd like. You get far more db activity
    with entity beans than you'd like (too many ejbLoads()). This is disappointing.
    - findByPrimaryKey() finders can use the cache. How long the cache is kept around
    depends on concurrency-strategy.
    - findByAnythingElse() finders always hit the db.
    WebLogic 8 tidies all this up a bit with a cache-between-transactions setting
    and optimistic locking. But I believe findByAnythingElse() finders still have
    to hit the db - ejbql is never run against the cache, but is always converted
    to SQL and run against the db.
    Hope this is of some help - feel free to email me at simon-dot-spruzen-at-rbos-dot-com
    (you get the idea!)
    simon.

  • Need help about career life

    Hi All,
    Em..i just need some advice about choosing correct career path.I graduated with a first class in IT with business information science in 2009. In 2009 after looking for jobs for few months i took a manager post in a petrol station which i never wanted.(Due to the credit crunch & the Family financial reasons) .Then unfortunately i had to stay out of work for 18months due to a serious spinal code operation i had to face.now in 2011 July im fit & ready to start my life again. but im lost where to start/ which career path to choose. (i've still got the job at the petrol station as the manager)
    ive liked data base management subject when i was in the University so, Ive been reading OCA-051 & interested on OCA qualification I just want to know what are the possible jobs i can apply if i get the certification? Basically what should i do to get any IT related job? :( ( i dont like programming)..
    Please be kind to reply.
    ps:i live in the Uk.
    Thanks.

    872882 wrote:
    Hi All,
    Em..i just need some advice about choosing correct career path.I graduated with a first class in IT with business information science in 2009. In 2009 after looking for jobs for few months i took a manager post in a petrol station which i never wanted.(Due to the credit crunch & the Family financial reasons) .Then unfortunately i had to stay out of work for 18months due to a serious spinal code operation i had to face.now in 2011 July im fit & ready to start my life again. but im lost where to start/ which career path to choose. (i've still got the job at the petrol station as the manager)
    ive liked data base management subject when i was in the University so, Ive been reading OCA-051 & interested on OCA qualification I just want to know what are the possible jobs i can apply if i get the certification? Basically what should i do to get any IT related job? :( ( i dont like programming)..
    Please be kind to reply.
    ps:i live in the Uk.
    Thanks.You'll sit on your bum and ruin your back again with most IT jobs. With your government shrinking, OCA qualification won't have much worth unless you personally know someone in the private sector that needs help. An operator job with your petrol company (assuming it's not just a mom 'n pop station) would probably require heavy lifting.
    IT is a good, solid, growing career path, but most of the work is still programming, and most ways up to better jobs go through that experience. You might be an exception if you have a way to join other skills with your IT education, such as business analysis or sales or web prettyfying. Perhaps the determinants are your personality and goals.
    I know, it's tough, but if you are honest with yourself and check out some of the "what color is my parachute" kinds of career advice books, you can find a happy medium. There actually are some benefits in starting a career during economically troubled times, but you only see that in retrospect. You have to decide on goals, pursue them vigorously, and reevaluate when it doesn't work for you.

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • Need Help About AC or battery or pc :(

    Hello!
    i am kinda new to the forum,i have GT70 2pe dominator pro laptop(bought from ibuypower) When i play demanding games,my ac unplugs itself from the laptop i dont know what to do ,i updated ec,bios,did the ec reset,battery calibration(from msi support page), but i did these long time ago i dont know if this started then or the problem was already on pc when i bought it,i didnt test playing demanding games before i did those things
    I tried playing w/o battery sometimes when the game loads laptop shuts down
    So i really need help..? 

    i think i have the correct model,well if it is going to fail can i use it until i buy a new one 2 weeks later?,i mean is this going to do harm to my computer until i get a new one?
    Thanks for the help  (sorry about the full sized picture)

  • Need help about how to capture the name of an object before inserting.

    Hi everybody,
    how i can capture the name of an object before it inserts in a table.
    i will use a pre-insert trigger to do this, but i don't know how to specify the name of the object that's inserting.
    any help about this issue will be appreciated.

    Mentioning objects you mean: You have a procedure which inserts data into some table and this procedure needs to know the name of the caller (another procedure or ...)
    Can this be of some help http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:382218730166 ?
    Regards
    Etbin

  • Need help about button

    Hi everybody!
    I'm from Italy, so I need help regarding button
    I create an animation, I put a button to replay the movie by this code:
    on (release) {
    gotoAndPlay(1);
    but in AS3 doesn't work. Can you help me pls?
    Another problem...I need a very simple preloader that display only percentage, stop.
    Anybody knows a template or tutorial about this?
    Thx in advance!

    What do you mean by scene2?. You can only preload external content like a picture, another swf, etc...a much simpler example:
    var myLoader:Loader = new Loader();
    addChildAt(myLoader,0)
    myLoader.load(new URLRequest("http://www.snowman-jim.org/science/images/north-pole-sun-moon.jpg"))
    myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading)
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading)
    function loading(e:ProgressEvent):void{
        info_txt.text="Loading.."Math.floor(e.currentTarget.bytesLoaded/1024)" Kb";//e.currentTarget is referring to myLoader.contentLoaderInfo
    function finalizado(e:Event):void{
        info_txt.text="I'm done!";
    Just change myLoader.load(new URLRequest("http://www.snowman-jim.org/science/images/north-pole-sun-moon.jpg")) path for the relevant path to the file you want to preload.

Maybe you are looking for

  • Vendor master data file structure

    Hello Guys, I want to knw the flat file strucute of vendor master data (specially vendor with multiple banks) pls let me knw tht thnks sunny

  • Transfer Order Status Issue

    Hi All. For the delivery we are Creating the Transfer Order using the Transaction LT03 . Currently we are having issue with Transfer Order status.When we look the document flow for the transfer order, TO status reads as "Completed" instead of "open"

  • Problem with entering Password?

    When I attempt to boot up my iMac and try to type in my Password, I Cannot type the first Letter?

  • Rendered sequence video is flipped vertically, dimmed and b&w

    Hi community!  I searched, but all instances I found of similar behavior were either on much older versions or else had unique circumstances... I keep seeing odd behavior of my footage in the timeline.  All of my clips begin in AE CS6, which I then e

  • Configuring workspace manager

    hello, I have installed oracle 11g R1 in my computer, and I need to use oracle workspace manager but I didn't find it. is there any configuration or installation to integrate it with oracle 11g R1.