[jboss-jira] [JBoss JIRA] (WFLY-10258) Prevent enlisting additional resources on EJB caller side in case of server side @RequiresNew
Jörg Bäsner (JIRA)
issues at jboss.org
Wed Apr 18 10:58:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jörg Bäsner updated WFLY-10258:
-------------------------------
Description:
Scenario:
- server-1 (intermediary)
-- Running standalone profile
-- Has a remote-outbound-connection pointing at server-2 through server-2's public IP address
-- Intermediary bean need to lookup the Target bean in server-2 and also inject the {{TransactionManager}}
-- Intermediary bean need to enlist a _dummy_ XAResource
- server-2 (target)
-- disable {{JBOSS-LOCAL-USER}} auth
-- Target bean needs to be annotated with {{@REQUIRES_NEW}} (important)
- Standalone EJB client invokes an intermediary bean server-1, which as a result invokes target bean on server-2.
The _dummy_ XAResource should log in the {{commit}} method whether one-phase optimization is being used like:
~~~
@Override
public void commit(Xid arg0, boolean onePhaseOptim) throws XAException {
logger.info("-- Committing in the client resource. One-phase optimisation is: " + onePhaseOptim + " --"
+ (onePhaseOptim ? "" : " -> TWO-PHASE COMMIT !!!"));
}
~~~
In this scenario it is expected that the one-phase optimization is being used!
was:
Scenario:
- server-1 (intermediary)
-- Running standalone profile
-- Has a remote-outbound-connection pointing at server-2 through server-2's public IP address
-- Intermediary bean need to lookup the Target bean in server-2 and also inject the {{TransactionManager}}
-- Intermediary bean need to enlist a _dummy_ XAResource
- server-2 (target)
-- disable {{JBOSS-LOCAL-USER}} auth
-- Target bean needs to be annotated with {{@REQUIRES_NEW}} (important)
- Standalone EJB client invokes an intermediary bean server-1, which as a result invokes target bean on server-2.
The _dummy_ XAResource should log in the {{commit}} method whether one-phase optimization is being used like:
{{ @Override
public void commit(Xid arg0, boolean onePhaseOptim) throws XAException {
logger.info("-- Committing in the client resource. One-phase optimisation is: " + onePhaseOptim + " --"
+ (onePhaseOptim ? "" : " -> TWO-PHASE COMMIT !!!"));
}
}}
In this scenario it is expected that the one-phase optimization is being used!
> Prevent enlisting additional resources on EJB caller side in case of server side @RequiresNew
> ---------------------------------------------------------------------------------------------
>
> Key: WFLY-10258
> URL: https://issues.jboss.org/browse/WFLY-10258
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 12.0.0.Final
> Reporter: Jörg Bäsner
>
> Scenario:
> - server-1 (intermediary)
> -- Running standalone profile
> -- Has a remote-outbound-connection pointing at server-2 through server-2's public IP address
> -- Intermediary bean need to lookup the Target bean in server-2 and also inject the {{TransactionManager}}
> -- Intermediary bean need to enlist a _dummy_ XAResource
> - server-2 (target)
> -- disable {{JBOSS-LOCAL-USER}} auth
> -- Target bean needs to be annotated with {{@REQUIRES_NEW}} (important)
> - Standalone EJB client invokes an intermediary bean server-1, which as a result invokes target bean on server-2.
> The _dummy_ XAResource should log in the {{commit}} method whether one-phase optimization is being used like:
> ~~~
> @Override
> public void commit(Xid arg0, boolean onePhaseOptim) throws XAException {
> logger.info("-- Committing in the client resource. One-phase optimisation is: " + onePhaseOptim + " --"
> + (onePhaseOptim ? "" : " -> TWO-PHASE COMMIT !!!"));
> }
> ~~~
> In this scenario it is expected that the one-phase optimization is being used!
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list