• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMP question

 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • 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?
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
According to the suggestion answer, it should be A,C,D
But I don't understand why A.
Benson
 
gagaghost
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Why A is correct???

Benson
 
gagaghost
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I know.
but why performance is essential?

Thanks
Benson
 
Naichen Liu
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Jay Kipler
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic