This scenario can only apply for a CMT bean (because a BMT bean will always create its own transaction).
There is no isRunningInCurrentTransaction() method, but you can nevertheless get some some information.
If the transaction attribute is Mandatory and the method is called without an existing transaction context, the Container must throw javax.transaction.TransactionRequiredException to a remote client or javax.ejb.TransactionRequiredLocalException to a local client.
If the transaction attribute is Never and the method is called with an existing transaction context, the Container must throw java.rmi.RemoteException to a remote client or javax.ejb.EJBException to a local client.
In CMT bean, the txn attribute is specified in DD and container manages txn for bean. one can check whether current txn is destined for rollback by calling boolean ejbcontext.getRollbackOnly(). there is no method to my knowledge that will tell whether there is any txn context available. you have to trust container on that
for BMT bean (session only), one can use ut.getStatus() to find out the txn status. note that, BMT bean does not allow txn to propogate in i.e. the client can not pass it's txn to BMT bean.