[
https://issues.jboss.org/browse/JBTM-3161?page=com.atlassian.jira.plugin....
]
Matej Kralik edited comment on JBTM-3161 at 10/3/19 4:40 AM:
-------------------------------------------------------------
When I added the missing _LRAParticipantRegistry_ dependency to the application
_JerseyConfig_, the application work* with the latest Narayana as well.
Example of Jersey Config.:
{code:java}
@Component
@ApplicationPath("/")
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() throws URISyntaxException {
register(WadlResource.class);
register(FlightParticipant.class);
packages("io.narayana.lra.filter");
register(new AbstractBinder(){
@Override
protected void configure() {
bind(LRAParticipantRegistry.class)
.to(LRAParticipantRegistry.class);
}
});
}
}
{code}
\* However, the LRAParticipantRegistry has to be public. [~mmusgrov] Is it possible to
make the LRAParticipantRegistry public in the implementation? Once it will be public, I
can create an example of how to use LRA in the Spring Boot + JAX-RS(jersey) service to
the Narayana lra quickstart (flight_5.9.8_working in Attachments).
was (Author: mkralik):
When I added the missing _LRAParticipantRegistry_ dependency to the application
_JerseyConfig_, the application work* with the latest Narayana as well.
Example of Jersey Config.:
{code:java}
@Component
@ApplicationPath("/")
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() throws URISyntaxException {
register(WadlResource.class);
register(FlightParticipant.class);
packages("io.narayana.lra.filter");
register(new AbstractBinder(){
@Override
protected void configure() {
bind(LRAParticipantRegistry.class)
.to(LRAParticipantRegistry.class);
}
});
}
}
{code}
* However, the LRAParticipantRegistry has to be public. [~mmusgrov] Is it possible to make
the LRAParticipantRegistry public in the implementation? Once it will be public, I can
create an example of how to use LRA in the Spring Boot + JAX-RS(jersey) service to the
Narayana lra quickstart (flight_5.9.8_working in Attachments).
Nested LRA doesn't start in the Spring Boot + JAX-RS application
----------------------------------------------------------------
Key: JBTM-3161
URL:
https://issues.jboss.org/browse/JBTM-3161
Project: JBoss Transaction Manager
Issue Type: Bug
Components: LRA
Reporter: Matej Kralik
Assignee: Michael Musgrove
Priority: Critical
Attachments: flight_5.9.6.zip, flight_5.9.8.zip, flight_5.9.8_working.zip
For demonstrating purpose, I migrated flight service from [narayana
quickstart|https://github.com/jbosstm/quickstart/tree/master/rts/lra/flig...] to
the Spring Boot application and uploaded it to the attachment.
When I stop debugger in the original swarm flight service (FlightParticipant [line
64|https://github.com/jbosstm/quickstart/blob/3b848517086c2abc32bff6895b2...]),
the *_@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId_*, is new for that service. When
I stop debugger in the SpringBoot+JAX-RS, the lraId is the same as for a parent. It looks
that the _ServerLRAFilter_ doesn't start the new LRA.
I add a breakpoint to the *_ServerLRAFilter.filter(...)_* to see when the filter is
applied and create new LRA before the JAX-RS method. When I call original swarm flight
service, the filter is used however when I call SpringBoot flight service, the filter is
not used so it looks that the filter is not used at all in the SpringBoot+JAX-RS
application.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)