Why BMP

I see the following reasons for using BMP over CMP:
1.Accessing legacy systems and non RDBMS data source.
2.For managing complex relationship.
3.When u r not sure that the CMP code is optimized and would like to use stored procedures for database access with an intent of improving performance.
4.When entity data is found in many databases.
The point # 2 mentioned is no longer valid with the coming up of EJB 2.0 which manages relations.
Any more reasons for using BMP ?
Thanks in advance.

Greetings,
I see the following reasons for using BMP over CMP:
1.Accessing legacy systems and non RDBMS data source.Or simply, any non-RDBMS data source.
2.For managing complex relationship.
3.When u r not sure that the CMP code is optimized and
would like to use stored procedures for database
access with an intent of improving performance.True, though not very portable. In any event, CMP can also make use of stored procedures where out-parameters are not needed. Also, Sun promotes "resource optimization" as a selling point for CMP, ie.: "the vendor may know better than the Bean Provider how to optimize queries to the resources it explicitly supports". :-p Though, in this regard, I still tend to trust my own code better than the vendors. :) Furthermore, CMP alleviates most of the burden of O/R mapping on the Bean Provider by transferring it to the Deployer role. So another question one may find him/herself asking is how much can the Deployer be trusted to effectively manage the mapping? It makes for a possible extension of the "platform gets blamed for coder's lack of skill" syndrome. Another consideration is optimizing bean->resource syncs. In BMP one can use a 'dirty flag' to optimize UPDATEs; in CMP one must rely on the vendor doing so and - with a closed source server, at least - there's little way to know. In such cases, BMP may still the preferred way to go...
4.When entity data is found in many databases.Unless it absolutely must be mapped into a single bean, (EJB 2.0) CMP/CMR can support this too - albeit, not very "efficiently". ':)
The point # 2 mentioned is no longer valid with the
coming up of EJB 2.0 which manages relations.Mostly. EJB 2.0 (CMR) manages relationships between beans, not between the actual entities which still maps 1:1 to the beans. We can say that by extension CMR also manages relationships between the entities. However, the spec only partially provides for CMR-level reflection of resource level handling of foreign keys - IGNORE and CASCADE ON DELETE. (Of course, I should remember my own arguments in support of '1' above.and point out that Entity Beans are not strictly for RDBMSes where such handling originated and is most common... :) If other handling is needed (eg. NULL ON DELETE) then BMP and/or business-level logic must be used.
Any more reasons for using BMP ?How about reuse and portability beyond EJB? In BMP one can (should) use a DAO to sync with the resource. A well written DAO, in conjunction with a Business Delegate, can be easily used in scenarios where an EJB container is either not available or not practical. ;)
Thanks in advance.Regards,
Tony "Vee Schade" Cook

