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

Made getTransactionManager() protected instead of private #1344

Closed
wants to merge 1 commit into from
Closed

Made getTransactionManager() protected instead of private #1344

wants to merge 1 commit into from

Conversation

ljnelson
Copy link
Contributor

This pull request makes the getTransactionManager() method in TransactionContext protected instead of private. In my use case, I have no need of JNDI. It would be nice to be able to override this method so that I can simply use, for example, com.arjuna.ats.jta.common.TransactionManager.transactionManager().

Signed-off-by: Laird Nelson ljnelson@gmail.com

Signed-off-by: Laird Nelson <ljnelson@gmail.com>
@jbosstm-bot
Copy link

⚠️ CI not started.

Author is not the 'narayana' contributor, members of jbosstm can write comment of text to permit PR being run.

@jbosstm-bot
Copy link

⚠️ narayana CI not started.

Author is not the 'narayana' contributor, to permit PR being run members of jbosstm can write comment of text: TESTIT

@mmusgrov
Copy link
Contributor

mmusgrov commented Jul 12, 2018

You could use UserTransaction:

UserTransaction ut = com.arjuna.ats.jta.UserTransaction.userTransaction();

And then if you want to manually enlist resources you could do:

   ut.begin();
   TransactionImple tx = TransactionImple.getTransaction();
   tx.enlistResource(...

@tomjenkinson
Copy link
Contributor

tomjenkinson commented Jul 12, 2018

Or if you need a reference on the transaction manager itself you could use:

TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();

So, I will close this and if there is something specific that can't be done with either of these then please can you open a discussion on our forum and we would be happy to discuss more: https://developer.jboss.org/en/jbosstm/content?filterID=contentstatus[published]~objecttype~objecttype[thread]

@ljnelson
Copy link
Contributor Author

OK; will start a discussion. For posterity I'm simply trying to get the transactional interceptors to work in CDI SE without JNDI. All I need for this to work is for the transaction manager to be supplied in a DI-friendly way rather than looked up in JNDI.

@jbosstm-bot
Copy link

BLACKTIE profile tests failed on Linux (https://ci-master-jenkins-csb-narayana.cloud.paas.psi.redhat.com/job/btny-pulls-narayana/PROFILE=BLACKTIE,jdk=jdk8.latest,label=swarm/626/): Narayana rebase on master failed. Please rebase it manually

@jitendrakmwt
Copy link

Getting so many emails from today , already unsubscribed and still getting emails.

@tomjenkinson
Copy link
Contributor

@jitendrakmwt sorry about that

@tomjenkinson
Copy link
Contributor

@jitendrakmwt it should have stopped, we will need to look into it a bit more

@mmusgrov
Copy link
Contributor

@jitendrakmwt Sorry I was setting up a PR poller job on our upshift installation. I temporarily added a build periodically schedule and it started testing all the PRs. Sorry about that. It is disabled now

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