Hi, Sujatha Kumar
I will avoid the approach if I can. The most important reason is because I rely on tools to generate deployment descriptors. The tool I used is EjbGen. How that works is that it allows me to specify tags in front of each business method of the session bean, and then I can run the tools. It will generate the deployment descriptors according to the tags I specified. Therefore, if used the approach suggested by your architect, I will have to place this stuff in a plain java class. First, it will be really weird because some people might not understand why you put them there because they simply do not know about the tool. Second, I guess your architect will just supply you the class, and therefore, to use that, you will have to ask him to put those tags in the source file, and run the tools. This will be a very hideous deployment process.
Also, why you use session bean I think is probably you want to expose this service methods remotely. Therefore, you can have a web server talking to an application server for scalability reason.
If that is the case, a lot of methods are required to be tweeked so that you get the most of the data transported in 1 network calls. That involves how you define the parameters that you use to set and get data. If you directly implements the ServiceImpl, which I assume contains very fine grained methods, it will really slows down the performance when you trying to use session bean remotely.
Furthermore, I just thought about it is that when you program using a plain java class, you are passing the object around using this keyword. You can not do this with EJB, and
you should know the reason why. Therefore, great care should be paid when developing those classes. You have to make sure the this class actually includes restrictions imposed by EJB.
Other than that, I can not think of any other negatives. Therefore, if your team is not on the same boat as me, it might be fine just going with that approach.
[ July 08, 2005: Message edited by: Jeremy Hsu ]
[ July 08, 2005: Message edited by: Jeremy Hsu ]