If your timer event is being activated through JMX, there is no container transaction established. The datasource you are using isn't going to work right. You can use a datasource that supports local transactions (if you can establish a user transaction) or no transactions.
... connection info goes here ...
I would recommend firing a message through JMS to have some sort of transaction context to work with the session bean.
IMHO, this is very bad design.
No matter if you can get this to run, you must not do this. With registering your SFSB as listener to the Timer, you are violating the programming restrictions (EJB spec), since the timer is doing a callback by referencing the bean instance.
i tried this in oracle_ds.xml:
<!-- <transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation> -->
in addition an entry in transaction-service.xml:
without this, connection will be closed after a business method...
=> no changes, same error-message!
java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection
very strange i think, the "no-tx-datasource"-declaration prevents using my datasource in transaction context?
tanks for your advise, i know it's not a "beautiful" solution - but the major problem is: how can i achive a custom timout starting after completing a business-method in a sfsb?
I think the trick is not building a workaround and NOT doing this in SFSB.
Your SFSB could call a MBean doing all the things you like to do.
if i would be at the beginning of a project, maybe i would consider a better solution, but in fact, i have a sfsb with 3 business-methods, and a few jdbc-statements (select for update, etc.) over all 3 methods.
i need a kind of timeout-facility between the business-methods (eg. after the first, before the second) very urgent. is there no way, to solve this problem??? any idea?? it's hard to believe, that nobody needs more than the one timeout defined for the whole SFSB...