I think we can propagate transaction across different containers.
This is also known as "two phase commit".
I think the problem amy be with the prograaming code at EJB A or EJB B.
Generally the EJBException should be propagated up to the Container.
i.e we should not catch EJBException or RemoteException, if caught it should be rethrown again, so that the container will come to know that the exception has occured and then the container will rollback transaction.
I am assuming that the container is responsible for managing transactions.