@Component(value="glueBizInternalController") public class GlueBizController.GlueBizInternalController extends Object
@RestController @RequestMapping("tx") public class SampleController { @Autowired GlueBizController bizController; @RequestMapping("withTx/{serviceName}") @Transactional public void runGlueServiceWithTx( @PathVariable String serviceName, HttpServletRequest request ) { GlueContext ctx = ..; bizController.doAction( ctx ); } @RequestMapping("withoutTx/{serviceName}") public void runGlueServiceWithoutTx( @PathVariable String serviceName, HttpServletRequest request ) { GlueContext ctx = ..; bizController.doAction( ctx ); } }
<?xml version="1.0" encoding="UTF-8"?>
<service name="sample-service" initial="someActivity" xmlns="http://www.poscoict.com/glueframework/service">
<transaction-manager id="default" commit="true" />
<activity name="someActivity" ... />
</service>
<?xml version="1.0" encoding="UTF-8"?>
<service name="sample-service" initial="someActivity" xmlns="http://www.poscoict.com/glueframework/service">
<transaction-manager id="propagation.requires.new" commit="true" />
<activity name="someActivity" ... />
</service>
<?xml version="1.0" encoding="UTF-8"?>
<service name="sample-service" initial="someActivity" xmlns="http://www.poscoict.com/glueframework/service">
<transaction-manager id="propagation.mandatory" commit="true" />
<activity name="someActivity" ... />
</service>
Constructor and Description |
---|
GlueBizInternalController() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
init() |
void |
run(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
GlueService 실행.
|
void |
runPropagationMandatory(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_MANDATORY 인 Transactional 적용.
|
void |
runPropagationNested(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_NESTED 인 Transactional 적용.
|
void |
runPropagationNever(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_NEVER 인 Transactional 적용.
|
void |
runPropagationNotSupported(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_NOT_SUPPORTED 인 Transactional 적용.
|
void |
runPropagationRequired(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_REQUIRED, ISOLATION_DEFAULT 인 Transacitional 적용.
|
void |
runPropagationRequiresNew(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_REQUIRES_NEW 인 Transactional 적용.
|
void |
runPropagationSupports(GlueContext ctx,
String serviceName,
long startTime,
GlueService serviceInfo)
PROPAGATION_SUPPORTS 인 Transactional 적용.
|
@Transactional(propagation=REQUIRED) public void runPropagationRequired(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=REQUIRES_NEW) public void runPropagationRequiresNew(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=SUPPORTS) public void runPropagationSupports(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=MANDATORY) public void runPropagationMandatory(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=NOT_SUPPORTED) public void runPropagationNotSupported(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=NEVER) public void runPropagationNever(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @Transactional(propagation=NESTED) public void runPropagationNested(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- public void run(GlueContext ctx, String serviceName, long startTime, GlueService serviceInfo)
ctx
- serviceName
- startTime
- serviceInfo
- @PostConstruct public void init()
@PreDestroy public void destroy()
Copyright © 2019 POSCOICT. All rights reserved.