Similar Messages

  • How can i batch resize a pdf  than save from one folder to a bmp in another folder?

    At the moment I can get it to work but it is just using one document name and not the individual file names?

    Not absolutely sure but I think Actions would struggle with this because the files can not be opened but has to be converted.
    Image Processor does not offer bmp, maybe you should check out Image Processor Pro.
    http://www.russellbrown.com/scripts.html
    Or use the regular Image Processor to create tif or psd and then open and save those as bmp …
    Why bmp anyway?

  • Noob Question: Problem with Persistence in First Entity Bean

    Hey folks,
    I have started with EJB3 just recently. After reading several books on the topic I finally started programming myself. I wanted to develop a little application for getting a feeling of the technology. So what I did is to create a AppClient, which calls a Stateless Session Bean. This Stateless Bean then adds an Entity to the Database. For doing this I use Netbeans 6.5 and the integrated glassfish. The problem I am facing is, that the mapping somehow doesnt work, but I have no clue why it doesn't work. I just get an EJBException.
    I would be very thankfull if you guys could help me out of this. And don't forget this is my first ejb project - i might need a very detailed answer ... I know - noobs can be a real ....
    So here is the code of the application. I have a few methods to do some extra work there, you can ignore them, there are of no use at the moment. All that is really implemented is testConnection() and testAddCompany(). The testconnection() Methode works pretty fine, but when it comes to the testAddCompany I get into problems.
    Edit:As I found out just now, there is the possibility of Netbeans to add a Facade pattern to an Entity bean. If I use this, everythings fine and it works out to be perfect, however I am still curious, why the approach without the given classes by netbeans it doesn't work.
    public class Main {
        private EntryRemote entryPoint = null;
        public static void main(String[] args) throws NamingException {
            Main main = new Main();
            main.runApplication();
        private void runApplication()throws NamingException{
            this.getContext();
            this.testConnection();
            this.testAddCompany();
            this.testAddShipmentAddress(1);
            this.testAddBillingAddress(1);
            this.testAddEmployee(1);
            this.addBankAccount(1);
        private void getContext() throws NamingException{
            InitialContext ctx = new InitialContext();
            this.entryPoint = (EntryRemote) ctx.lookup("Entry#ejb.EntryRemote");
        private void testConnection()
            System.err.println("Can Bean Entry be reached: " + entryPoint.isAlive());
        private void testAddCompany(){
            Company company = new Company();
            company.setName("JavaFreaks");
            entryPoint.addCompany(company);
            System.err.println("JavaFreaks has been placed in the db");
        }Here is the Stateless Session Bean. I added the PersistenceContext, and its also mapped in the persistence.xml file, however here the trouble starts.
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(mappedName="Entry")
    public class EntryBean implements EntryRemote {
        @PersistenceContext(unitName="PersistenceUnit") private EntityManager manager;
        public boolean isAlive() {
            return true;
        public boolean addCompany(Company company) {
            manager.persist(company);
            return true;
        public boolean addShipmentAddress(long companyId) {
            return false;
        public boolean addBillingAddress(long companyId) {
            return false;
        public boolean addEmployee(long companyId) {
            return false;
        public boolean addBankAccount(long companyId) {
            return false;
    }That you guys and gals will have a complete overview of whats really going on, here is the Entity as well.
    package ejb;
    import java.io.Serializable;
    import javax.persistence.*;
    @Entity
    @Table(name="COMPANY")
    public class Company implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column(name="COMPANY_NAME")
        private String name;
        public Long getId() {
            return id;
        public void setId(Long id) {
            this.id = id;
       public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
            System.err.println("SUCCESS:  CompanyName SET");
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (id != null ? id.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Company)) {
                return false;
            Company other = (Company) object;
            if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "ejb.Company[id=" + id + "]";
    }And the persistence.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="PersistenceUnit" transaction-type="JTA">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <jta-data-source>jdbc/sample</jta-data-source>
        <exclude-unlisted-classes>false</exclude-unlisted-classes>
        <properties>
          <property name="toplink.ddl-generation" value="create-tables"/>
        </properties>
      </persistence-unit>
    </persistence>And this is the error message
    08.06.2009 10:30:46 com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNUNG: ACC003: Ausnahmefehler bei Anwendung.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
            at ejb.__EntryRemote_Remote_DynamicStub.addCompany(ejb/__EntryRemote_Remote_DynamicStub.java)I spend half the night figuring out whats wrong, however I couldnt find any solution.
    If you have any idea pls let me know
    Best regards and happy coding
    Taggert
    Edited by: Taggert_77 on Jun 8, 2009 2:27 PM

    Well I don't understand this. If Netbeans created a Stateless Session Bean as a facade then it works -and it is implemented as a CMP, not as a BMP as you suggested.
    I defenitely will try you suggestion, just for curiosity and to learn the technology, however I dont have see why BMP will work and CMP won't.
    I also don't see why a stateless bean can not be a CMP. As far as I read it should not matter. Also on the link you sent me, I can't see anything related to that.
    Maybe you can help me answering these questions.
    I hope the above lines don't sound harsh. I really appreciate your input.
    Best regards
    Taggert

  • Power spectrum not enough memory

    I have a binary file that I want to plot the power spectrum of.  The thing is.. the .bin file is about 100MB.  When I run the attached .vi, it says out of memory.  However, I could open the .bin file and plot it with amplitude versus time.  Is there a problem with my setup or something I don't know about?  Thanks for your time~
    Jud~
    Attachments:
    Powerspectrum.vi ‏25 KB

    Hi Jud,
    why do you attach a BMP renamed to JPG? Please attach real JPGs or (even better because of lossless compression) use PNG format! There's a reason why BMPs aren't allowed as attachment...
    I attached your pic converted to PNG. Do you spot the difference?
    Message Edited by GerdW on 08-02-2008 03:40 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Error3.png ‏13 KB

  • How get JFileChooser stay in front of browser window?

    As an alternative to using HTML (<input type=file>) on the client to take care of browsing local files, I want to use a Java swing component (coded in a servlet) to do the same thing, in order to customize text on buttons, etc. JFileChooser works just fine, if it wasn't for the fact that it time and again disappears behind the web browser (Internet Explorer) window (and I have to minimize the browser window to see it). In contrast to a Java Window object, JFileChooser cannot be set so that it always stays on top of the web browser window.
    Therefore, the solution seems to be to build my own JFileChooser-look-alike file browser (OK, I am NOT talking about the web browser now), based on a Java Window object. Is this possible? In other words, what methods or classes can I use to create the viewing of local files? Any other comments or ideas?

    Hi Sannie,
    change the order of the plots. Your RunAvg should be plot0, while the barplot is plot1…
    There's a reason, why BMPs are banned in the forum: their size! Please convert your images to (real) JPG or (even better for FP or BD images) PNG before posting them!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to get line plot in front of bar plot

    Hey Guys,
    How can I plot the moving average in front of the bar plot?
    This is an X,Y- plot of two arrays of data.
    Cheers,
    San
    Solved!
    Go to Solution.
    Attachments:
    untitled.jpg ‏388 KB

    Hi Sannie,
    change the order of the plots. Your RunAvg should be plot0, while the barplot is plot1…
    There's a reason, why BMPs are banned in the forum: their size! Please convert your images to (real) JPG or (even better for FP or BD images) PNG before posting them!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Why Save Images as .bmp?

    Just looking at all my project folders, we have hundreds and
    hundreds of screen captures that are .bmp format.
    I did my own test saving the same screen capture in different
    formats - .bmp, .jpg, and .gif.
    Results: .bmp is 955 KB, .jpg is 76 KB, and .gif is only 18
    KB.
    With all these images being published to our server, I was
    thinking it must be important to optimize images or else I would
    think this could affect how quickly the pages load once online.
    As a general rule, shouldn't all the screen captures be saved
    as .gif? If so, why is the default for RoboScreenCapture set to
    save as Windows Bitmap?
    thanks!

    Graphics Tips for browser-based Help Guides.
    ============================================
    For any web-based application, whether web sites or Help
    projects, try to minimise file sizes for quick download speeds, and
    optimising image sizes can make a significant differnce. for screen
    shotes, I strongly recommend kind of graphics package to reduce the
    number of colours. I use Paint Shop Pro, but there are many others
    on the market. (Sorry, MS Paint doesn't do what you need.)
    Which Image Format?
    ===================
    BITMAP
    These cause HUGE file sizes, and you should never need to use
    them. I just took a simple 980x530 screenshot of some text in MS
    Notepad, and this created a 1.5 Mb file, compared with 114 Kb for
    JPG and 28Kb for a GIF. ('Nuff said?)
    GIF
    For screen shot images, diagrams or line drawings, use GIF
    format. This works best where there are areas of solid colour and
    sudden changes of colour where you have lines, boxes and text
    superimposed upon it.
    The GIF format is limited to 256 colours, so you will need to
    reduce the number of colours in your favourite graphics package.
    Reduce colours using the 'Nearest Colour' method; do not use 'Error
    Diffusion', which makes a larger file size. The result is a clear
    image and compact file size. Where possible, reduce the number of
    colours as far as you can, consistent with retaining good
    appearance. If you can reduce an image as far as 16 colour GIF,
    this will give you the smallest file size.
    DON'T use GIF for photographs because of the bands of colour
    that show across the photo, which it tries to fit into a 256 colour
    palette.
    JPG
    JPG is optimised for photographs, where there are gradual
    changes in shade and colour.
    DON'T use JPG for screen shots because you end up with a
    larger file size and a 'gritty' appearance, as JPG tries to resolve
    the suddent transition between background white and solid black for
    text, for example. (See file sizes of example above).
    PNG
    NEVER use PNG format in RoboHelp because it makes RH unstable
    and cause crashes. Trust me, I know: it has cost me many man-days
    downtime over the years, caused by restarting from crashes and
    tracking this bug down.
    TIP for smaller screen shot file sizes
    ======================================
    In Windows XP, switch off the default "smooth edges of screen
    fonts" feature, as follows.
    1. Desktop > right-click > select Properties.
    2. Select the Appearance tab, and click on the Effects
    button.
    3. Clear the checkbox "Use the followng method to smooth
    edges of screen fonts".
    Depending on the screen shot, you can save up to 40% of a
    finished GIF file size.
    Hope this is useful!
    Best wishes.

  • Why java only can display GIF file not jpeg and BMP ??

    Did anyone know why java only can display GIF file not in jpeg and BMP ?? This is because the quality of GIS is not as good as Jpeg and BMP
    any code to load the display process ??
    thx guys !!!

    you can do jpegs but im not sure about bmps.
    The only thing ive noticed is that java cant support transparent jpegs, only transparent gifs
    Jim

  • 8.1.5; why are .png colors inverted automatically but not .bmp?

    Adobe Acrobat Professional 8.1.5
    When using PDF creator to convert image files to pdf's; scanned images (from blueprints) with black backgrounds and white text/lines:
    if file type = .png colors are automatically inverted. (white background black text/lines)
    if file type = .bmp, colors are not inverted.
    Why is this?
    Is there a way to invert colors for .bmp?
    Thanks.

    Does anyone else have any other suggestions?  I work at a firm where Photoshop is not available so this is not an
    option.
    Thank you!

  • Why is Exporting a BMP So Difficult in Ppro CS4

    Do I really have to go thru so many steps just to make a bmp from the timeline in CS4. I must manually select all the settings for the aspect ratio and uncheck sequence otherwise thousands of bmps are generated ans then I have to wait for Media Encoder to open and then I have to press start, etc. Even making a wav is now a pain in the butt. It was so simple in all other versions of Premiere, am I doing it wrong?

    Unfortunately, yes. When Adobe took AME out of PrPro, they added many requested features, like batch Exporting, but forgot the Export Frame. It was highly convoluted. CS4.1 (IIRC) did simplify things a bit, but with one omission (IMHO) - the Add to Project function from the days prior to CS4. Yes, you can still get it into the Project, but there is navigation and Importing involved.
    About half of the time I want the still into the Project, and half the time I do not. I liked the ability to decide, prior to CS4. Maybe CS5 will add back sort of a "one-button" process, with selectable defaults. Kind of like the old Export>Frame, or Export>Movie. Who knows?
    Good luck,
    Hunt

  • Why the value of 24bit bmp file read by the labview different from the original

    when i use labview to read a bmp file,it looks just fine,but the the pixel value is dfferent from the original,how it changed,can i change it back

    right... Your "result" indicator is an I16, it goes from -32768 to 32767... so that's not enough, before the 2 for loops, just after the Integer to colour value VI  you should place a convertion node to convert to i64 and also change you result display representation to i64.
    See attached VI.
    Hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    lll.vi ‏42 KB

  • Why do drag and drop images transfer as bmp instead of jpg?

    If I use drag and drop instead of "right click/save as" the file is saved as a bmp file rather than a jpg file that it is intended.

    Since this is on here a few times on a few threads here is the fix that worked for me on XP it should work on all platforms.
    1. Back up the contents of your Firefox profile folder. (See Link Below)
    https://support.mozilla.com/en-US/kb/Backing%20up%20your%20information?s=backing+up+your+profile&r=0&as=s
    2. Uninstall fire fox vand all personal info (book marks, passwords, cookies etc. remember you have all of thet backed up.) Via control panel.
    3. Go look where it was installed and see if there is still a Mozilla Firefox folder if so then delete that too (make sure you have no other programs in that folder like Thunderbird)
    4. Reboot.
    5. Reinstall a fresh install of firefox.
    6. Try dragging an image from a website to your desktop and see if it saves and a .jpg. If it works great it's fixed.
    7. Now Restore your backed up settings, plugin etc... Look for your new profile folder and then overwrite the contents of that folder with the contents of your back up folder.
    Now you can save the 3 hours it took me to figure out this solution.

  • Why do JPEG files show up as BMP files when I email

    Can someone help me send a full size JPEG Picture to a windows user without it changing it to a BMP file? I have chosen 'Always send windows-friendly attachments' and chosen 'Full Size', but it comes across as a .BMP file instead of JPEG.
    Please help

    If the person is using Yahoo on the other end they have to view your attachments by clicking on the "search shortcuts" and "my attachments". Then they will see the attachments as jpgs and have an option to download them. I am not sure what is happening because jpegs that I send by editing them in Adobe Photoshop Elements and dragging into mail attach in Yahoo normally.
    Yahoo may be using bmp files to display the files when the actual file is actually a jpeg.
    Kurt

  • Why, when I save a .BMP as Black & White, it is 256 color?

    AAARRRGGHhh!!!!!
    I HATE the MS Paint in Win 7!!!
    I want to save a .BMP with just TWO colors - Black & White -  for use in another program where I import a .BMP.
    However I can't import since I get an error that the .BMP is more than 256 colors....EVEN AFTER I SAVED AS BLACK & WHITE!!
    IF IT AIN'T BROKE, DON'T FIX IT!!!!

    Hi,
    This is just a warning to in case you do some mishandling.
    You can save the original picture in the desktop, then launch paint program. Click  ->Open to import the picture.
    Then save as "Monochrome Bitmap(*.bmp;*.dib)" tape, you will get the black&white picture.
    Karen Hu
    TechNet Community Support

  • When rotating my custom .bmp image with Rotate Image Control.vi using the Rotate.llb, why is my rotated image coming up blank?

    I downloaded the Rotate.llb and am trying to rotate a simple 24bit .bmp I made in Windows Paint, but the rotated image comes up blank.
    I edited the default image control and indicator to have my image inside it and really don't know what else to do? The example works fine with the default image, I'm wondering if it has to do with my image properties?
    I tried using "Picture to Pixmap" but to no avail. Any help would be greatly appreciated. I am attaching a screen shot of my results and the modified Rotate vi I am working on, thanks.
    Attachments:
    Rotate Picture Control_v2.vi ‏16 KB
    rotate_shot.jpg ‏383 KB

    Hello Sametron,
    Give this a try:
    Regards,
    Jeff L.
    Applications Engineer | National Instruments
    Attachments:
    201606.zip ‏1 KB

Maybe you are looking for

  • Multi users on one itunes account

    Hi I have my wife and daughter linked to my itunes account with their devices, how can I turn off the contacts or lock these to only show their contacts on their devices?

  • How do I install Snow Leopard onto a COMPLETELY BLANK hard drive?

    My Macbook Pro's hard drive bit the dust last week so I bought a new one.  This has NOTHING on it.  No operating system, no files, nothing.   I have a Snow Leopard installation disk avaliable to me.  I can put in the disk and it will show the Apple l

  • Imac 27" 10.6.8 Internal HDD to boot on OSX Mountain Lion

    I have a internal HDD which was on my IMac 27" with OS 10.6.8. The logic board has apparent passed on and I needed the data on the internal drive. Is it possible to boot that drive / or see the data on a Macbook Pro - Mountain Lion?

  • Sub Screen

    Hi Gurus,    Am studying screen exits scenario. When am studying this scenario am getting a doubt  that when creating the screen with transaction se80 and develop the screen in a particular function group. Normally function group is used for function

  • Synchronization - DAQmx not triggering

    I have worked with labview 8 for a little while & have never used it for synchronization. We have a PXI1042 chassis connected to the computer using 8331. 6723,5122,5412 need to be synchronized & I am using the clock from 6602 as a trigger for this. T