Can I use inheritance in remote/local interfaces? (EJB3)
ejb-3.0, jakarta-ee, java
Solution
Your way is not allowed as you can not mark your interface with both @Local and @Remote annotations according to specification. And it is not a good idea from point of code reading.
Recommended solution is
public interface SomeComponent {
public Something processStuff();
}
@Local
public interface SomeComponentLocal extends SomeComponent {
}
@Remote
public interface SomeComponentRemote extends SomeComponent {
}
Problem
An example: ``` @Remote public interface SomeComponentRemote{ public Something processStuff(); } //-- @Local public interface SomeComponentLocal extends SomeComponentRemote{ } ``` Is that allowed? Can i do this regularly?