How about building a stateless session facade and within a (transacted) method calls both your other two enterprise beans?
You have not always the freedom of choice. I'm faced
with a similiar problem: The (given) interfaces I need
to implement use transactions spanned over many methods.
Any further suggestions?
Use a stateless facade ;-)
Otherwise you will have to separate the client portion and the EJB portion into two different JVM's. I don't know why the UserTransaction was coded with the restriction you're seeing, the same issue came up in London training last week. To me it looks like poor implementation but there might be other reasons behind why it was done this way.
It is not always possible to use another session bean.
I have a jsp which processes an input stream from a multipart posting. I would like to do this in 1 transaction but I get
javax.transaction.SystemException: Cannot use this in the server. So please I would be grateful if someone could fix this.
Submit as a RFE or bug in sourceforge.