This content has been marked as final.
Show 3 replies
-
1. Re: Prevent EJB deployment with sar
jaikiran Nov 19, 2009 1:39 AM (in response to falcor1)So is there a way to tell JBoss not to deploy the stateless session beans that it is finding in the sar?
Are you even packaging the bean implementation classes (which have the @Stateless annotation) in the .sar? If you are packaging only the interfaces (which is the right thing), then i don't see any issue. -
2. Re: Prevent EJB deployment with sar
falcor1 Nov 19, 2009 8:45 AM (in response to falcor1)The sar contains the class files for the MBean interface and implementation, it also contains a jar file that has the stateless bean interfaces and the implementations with @Stateless annotation.
I do realize that I could produce 2 separate jars, one with interfaces only and one with implementation. That seems like a bit of a maintenance hassle though and complicates the build process. Another downside is that @Stateless defaults the mapped name attribute to the implementation class, so the clients of my stateless session beans look them up by usingImplementation.class.getSimpleName() + "/remote"
I guess I could explicitly set the mapped name to the interface, but again thats more work and more maintenance. -
3. Re: Prevent EJB deployment with sar
jaikiran Nov 19, 2009 9:28 AM (in response to falcor1)"Falcor1" wrote:
I do realize that I could produce 2 separate jars, one with interfaces only and one with implementation.
That seems like a bit of a maintenance hassle though and complicates the build process.
It's not about a maintenance hassle, it's actually the right way to do it. The .sar is a client of the EJB and hence should only have the bean interfaces and not the implementation class. Including the implementation class is equivalent to deploying a new bean."Falcor1" wrote:
Another downside is that @Stateless defaults the mapped name attribute to the implementation class, so the clients of my stateless session beans look them up by usingImplementation.class.getSimpleName() + "/remote"
I guess I could explicitly set the mapped name to the interface, but again thats more work and more maintenance.
Yes, that's the default.