I have an mbean service packaged as sar. and an enterprise app as ear.
I need to access ejb methods from within this service.
I understand that with jboss+tomcat it is possible to invoke ejb locally from within the servlet, if both ejb and servlet war are part of same ear.
Can the same be done for services? Can I package the sar inside ear so that calls are done locally and not remotely?
Absolutely . You can configure the sar inside the jboss-app.xml in the service tags. That way ur SAR becomes a part of the enterprise archive.