• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

BMP question

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What considerations make sense when writing an entity bean?

A. Use BMP when storing standard datatypes and performance is essential
B. Use BMP when storing standard datatypes and performance is not essential
C. Use BMP when storing complex datatypes and performance is essential
D. Use BMP when storing complex datatypes and performance is not essential
What is the correct answer?
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Benson Fung:
What considerations make sense when writing an entity bean?

A. Use BMP when storing standard datatypes and performance is essential
B. Use BMP when storing standard datatypes and performance is not essential
C. Use BMP when storing complex datatypes and performance is essential
D. Use BMP when storing complex datatypes and performance is not essential
What is the correct answer?


My answer would be D.
In EJB2.0, CMP performance is better than the BMP performance.
But Complex data types may not be possible with CMP entity beans.
So I would use BMP to store complex datatypes, where performance is not a essential criteria.
 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the suggestion answer, it should be A,C,D
But I don't understand why A.
Benson
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Benson Fung:
What considerations make sense when writing an entity bean?

A. Use BMP when storing standard datatypes and performance is essential
B. Use BMP when storing standard datatypes and performance is not essential
C. Use BMP when storing complex datatypes and performance is essential
D. Use BMP when storing complex datatypes and performance is not essential
What is the correct answer?


I think a,c and d are correct.
 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why A is correct???

Benson
 
gagaghost
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Benson Fung:
Why A is correct???

Benson


Reason is simple.
You can store standard datatypes in BMP when you write a EJB in your real applications.
 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know.
but why performance is essential?

Thanks
Benson
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there is an arguement that in EJB1.1, BMP performs better than CMP, so whenever performance is essentail, chose BMP, that why a,c are correct, and since BMP can handle complex data type, that is why choosing d.
I can say it confirmly why in EJB1.1 BMP is faster, but I think whoever give this mock question must think in this way.
any suggestion?
 
Naichen Liu
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I can say it confirmly why in EJB1.1 BMP is faster


oops, correction
I can NOT say it confirmly why in EJB1.1 BMP is faster
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vish Kumar:

My answer would be D.
In EJB2.0, CMP performance is better than the BMP performance.
But Complex data types may not be possible with CMP entity beans.
So I would use BMP to store complex datatypes, where performance is not a essential criteria.


Why should CMP performance be better than the BMP performance with EJB 2.0? Actually I would generally expect BMP performance to be better, since it hasn't the overhead of the container. Further I don't see any reference to performance of persistence, either BMP or CMP, in the EJB 2.0 spec.
I think A, C and D were the right answers.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BMP bean performance is always better than CMP bean. At the most CMP bean can perform as good as BMP bean. Main reason is that container generate generic database queries to satisfy multiple databases. This is what I read soe where regarding differences bet. BMP and CMP. Please refer Mastering EJB II for further reference.
So according to that A, C, and D are correct options.
Regards,
Ganapathy, S.
 
a wee bit from the empire
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic