EJB Specification question

In the EJB Specs that I have been working with (1.1), whenever you make an entity bean, you have to specify the PK ID for the bean you wish to create. This ID goes into the database for the Server to be able to persist / find your bean. My question is:
Why do I have to specify the PK ID when I create a bean? Why can't I just call ejbCreate() and have it return an ID to me? So the Server and the Database could handle making sure that it is not a duplicate key. I find it creates more work than necessary that I have to figure out what PK ID is not taken yet and create that one, when if I used an IDENTITY field in a database, that could easily do it for me.
Anyone know why they chose to FORCE developers / (and Server admins not) to choose the PK ID? Why not give us the option of either having the server do it and return the ID, or us choosing it?
Anyone have thoughts on this?
Robert

Hi,
Although it would have been a lot easier, they
propably didn't define this in the EJB specs this way
to stay compatible with all databases. Not all
databases support the IDENTITY field. I remember there
were some interesting discussions about other ways to
define a PK on www.theserverside.com.Yeah, but that's why they could give you a choice, so that if you didn't want to do it, or your db didn't support it, you wouldn't have to do that.

Similar Messages

  • Specific question on seek

    Ok here is a specific question unlike my previous one.
    If i store records with a fixed record length something like :
    RandomAccessFile file = new RandomAccessFile("example.txt","rw");
               long pos = inputLong("Type the record number for saving the data:");I am using the "pos" to give my record a location. Thus searching for a record i would use something like
    file.seek(50*pos);My question is, here to locate a record i must know its pos number before hand, is it possible to locate a record with letters instead of a number?

    I believe by pos he means "index" or "recordnumber" (i.e. each "record" is 50 bytes long, fixed-width and pos is really which of these records/items he wishes to retrieve).
    As far as locating them with letters, that depends. If you simply wish to find a record that contains specific letters, then you will have to read each record and then check if it contains those letters. If, on the other hand, each record has a "key" (i.e. the first two letters of each record must be unique) then you can read through the entire file when you initially access it and create a hashmap containing these keys and there "position" or "index". Then, when the user says give me AZ, you simply retrieve the "index" from the hashmap and read the corresponding record.
    Edit: That example I gave you in your ":( Help" thread does exactly this second option.

  • Very specific question about iOS 7 and podcasts

    I have a very specific question regarding the playback of podasts under iOS 7.
    Right now, I've still got iOS 5.1.1 (iPhone 4S).
    What I would like to have is a way to play an episode from a podcast that I have not yet finished, and when I double-click the ear-bud's middle button, then I would like to jump (skip) to the episode in the list, even if that episode is from a different podcast.
    Right now, under iOS 5.1.1, I achieved that by creating a smart playlist in iTunes that collects all the episodes from all podcasts with a play count == 0.
    This smart playlist is mirrored to the iPhone.
    It works very well.
    It seems to me that something like that is not possible under iOS 6, so I skipped that.
    My question now is whether I can acheive this under iOS 7.
    I would be most grateful if some kind soul could shed some light on that for me.
    Best,
    Gabriel.

    Hi Larry,
    Thanks very much for posting a reply.
    I do absolutely intend to print a test copy first - but thanks to your advice at least know the spine is going to be ok!
    I didn't realize that method would give me a nice landscape image of the unbound cover - I'd mistakenly remembered that it gave only one page at a time for front and back.
    Thanks for helping out.
    Best,
    Marco

  • Specific Questions Multiple Routers *HELP*

    I have a few specific questions regarding multiple routers in one home.
    1. Would it be possible to have (2) verizon supplied routers such as Actiontecs working in one home over Coax? to be more specific i would like one router in one room of the house connected to coax and providing hardwired/wireless. and another of the same type in a different room doing the same.
    an installer told me something to the effect that there would be wireless interference between the two. my next question is if I am able to have two routers connected over coax. could I log in to one and Set Wireless to OFF? thus eliminating wireless interference? if not what would be the issue? could i use a non-verizon supplied router (which i understand there is no support for) ? could i use a Wired router?
    there is no wireless coverage issue here. simply personal preference. i need the ability to hardwire systems without running cable around the house ie:cat5 from router to another room.no wireless bridges or other configurations.
    these routers are excellent in features and performance and having a second would be nice.
    my last resort option would be to connect the router to my GE smartconnection center that i have in my home. coax to router router to cat5e thus braodcast throughout the house depending where i choose. this is my last resort since it is a steel enclosure and would hinder wireless performance.

    Check out this website. It has all the different network configurations, along with the pro's and con's of each set up.
    http://www.dslreports.com/faq/verizonfios/3.0_Networking
    You can also set up the wireless to adhoc mode, which will allow you to connect the second router to the first wirelessly and extend your network without running cable to the other end of the house.
    "If your problem has been solved, please mark it as such. Don't forget to hand out your Kudos!"

  • Application specific questions

    Hello.
    In what transaction can I process application-specific questions of Support Message?

    Hi
    You can give the reply using the action
    SLFN0001_ADVANCED_COMP_QUEST Answers to appl-spec. questions
    within the same ticket or support message  from the action button in the change mode
    are you referring to same.
    Regards
    Prakhar

  • PSC 500 won't print yellow (a few specific questions)

    I have tried installing a brand new cartridge, cleaning the connections, etc.  The most common suggestion I've found is that I have two bad or "old" cartridges (manufactured in Puerto Rico, April 2007).  Before I go buy another costly cartridge, I have a few questions:
    1) I colored an entire sheet of paper yellow in Word, then printed it.  The printer just spat it out without even pretending to print anything on it.  Does this in itself suggest either a printer or cartridge problem?
    2) I recently installed a new black cartridge (a remanufactured or refilled one from simplyink.com--yes, I know that's not recommended), and I'm sure I haven't tried to print anything in color since then (until today).  Could an issue with the black cartridge possibly affect the color cartridge?
    3) Regrettably, I can't say for CERTAIN that I've printed in color with the current cartridge; I can't remember when I installed it, but I'm ALMOST sure that I have.  This is another reason that I suspect something internal happened and it's not just the cartridge.  I hope I'm wrong, or that there's a fix that doesn't involve taking the old beast into a repair shop.
    Any input would be greatly appreciated.  Thank you!

    Okay, trying to figure out why no one will even look at this...I read the first sticky, so in case this helps in the etiquette department: I have searched, and haven't found answers to these specific questions.  My operating system is Vista, and my printer is connected via serial port.  I think I have done everything that's suggested.  Please, can anyone give me a hand here?

  • Can you link specific questions to list variables where it pops up choices depending on the question?

    If i am asking a specific question for example:
    Alpha Sector, then if Alpha Sector was selected then you must list what POSITION on ALPHA work is being performed.
    Alpha = Alpha Position 1
                Alpha Position 2
                Alpha Position 3
                Alpha Position 4
                Alpha Position 5 , then depending on which of these are selected, it also has another question as well. What will be the FREQUENCY on that SPECIFIC POSITION.
    Say that Alpha was SELECTED, then work is being performed on ALPHA Position 1, then another popup here should allow another question to be answered: What is the FREQUENCY for ALPHA Position 1 ? then once this was asked if Alpha Position 2 was also SELECTED, then go through the same above ROUTINE. 
    Alpha = Alpha Position 2 was also selected, then another popup here should allow another question to be answered: What is the FREQUENCY for ALPHA Position 2 ? and SO ON.
    How is this accomplished? Would i have to create new pages then link to them or what?
    Please help, feel free to call or email me direct.
    Thank you,
    [email protected]
    314-421-9134
    Robert

    Thanks for your suggestions, Magnus, you really have had a good think for me - I appreciate that!
    What I am doing is report writing in which 90% of the report is the same for everyone. Except the cover page with Name and Address details, and Report title; the initial section which is the same for everyone except for specifics such as amount to invest, reason for investment, term to invest over, things like that.
    The end of the report is the recommendations section which is where I use freetext to create a bespoke solution - this cannot be automated.
    Just automating the cover page and the intro section save me huge amounts of time which I can then use on research and fund analysis, leaving the principles of investment section pretty much the same for everyone, as here I'm describing the principle and theory.
    After I created this Report Template my average report creation time went down from about 3 to 4 hours, to about 45 minutes. I guess the automation itself doesn't save as much time as the templating does, but it allows me to concentrate on the important bit and not worry if I have left something out - or in - that changes the overall thrust of the report.
    I cannot load Lotus WorpPro on Parallels, nor on Virtual PC, so the lack of automation really is a pain here. I see it as a weakness of Apple products for business, as I am sure Microsoft do which is why they have dropped VBA support for Office 2008.
    I have got NeoOffice as well as OpenOffice for Mac on my system, but really they aren't atable enough to use, and the formatting is pretty flaky. It certainly isn't completely consistent with Office itself.
    So, I am left with the conclusion that progress only means a reduction in features!
    But maybe I'm missing something?
    Mac

  • EJB Specification

    can anybody help me where can i get ejb specification? not documentation...

    u can follow the link:
    http://java.sun.com/products/ejb/docs.html
    http://www.comptechdoc.org/docs/kanti/ejb/ejbroles.html

  • Specific questions about a RAM upgrade to 4GB on my MBP

    I have a MBP model MA895LL/A. Currently populated with the original memory (2GB)
    Recent clean install of Snow Leopard, with all current updates.
    Specific questions:
    What memory does Apple use in their laptops? Does it really matter if you get the same manufacturer for complete compatibility?
    Do timings matter? Will faster timing improve performance slightly, or is it a waste of money to go for the faster stuff on my specific model (Intel Core 2 Duo T7500)
    Best to populate with 2 sticks X 2?
    Finally, how about manufacturers? Anyone have any positive experiences with specific manufacturers, or, horror stories they can share?
    I guess I just want to buy the best memory for my MBP. I build my own PCs, but I'm not sure if the Mac is a little more picky, RAM wise. Cost isn't really a factor. I'm willing to spend a little more, and buy the right stuff, and only do it once, without the hassle of sending it back, etc.
    Any advice would be great. I know its possible this question has been answered many times before. I guess I don't know where to look...

    Uh, yes, this is asked just about every day, like here:
    http://discussions.apple.com/thread.jspa?threadID=2154109&tstart=0
    Using the "Search Category" box in the upper right works.
    To answer your questions, since you likely have the 2 slots filled with 1GB DIMMs, you need to get a pair of 2GB to max the RAM. I guess you could use 1 OEM stick and one 2GB stick for 3GB total, but I would just go for 4GB. If you are under warranty, save the original RAM, as Apple seems to dislike seeing any 3rd party RAM no matter what. Put the OEM RAM back in if you need warranty work.
    I've seen several brands OEM, a lot of Hynix and Samsung, but it is probably all well tested to Apple spec. Otherwise, brands mean nothing, but see the above linked thread. I prefer to go with the exact spec'd RAM myself. I believe "faster" RAM does not run any faster. Vendors mentioned in the linked thread all have selector aids to find the exact RAM for your model.

  • EJB interview question

    dear friends
    if any body is having a real time ejb interview question , pl. send me a link for that.
    Thanks
    Gopal

    http://forum.java.sun.com/thread.jsp?thread=333894&forum=13&message=1363968

  • EJB Architecture Question

    Hi everybody!
    As I am a newbie to EJB, but have to do a project with this technology, I have a basic question, that might seem very simple to the pros among you.
    I have to realise a system with an login at the beginning, but I am very unsure about how to realise this.
    I started by creating a table, holding the username and the password.
    Now I thaught about creating an enity bean, that checks if the user with the given password exists. Here is my first problem, entity beans only allow findbyPrimary() but i want to find a person by name and password. Is this possible? how?
    If the person exists in the DB i thaught about creating a new instance of an session bean, for the further transactions and pass the reference on to the user?
    Is this good?
    Please help!
    Thx in Advance!
    Stef

    You can certainly find a user via the name/password options. You need to implement a new finder for your entity bean - like findByUsernameAndPassword that accepts the 2 parms. The implementation is a little specific to the application server vendor, but it should be pretty easy to do regardless of the proprietary descriptors. Also, depending on the caching you're using on the enttity tier - using direct JDBC for along with entitiy beans can cause some issues. For example, you may have a specific instance of an entity bean that's cached in memory on the application server - they you change this using JDBC. The application server now has a stale version of the data - but it doesn't know that it's stale. Just some issues to consider.
    Cheers

  • EJB Generator question

    I new to JDeveloper and I have question about the EJB Generator. I would like to generate EJBs for tables for a database for which I don't have access to the account who owns the tables. What I see in the wizard (EJBs from Tables - CMP) is only the few tables which are owned by the account I am using. I don't think the DBAs will give me their admin account. Is there another way to do this other than hand coding?
    The database is Sybase 12.5 and the JDBC Driver is jConnect 5.5. We are converting to Oracle 9i and I am researching strategies to do this. I'm not sure if my problem is platform related.
    Thanks,
    Jamie

    Jamie-
    We're adding this feature right now, so look for it in the forthcoming JDev 9.0.4 release.
    Users will be able to view accessible tables and views owned by all schemas, or filter out all but a specific schema (as we currently do, showing you only the objects owned by the default schema).
    Jon

  • Deploying EAR and EJB (ClassLoader Question)

    Hi,
    Have a few queries. Appreciate any quick answers.
    (a) To deploy a EAR or EJB jar to WebLogic server, is it necessary to include the jar location specifically in $CLASSPATH?
    I think not. Am I correct?
    (b) Is the bean/EAR deployed at module level? Is there a setting for this - is it at bean deployment descriptor? Where can I find this?
    If (say) I need to update an EJB, do I un-deploy, update and re-deploy it?
    Or must I restart the entire WLS container?

    --> An EAR includes one or more EJB files. You don't need to specify the location because it's contained at application.xml file inside the EAR.
    --> Each bean has a deployment descriptor. You can see it at META-INF directory
    If you need to update an EJB (that it is not part of and EAR), you are right.
    The WLS container not need to be restarted.
    Jin

  • TIFF Format Specification Question

    This isn't a Java-specific quesiton, but I was hoping someone here would be able to help as I have tried numerous other avenues already.
    I�m working with (TIFF) images that have multiple layers, and each layer can have different min/max values. I want to store these min/max values for each layer in the .tiff file, in the SMinSampleValue and SMaxSampleValue tags. So if I have 3 layers I need to write 3 mins and 3 maxes down.
    The documentation for SMinSampleValue/SMaxSampleValue says:
    �Note that a value should be given for each data sample. That is, if the image has 3 SamplesPerPixel, 3 values must be specified.�
    However when I use libtiff (haven't tried this in Java yet but it would be similar I guess):
    TIFFSetField( newTIFF, TIFFTAG_SMINSAMPLEVALUE, min1, min2, min3 );
    OR
    ===
    TIFFSetField( newTIFF, TIFFTAG_SMINSAMPLEVALUE, min1);
    What gets written is min1 three times, so if min1 is 40, then 40 40 40 is written, due to a variable "count", I don�t understand where the �count� for the tags gets set, I shall look into that further.
    But my main question is how do I write multiple different values for SMinSampleValue and SMaxSampleValue using tifflib? How do other TIFF readers/writers do this (format question), since I want to be compatible with them.
    Thanks,
    HappyDeveloper

    Hi,
    I am seeing the similar post in SDN and some replies state the following. Have a look into this
    Often this error occurs because the TIFF file you have has been saved with some form of compression. You need to open in a picture edit program and save as TIFF making sure options are set so there is no compression.
    Regards,
    Venkatesh

  • Specific Question Reporting in LMS

    Hi I've been using Captivate for a few months, and I've recently gotten a module together and am hosting it on SCORM cloud.  My module contains some quiz slides, however I'm finding the reporting I'm getting back a bit odd, I'm
    sure it's user error but I'm unclear what I'm doing wrong…I'm getting the info about who is taken the quiz and how long they've taken etc, but what I need to know is the specific answers they have given, i.e. have they answered A B C or D.
    I've been making the quiz slides myself with click boxes and actions, and including them in quiz reporting, but I'm unclear how I can then get each question and answer I've created to show up in the SCORM reporting…for example, most of the specific reporting looks like this:
    2015-02-27T15:34:20.387
    [USER} correctly answered 'Question 6888' with response '1'
    I'd like to be able to specify the question number myself (not sure where the 6888 is coming from) and make it so the response was "A" or any of the other selections.  Is this possible?
    Hopefully this is clear enough, I'm pretty new to the game.  Thanks for any help in advance!!

    I should add to the above that I'm making my own quiz slides.  Still looking for an answer to this problem, so far what I've been doing as a workaround is putting the result of the question in the Interaction ID...ie "Question1DINCORRECT"  or "QUESTION 2ACORRECT", that way I can at least see what they answered.  When I was looking at the SCORM data I saw this:
    "result": {
      "success": true,
      "response": "1"
    This is where the LMS is getting the data, but I have no idea how to change it so the reporting could say User X incorrectly answered Question 1 with response D...hopefully this makes sense.  Any help greatly appreciated!!

Maybe you are looking for

  • New Firmware Update for Nokia N95 (RM-159 ) :Decem...

    Hello All, It looks like new firmware update is available for Nokia N95 basic model . Earlier Version of Firmware was : 30.0.015 Now the latest available Firmware was : 31.0.014 When i connected my N95 to PC using PC-Suite, it notified me about this.

  • Deficit of Stck w.vend.unr.prev : Goods issue using BAPI_GOODSMVT_CREATE' subcontracting PO

    Hi Experts, I am facing one issue while doing Goods Issue for sub contracting PO . In my case, inbound idoc will trigger the BAPI 'BAPI_GOODSMVT_CREATE' with movement code '07'  and movement type as 543. But it throws the error Deficit of Stck w.vend

  • Oracle VM Server Version: 3.2.9, was not found in file: UpgradeServersYumPkgLists.txt

    After an upgrade to 3.3  Oracle VM Manager Core WS-API Shell 3.3.1.1065 (20140619_1065) Server VM's are version 3.2.9 UpgradeServers.py is failing with Wed Mar  4 21:32:39 2015 INFO:  UpgradeServers script starting... Wed Mar  4 21:32:39 2015 INFO: 

  • Different Types of Secure Messaging

    There are different variants of Secure Messaging for smart cards. I know there are SM by Global Platforms, ISO 7816 and ICAO. Is the implementation by ISO 7816 same as ICAO SM?

  • Force 16-byte alignment?

    Hello, Is there any way to force the JVM (presumably through the use of some -XX option) to align memory on 16-byte boundaries? I am using x86 hardware features (via JNI) that require 16-byte alignment, and accessing large (Java created) byte arrays