Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean-Managed Transaction by EJB with xDoclet?  RSS feed

 
Naidu Sanapala
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new by xDoclet. Does anybody know, how to set bean-managed transaction by EJB with xDoclet?

Thanks,
Naidu Sanapala
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Naidu,

I hope this will help.
Regards.

 
Satheesh Satti
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I don't know if this is the right forum to ask this question. It is application assemblers job to define the transaction attributes in dd. Actually bean provider is not even supposed to know what transaction attributes the application assembler is going to set for the method...

And does this mean that everytime I change the way my bean behaves I have to actually go change the source code. That beats the whole point of component based development right.

Thanks in advance
Satheesh.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satti,

I've been through EJBs for a while now and I've never seen an application assembler :-) Actually every company has its own building process that compliles and builds the application from scratch. They also have separate process that gets the specific release and deploy it to QA or production. This of course implies that the developer/designers/architects know and agrees upon the transaction attributes.
All this separation of roles that J2EE defines were ment to work with the concept of bean providers (which actually never gained the market), because in practice business components are not much reused.
One more thing worth nothing is that you still can set or change the transaction attributes without changing the code. xDoclet and ejb-gen helps you to generate the deployment descriptors. After the application is built you can manually edit them and configure the transaction attributes. You probably need to do this every time a new version is released, and as you can see there is no point in doing this.
Regards.
 
Satheesh Satti
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I agree with you.. But in my opinion after the application is built we should not manually edit the dd and configure the transaction attributes as people who are referring the javadoc should not be misguided as they are looking at the older attributes.

Thanks for ur reply.

Satheesh.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is application assemblers job to define the transaction attributes in dd.

So why does the EJB 2.0 spec say this:
The Bean Provider of an enterprise bean with container-managed transaction demarcation may optionally specify the transaction attributes for the enterprise bean�s methods.


And:
Note: The transaction attributes may be specified either by the Bean Provider or by the Application Assembler.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!