• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help for a COM+ Programmer  RSS feed

 
Sal DiStefano
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for someone who understands both technologies, to help me confirm the similarities and differences of programming for each technology.
I an trying to grasp entity beans and the differences in the types. I think I grasp it but I am just looking for some reassurance.
I understant that a bean is the business logic and it resides in a "Container". I understand that this translates to a Component residing in MTS/COM+. The COM+ Object context would translate to the Container Classes which intercept calls to the EJB.
My question is when talking about Statefull beans. Also, CMP (Container Managed Persistance) Microsoft really bashes this issue. Saying it is evil. Everything done in COM+ is Stateless for scalibility reasons.
If anyone knows of a whitepaper or article where I could get up to speed on the differences and similarities, I would appreciate it.
Thank You
Sal
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sal,
I've worked with both Microsoft and J2EE distributed architectures.
EJB's are business components.
It depends upon how you use them, but I'd put "business logic" (i.e. rules) in a session bean not an entity bean. A session bean can be stateful or stateless.
Entity bean represent business data/concepts in the problem domain.
This separation/distiction is not really made in the MTS/COM+ world, but is somewhat dealt with in the .NET.
Answers by statement...
"I understant that a bean is the business logic and it resides in a "Container"."
True.
"I understand that this translates to a Component residing in MTS/COM+. The COM+ Object context would translate to the Container Classes which intercept calls to the EJB."
Essentially, the concept is they run within and therefore are therefore dependent upon the container for it's resources and life cycle. The container also supplies a similar context through which the EJB communicates with the container.

"My question is when talking about Statefull beans."
Remember only session beans are stateful, not entity beans. Entity beans are persistant and last as long as the data.
Also, CMP (Container Managed Persistance) Microsoft really bashes this issue. Saying it is evil.
I don't think CMP is what they take issue with, CMP simply means the container takes care of the calls to the data source for you. You don't explicity call methods to interact with the database, the container manages these low level interactions for you, so you can focus on the business logic/interaction not the data persistance CRUD (create, read, update, delete).
Everything done in COM+ is Stateless for scalibility reasons.
You can use stateless session beans in the same way. The issue is whether or not the business problem and the interaction with the user requires or is simpler by persisting information and state over multiple requests/messages/calls.

Regards,
Byron Estes
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!