Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setup a transaction manager? #13

Closed
edpichler opened this issue Apr 4, 2019 · 2 comments
Closed

How to setup a transaction manager? #13

edpichler opened this issue Apr 4, 2019 · 2 comments

Comments

@edpichler
Copy link

Hello, is it possible to configure a transaction manager to be accessible by JNDI?
I tried this, but didn't work, once each time InitialContext is created, it reads from the properties files and replace all previously binded resources:

            InitialContext jndiCtx = new InitialContext();
            jndiCtx.bind(JNDI_TRANSACTION_MANAGER, createTransactionManager());
            jndiCtx.bind(JNDI_DATASOURCE_NAME, createDataSource());

Do you have any idea no I can have my TransactionManager binded too?

@edpichler
Copy link
Author

I debugged Hibernate and discovered that he calls the context.close().
Using the flag org.osjava.sj.jndi.ignoreClose=true apparently solves my problem.
I am glad all of this is open source, so I could debug it all to understand how it works.

@h-thurow
Copy link
Owner

Thanks for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants