I'm working on an EJB 2.1 project where we are required to provide both local and
remote interfaces to the EJBs. The team likes to use the Business Interface Pattern and
we use generics to get around issue where remote interfaces are required to throw
RemoteException while local interfaces are not. This technique worked fine under
WebSphere 6.1 but we get an EJB spec violation error under JBoss AS 5.1.0.GA during
deployment:
anonymous wrote : "09:55:54,905 WARN [verifier] EJB spec violation:
| Bean : PersonEJB
| Method : public abstract void delete(Long) throws Exception, UnknownIdDeviation
| Section: 7.11.5
| Warning: The methods in the remote interface must include java.rmi.RemoteException in
their throws clause."
Our code looks similar to this:
public interface AddressBeanBusinessInterface <E extends Exception>
| {
| public Long create( final Address address ) throws E;
| public Address read( final Long key ) throws E, UnknownIdDeviation;
| public void update( final Address address ) throws E, UnknownIdDeviation;
| public void delete( final Long key ) throws E, UnknownIdDeviation;
| }
|
| public interface AddressBeanLocal extends EJBLocalObject,
AddressBeanBusinessInterface<RuntimeException>
| {
| // empty - see the business interface for the local EJB methods
| }
|
| public interface AddressBeanRemote extends EJBObject,
AddressBeanBusinessInterface<RemoteException>
| {
| // empty - see the business interface for the remote EJB methods
| }
I'm not an expert on generics but I thought that by the time everything got compiled
all the typing modifications are done so I wouldn't expect JBoss' reflection code
to get confused. Anybody have any ideas on what we might try to resolve this issue?
Many Thanks,
Ron
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241234#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...