Are EJB necessary in this case ?

hello,
i have to build an application in order to handle bounced emails (massive emailing).
a java thread is supposed to scan on mail servers (PostFix) all bounced emails (emails returned in errors such as 'user unknown'...).
all scans params (filter headers messages, constants actions...) are stored in a database (SQL Server).
do I have to implement EJB on SQL Server database : this database only contains datas required by the thread (Filters to apply...).
Theses datas won't be updated nor deleted (or once at month).
Thanks for reply, i'm stuck with it.
bobinan

Hello,
If you don't have to update data nor delete data.
I would say : Use POJO with DAO pattern to load Data from you SQL server.
Using EJB in your case would not be the right solution.
Because :
you don't have to access the data from many clients.
you don't have to manage DB transactions (you only read).
EJB would be to heavy in your case.
Sebastien Degardin.

Similar Messages

  • By design or sheer dumb luck? Is configuration necessary in this case?

    Hey all, I saw something that stumped me for a moment today and then got me thinking.
    A colleague of mine had set up a test lab at work. This was to evaluate a PIX environment, but was nothing too fancy: a couple of host pc's emulating internet-based servers, a pc emulating an internal lan machine, a machine pretending to be a host in a dmz, the pix itself, and a router pointing where necessary between them all.
    Now normally, to keep this all segregated for testing purposes, I would vlan everything up, with a separate vlan for all the networks involved. Or use separate, dumb switches.
    But my partner here takes an unconfigured switch with all ports up and...just plugs everything in. I am aghast, but his reasoning is that, when devices arp for the mac of the device they want to speak to, the switch will know whats on each port anyway and will forward it via the appropriate port. Which sort of makes sense... but I cant help but feel that this is too straightforward, and that the law of unintended consequences will take over.
    (Oddly enough, I've discovered that this has happened in production, and I'm currently trying to debug some odd traffic thats appearing in a dmz interface on a PIX. I'm starting to wonder...)
    Anyone have any thoughts? Timesaving good idea or lazy shortcut?
    Cheers all,
    Gar

    Gar
    I think that it is a lazy shortcut. When your colleague connected the devices this way things did work as expected. And you probably did not check to see if unexpected things would work - and they would have. If you configure a PC in a certain subnet with a default gateway and you configure other devices in other networks you expect that the PC will forward to its default gateway to get to the other devices. But the way the switch was installed the PC COULD communicate directly with any other device without needing the gateway. Since all devices were effectively in the same VLAN on the switch they were all in the same broadcast domain. In this situation every device would hear the ARP request from every other device. So the PC could have done an ARP directly for some other device, received an ARP response and begun to communicate directly.
    There are reasons why we generally put things into VLANs in our network: reducing the broadcast domain being one of them, increasing security is another, and there are a number of other reasons. When you install a switch in the way that you describe you undo those things.
    It was a test environment and it worked. But I certainly would not want to see you do it that way in a production environment.
    HTH
    Rick

  • I've moved my Aperture library to another computer, and masters are referencing an old path name.  How can I update these references?  Reloctating masters does not work in this case :(

    I've moved my Aperture library from one computer to another using Finder.
    I merged the library with one which was already on the computer.
    Now, the photos I imported have reference to the old path name on my old computer.
    How can I update these references as "Relocate Masters" does not work in this case?

    Just one suggestion to be able to reconnect all at once:
    Create a smart album containing the images with missing masters:
    File -> New ->  Smart Album,     and add a rule: File Status is "Missing"     (or File Status is "offline")
    Then select the images in this album and go to the File menu:
    and select:   File -> Locate referenced File
    If you are lucky, Aperture will reconnect all at once, if you point the first image version to its counterpart.

  • My iMessages and FaceTime are offline.. When I try to activate my apple id account.. it says The server encountered an error processing registration. Please try again later. What should I do in this case?

    My iMessages and FaceTime are offline.. When I try to activate my apple id account.. it says The server encountered an error processing registration. Please try again later. What should I do in this case?

    Hey radyslav,
    There's an article that applies to your situation, I'd follow the steps within here:
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Take care,
    Delgadoh

  • What are the necessary elements in ejb-jar.xml with CMP entity bean

    What are the necessary elements in ejb-jar.xml with CMP entity bean
    Actually i am using webligic 8.1 and while deployment getting the error that
    some elements r missing
    Thanks
    Anand Pritam

    According to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
    <!ELEMENT entity (description?, display-name?, small-icon?,
              large-icon?, ejb-name, home?, remote?, local-home?,
              local?, ejb-class, persistence-type, prim-key-class,
              reentrant, cmp-version?, abstract-schema-name?,
              cmp-field*, primkey-field?, env-entry*, ejb-ref*,
              ejb-local-ref*, security-role-ref*, security-identity?,
              resource-ref*, resource-env-ref*, query*)>

  • What are the Necessary Componentsfor  an EJB ?

    Please, I am new to EJB. I need you to answer the following questions for me:
    1. What makes a Java class an EJB?
    2. In terms of implemantaion, what are the necessary components like libararies, inherted components, etc an EJB must contain?
    Thanks
    'Femi

    You are not going to get satisfying answers when you ask such generic questions about technology for which whole books have been filled. But anyway:
    1. What makes a Java class an EJB?When it is properly annotated and packaged such that the container will manage it as an EJB instance.
    2. In terms of implemantaion, what are the necessary components like libararies, inherted components, etc an EJB must contain?You need an enterprise container such as Glassfish, JBoss, Websphere, etc. which deliver the implementation of the Java Enterprise Edition specification. Generally to compile you'd use an IDE and let it setup your project such that the proper jars of the enterprise server are added to the compile classpath of your project, but alternatively you can compile against the generic JEE API jar or use Maven with a specific set of dependencies.
    If that blew right by you: that is to be expected. You really need a decent book to get started with JEE technology, especially the EJB component.

  • Do I need to declare a transaction in this case?

    I am struggling to understand when it is necessary to declare my own transaction to ensure the data is properly updated.
    For example, in the following code, which is part of a java bean in the EJB project, KeyFacade is a stateless session bean tied to the entity "Key". it is a standard EJB created with the netBeans 5.5 wizard. I have changed no defaults.
    Do I need to declare a transaction, commit the transaction and close it when I use the "KeyFacade.edit(key);" in order to ensure the database is updated? Or is it automatically done because the .edit() method uses the entityManager and the persistence is container managed?
    Would it make a difference if this bean was part of a WAR project?
        public BigInteger getNextKey(String tableName){
            KeyFacadeLocal KeyFacade = this.lookupKeyFacade();
            Key key = KeyFacade.findByTablename(tableName);
            long nextKey = key.getKeyvalue();
            BigInteger BINextKey =BigInteger.valueOf((int)nextKey);
            //  now update the table by incrementing the key value by 1
            long incrementKey = nextKey + 1;
            key.setKeyvalue(incrementKey);
            KeyFacade.edit(key);
            return BINextKey;
        }

    808239 wrote:
    I have a Map<Integer, List<T>> data, and all the lists are initialized using Collections.synchronizedList().Seems like overkill to me. Your Map also looks like a Multimap, of which there are several existing implementations.
    When I do the traversal, I want to traverse ALL lists in the map at the same timeI suspect not. What you want to do is to traverse each one in sequence.
    so I have to sync all lists as shown in the API doc as follows: ...Seems like overkill to me, and will probably result in a very slow Map (not that there's any problem with that if it's the right thing to do; in this case, I suspect it isn't).
    Is this approach ok?What are you trying to achieve? If you need full consistency for your iterators (ie, a snapshot of the entire Map at the time the iterator is created), you have a two choices (assuming you don't want to deal with update journals):
    1. Lock the Map.
    2. Clone the Map (and your clone() method should be synchronized).
    Of the two, the second seems best to me, but neither is all that wonderful.
    However, if all you need is weak consistency - that is to say, what you return reflects the state of the Map when Iterator.next() is called - all you really need to do is make sure that your Lists are synchronized when you do the read.
    Since the List updates are the responsibility of your Map (I'm still presuming this is some sort of Multimap implementation), there's no real need to synchronize them; just synchronize the Map's own update methods.
    I'd also suggest that you make sure your getValue() method hands back an [url http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#unmodifiableList%28java.util.List%29]unmodifiable List to clients; otherwise they could start adding or removing values themselves.
    HIH
    Winston

  • Should I use a thread and (in this case) how?

    Hi:
    I have a Swing frame (frameA) and on which there is a button; if I double click it,
    it will bring up a second frame (frameB). On frameB, I will select a new button name
    from a combobox, and click "DONE" button, and frameB would change the name of the
    button on frameA to this new name I selected. And frameB would disappear as well.
    I am thinking of using another thread for painting frameB, because I don't know how long
    it would take for frameB to load up, and I don't want to block up the event-dispatching thread
    on frameA.
    However, since frameB uses another thread, and frameB also has an ActionListener
    associated with the DONE button, i am not sure how to make the thread stay alive
    so that it could check whether the ActionEvent is fired. So, in this case, is it necessary to use
    another thread to do the job? Or should I just use the same event-dispatching thread?
    Or is there another whole new approach much better?
    Thanks

    Quite simply, I wouldn't bother threading it.
    If you load, link and instantiate the pop-up frame (actually I'd use a Dialog here) before you trigger the pop-up, the reaction is more or less instant. The execution of th parent frame will continue after the pop-up has been made visible, so any way you cut it, you are going to get a brief pause in the parent UI while the pop-up is shown - you may as well have it when the button is clicked.
    Hope this helps.--
    <sig> http://www.itswalky.com http://www.crfh.net </sig>

  • Yosemite is awful- unable to empty trash, volume options are haywire, error codes on file management, and files won't replace when moved. What are my options at this point?

    Like the topic - "Yosemite is awful- unable to empty trash, volume options are haywire, error codes on file management, and files won't replace when moved. What are my options at this point?"
    I installed this OS, and it looks nice, but it's terrible to use. I randomly have the volume controls get disabled, and sometimes the volume menu in the system tray does nothing when adjusted which I've never seen in an OS before. The trash won't empty. When I try to drag and drop newer files over existing ones, nothing happens. The old ones just stay there. I have to delete the old ones and then move the new ones. And when I go into the protected files to manage audio plugins (I make music), the first thing I hit are error codes galore, and password prompts that either don't popup when they should, or don't execute the command after I provide my password.
    What can I do now that I installed the flames of **** onto my computer?

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    resetp
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • Is Time Machine necessary in my case?

    Hi, I'm new to Mac, and don't fully understand the "Time Machine" feature.
    If my computer got some horrible virus and/ or crashed, could I just use the installation CD to fix it? I know I would lose all of my personal files, but I mostly just use the internet and only keep a couple of important files saved on my computer (which I back up regularly on a USB key anyways).
    I don't mind starting from a clean (ie. freshly installed OS) computer and losing all of my personal files, I just want to know whether this would actually work in the event of a system crash, or whether there is some special reason why I would also need to have Time Machine.
    The Time Capsules seem expensive, and it would be a waste to buy one if all it is not necessary in my case.

    Do you need TimeMachine? No. You are absolutely right - if something totally trashes your hard drive you could restore everything using the grey DVD plus all the other 3rd party software you'd have to install separately. And if you actually backed up all your important stuff to a USB flash drive you'd be fine once you manually copied it all back. BUT I'm betting you aren't actually backing up all your important files - email? Safari bookmarks? your keychain? preferences? Address book contacts? Plus there's no telling when disaster will strike so you may spend a good bit of the day online without saving that cool stuff you just located and then bam the drive dies. Oops.
    You may just be underestimating how much is involved in setting the computer up again. The last time I started from scratch, installing from the installation DVD plus my other software discs, it took me most of Saturday. Not all of that time was spent sitting at the computer but about half of it was. Entering all the serial numbers was especially a PITA. Last week I installed a new drive in my MacBook and restored from TimeMachine. Total time to complete: 4 hours. Time I spent sitting in front of the computer working: less than 15 minutes.
    The great thing about TimeMachine is that it is doing its work every hour without any intervention from you and there's no need to buy an expensive TimeCapsule. An external drive is all you need - depending on how big the drive you choose you may spend $50 - $150 for a decent drive. A FireWire drive is faster than a USB drive but either is fine and the speed isn't that important once the first big backup has finished. I strongly recommend that you let TM backup the entire computer but you could just have it back up your personal drive space. Figure out how much data you need to back up, add a little extra for 'wiggle room' and then double it. That's the smallest drive you should buy. Triple it and that is about the biggest drive you'd need.

  • Are EJB ( entity beans) are cached ?

    Are EJB ( entity beans) are cached ?
    I have a doubt here . As per my understanding , the entity beans are cached from the database. In that case , If I delete a row in the database by an external application ( say using TOAD tool) , how the Entity bean will be updated / reloaded ? Entity bean will be out of sync then .
    Application server : weblogic/webspehere .

    >
    You can use the refresh method of the EntityManager interface to read new values from the database (if you expect it to be out of sync), and use locks to prevent others from changing your data while the application is performing actions in a transaction.Did you mean I have to write code for this ? can't be made it automatic refresh by the container ? Is there any settings I can configure so that container can do it by itself proactively ?
    Also, using locks ...is this a container settings or I need to configure myself in ejb-jar.xml ? Could you please shed some light here ?

  • ICloud ruined my life- how can I escalate this case further!!!

    The unthinkable has been hande to me by Apple.
    iCloud corrupted 40% of my documents. Then 'reset' the remaining 60%
    100% of my documents erased by Apple. This has taken 8 months of my life away, the apple care process has been woeful. So many Senior Advisors said they would 'take ownership of the case' and 'call me back'. Nothing, no call back- I am forced to call up again- explain the case again- be promised again by another Senior Advisor that they would 'take ownership of the case' and 'call me back'...
    I am left shattered.
    This was a few months ago- i have lost huge amounts of irreplaceable research generated from over 2000 hours of my own personal work.
    It was not backed up to my mac book as it was rendered inoperable when i 'upgraded' to OSX Lion.
    I did all my work for 8 months on my ipad. All documents were created and stored locally on my ipad. I had no access to my LaCie external because my macbook was inoperable.
    It was recommended by Apple Genius that I turn on icloud for Documents. iCloud then corrupted the documents and synced that corruption back to my documents locally stored on my ipad.
    I could then see all the images in pages documents view. But could not open them- that was for about 40%of my documents. I could still access the other 60%
    My account was then referred to the iCloud engineers. After a few weeks with no contact from apple I called up to chase up this loss of my documents- it had been going on for 7 weeks at this point.
    The senior advisor told me that my account had been 'reset' and should be working fine now..
    WHAT!!!! Reset!!!?????? so what about the 60% of docs that i had access to?
    Gone. Deleted from the icloud account, synced back to my ipad.
    All Gone.\
    If i had been contacted by the engineers. 'We cannot fix your corrupted documents. We propose to reset your account. That will erase all data and documents in your account. Is this ok? Please backup any documents you have on your ipad.'
    This would have saved 60% of my 8 months research- which is a lot.
    but no- no contact, just reset my account and erased my documents.
    its unbelieveable and unthinkable.
    I am a MASSIVE apple fan- i have 22 Apple devices and tell everyone in my network that all my dreams have come true with Apple- ridiculing them for using other devices. It has now turned into a nightmare.
    I WENT TO THE APPLE STORE IN SYDNEY IN DESPARATION- TO FIND OUT IF THERE WAS AN IMAGE OF THE DOCUMENTS SOMEWHERE/ANYWHERE!!! I KNOW THEY CAN ONLY CONTACT ICLOUD IN THE SAME WAY AS ME- BUT WHAT OPTIONS DID I HAVE- I COULDN'T ESCALATE THROUGH APPLE ANY HIGHER- THEY TOLD ME THAT THE SENIOR ADVISORS AND ENGINEERS WERE AS HIGH AS I COULD ESCALATE. SO I WENT TO THE APPLE STORE AND TOLD THEM THAT I WOULD NOT LEAVE THE STORE UNTIL IT WAS RESOLVED- THEY TOLD ME THEY COULDN'T HELP ME- I STAYED FOR 8 HOURS- AFTER 1.5 HOURS WE FOUDN OUT THAT THE ENGINEERS LIKENED TRYING TO RESTORE MY DOCUMENTS TO TRYING TO REBUILD A BURNT DOWN HOUSE.
    We were about to release our energy saving App globally. I had a meltdown and just went away on holiday to New Zealand and Thailand with my kids- I couldn't face the reality of what i had to do to recover.
    I came back to try and get back on track recently. My only way forward was to forget about it and start again.
    AND THEN!!!
    I stupidly used pages on my ipad to edit a document from our development partner the other day. I opened my pages today, the document was there- then in front of my eyes all the documents shuffled around. Guess what- the doc I had edited disappeared.. In shock i called Apple Support. He asked me to check on icloud. com. 15 documents, not the one i want, advisor can see my doc- i cannot. I feel naseous.
    THIS CASE HAD ALREADY GONE TOO FAR. BUT NOW I HAVE HAD ENOUGH!!!!!!
    How can i escalate further? There must be a way. This is not acceptable! Apple are messing with my life!!!!! I'm losing too much time and money- it's just not fair at all. Something MUST be done by way of compensatiing for this series of errors!!!!

    There's nothing anyone here can do for you, and I'm afraid I have little sympathy.
    2000 hours of "irreplaceable work" and at no point during those 8 months did you think "Gee, I really should back up all these hugely important files just in case my iPad gets stolen, lost, breaks or some other disaster occurs"?
    As soon as you noticed something was amiss, or even at the point when you still had access to 60% of your documents, why did you not take the opportunity to download a copy of them via iCloud.com (on any computer) and save them safely on a memory stick or other backup device?
    Having just one copy of any file is asking for trouble. Backing up regularly is the No.1 rule of computing. Apple is not responsible for your lack of any backup routine. Apple advise you to backup regularly. Being able to backup your iPad should've been your motivation for spending an hour or two of those 2000 getting the MacBook up and running.

  • Can I replace my current iPhone 5s with a new one in this case?

    I just got my iPhone 5s two days ago, but it already has problems when I was trying to text with it while charging. The phone was doing all these random things like mis-sensed my typing really badly, jumping out to the main screen and even called the person I was texting. I even tried typing messages in Whatsapp, it constantly hides the keyboard from time to time and that's really irritating. While it's on lock screen, I could not slide to unlock it, I had to use my finger scan to access my phone in the end. The phone went normal again once I got the charge unplugged, but it went crazy again once I got it plugged in. I truely believe it's something wrong with the phone rather than the charger. Can I replace my current phone with a new one in this case?

    Take it back. This is a warranty/purchase issue. We are just users here.

  • IPod touch 1st generation could not be restore on iTunes, an unknown error occurred (1). how can i fixed this case?

    My iPod touch 1st generation could not be restore on iTunes, the message was "The iPod "iPod" could not be restore. an unknown error occurred (1)".
    my serial number is AB1905714N
    how can i fixed this case?
    thank you

    ERROR (1)
    - Place the iPod in DFU mode and then restore
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - Try on another computer
    - Try another cable           
    - Also, confirm your security software and settings are allowing communication between your device and update servers.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar     

  • I have Adobe Acrobat version 11.0.0 installed with Adobe CC.  I cannot download PDFs from the internet (in this case from PubMed National Library of Medicine).  If I try to do this  I get a popup message saying that "ADOBE ACROBAT NPAPI PLUG-IN, VERSION 1

    I have Adobe Acrobat version 11.0.0 installed with Adobe CC.  I cannot download PDFs from the internet (in this case from PubMed National Library of Medicine).  If I try to do this  I get a popup message saying that "ADOBE ACROBAT NPAPI PLUG-IN, VERSION 11.0.0 NEEDS YOUR PERMISSION TO RUN.  I DON'T KNOW HOW TO GIVE THIS PERMISSION OR WHAT TO DO.  CAN YOU PLEASE HELP?

    What buttons do you get to click on with this message? What browser are you using (e.g. Safari, Chrome, Internet Explorer...)

Maybe you are looking for

  • Can you create an animated gif in LabVIEW?

    Hello, I was wondering if there was a function within LabVIEW which can create an animated .gif file. Most of my online searches result in "how tos" for putting pre-existing gifs on the front panel.  I don't need to be able to display the gif anywher

  • Windows 7 64bit no longer recognizes my iPod as of iTunes 10

    So as of 3 iTunes updates ago, which would be iTunes 10, my computer with windows 7 64bit no longer recognizes my iPod clickwheel, telling me the device has malfunctioned.. which it hasn't it works just fine with my windows XP pro machine. I tried up

  • How do I get an MQSeries client working...

    It seems I can never get my head round IBM products. MQSeries has proven to be no exception! Perhaps there's a conspiracy to keep PS in work? ;) Anyway, gripes aside, I've been trying to get a Java client to talk to a remote MQSeries server. I've dow

  • Error in ESS while availing a leave

    Hi All, In My client place, system gives a dump error when employee is maintaining its leave in ESS system.Here TM is not integrated with payroll. Plz help me how to resolve the issue.

  • Getting Runtime error R6025 when I exit Skype

    I am getting this message every time I close Skype.  It says: "R6025 -pure virtual function call" I am running Skype 7.0 and Windows 8.1.  It does not matter if I have been chatting or doing a video call or have done nothing at all.