Hi Raminaa,
If you really want you could do all that, however, you have play around a lot with the SecurityManager to be able to execute those tasks and it is definitely not recommended by the
EJB Container spec.
You should not do any IO related stuff in your EJB because IO cannot participate in a transaction context.