It throws IllegalStateException.
These methods are available in EJBContext class.
some of the methods works in certain type of beans and also depends on the status of the bean (i.e whether the bean is in trasaction or not).
If the criteria to call that method is not met then it throws IllegalStateException