It's not possible to "hide" methods/attributes.
What you probably want is to enforce security restrictions.
How's the MBeanRegistration interface related to that???
If my object implements MBeanRegistration, the functions of that interface will get called automatically by the framework. But the functions are not visible in the jmx console. --> this is what I want.
The only way I managed to get the lifecycle methods called is declaring them in the xxxMBean interface and hence they show up in the jmx console.
The methods on the MBeanRegistration interface are completely irrelevant to the interface exposed by an MBean.
Again, it's a matter of applying security constraints to the invocation of an attribute (i.e. who's calling me?)
But because this is a bit complicated, I reckon the best solution for you is to provide an MBean CTOR that will allow you more or less to initialise the MBean with whatever settings at the begging, and either don't expose those settings at all as attributes, or expose them as read only attributes.
You can pass CTOR arguments when you deploy your service, see docs/dtd/jboss-service_4_0.dtd