Yes, although there are some caveats. The non-business methods are relatively easy - creates and removes generally take no extra work, ditto for finders on CMT entity beans. Its really the business methods you have to keep an eye on.
- Local interfaces pass by value, so for the same methods to behave correctly with remote clients, your beans can't depend on their client sharing state with them (this is a bad idea even with local clients)
- You have to restrict yourself to legal RMI-IIOP types for return values and method args if you want to expose a business method in both interfaces
- Methods in a remote interface can't expose local interface objects (you can't return the EJBLocalObject, for example). If you need to return some kind of
ejb object, you'll need probably need two methods - one for remote clients and another for local clients.