Recorded walkthrough
A short narrated walkthrough of this migration demo. Delivering enterprise software since 2015. Now modernizing it with Safe AI.
Results at a glance
Architecture: before and after
Component mapping
| Oracle Fusion Middleware 12c | Spring Boot 3 / Camel / Kafka | Notes |
|---|---|---|
| @Stateless EJB OrderServiceBean | @Service OrderService | Container managed JTA becomes @Transactional |
| @Local business interface | Plain Spring bean, constructor injection | No JNDI lookups |
| JAX-RS OrderResource (javax.ws.rs) | @RestController OrderController | Same /api/orders contract |
| JPA javax.persistence + EclipseLink, JTA datasource | jakarta.persistence + Hibernate, Spring Data repository | Same table and columns |
| @NamedQuery findByCustomer | Derived query findByCustomerIdOrderByCreatedAtDesc | |
| WebLogic JMS queue in an XA transaction | Kafka topic orders.intake, @TransactionalEventListener after commit | Partition key orderId keeps per order ordering; add an outbox table for exactly once needs |
| SOA JMS adapter + BPEL receive | Camel from(kafka:orders.intake) | |
| XSLT OrderPlaced_To_FulfillmentRequest.xsl | OrderToFulfillmentMapper (typed Java) with parity tests | Each XSLT expression mapped one to one |
| OSB pipeline dynamic route by service level | Camel choice() to fulfillment.express / fulfillment.standard | |
| OSB business services (HTTP, retry 3) | Camel lane routes + RestClient FulfillmentGateway | Base URL is configuration |
| fault-policies.xml + EM console recovery | Camel deadLetterChannel, 3 retries with backoff, topic orders.dlt | |
| weblogic.xml work manager | Spring Boot thread pools, Kubernetes HPA / Container Apps scale rules | |
| BASIC auth realm (myrealm) | Spring Security with OIDC (planned, not in demo) | Gap kept explicit |
| WebLogic cluster + Node Manager | Docker image, ECS task, EKS Deployment, Azure Container App | Manifests in after/deploy, not applied |
Side by side code
Business logic: EJB to @Service
@Stateless(name = "OrderService", mappedName = "ejb/OrderService")
public class OrderServiceBean implements OrderServiceLocal {
@PersistenceContext(unitName = "OrdersPU")
private EntityManager em;
@EJB
private OrderEventPublisher publisher;
@Override
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public PurchaseOrder placeOrder(PurchaseOrder order) {
if (order.getQuantity() == null || order.getQuantity() <= 0) {
throw new IllegalArgumentException("quantity must be positive");
}
if (order.getPriority() == null) {
order.setPriority("STANDARD");
}
em.persist(order);
em.flush();
// XA: JMS send joins the same JTA transaction as the JPA insert
publisher.publishOrderPlaced(order);
order.setStatus("SUBMITTED");
return order;
}
@Override
public PurchaseOrder find(Long id) {
return em.find(PurchaseOrder.class, id);@Service
public class OrderService {
private final PurchaseOrderRepository repository;
private final ApplicationEventPublisher events;
public OrderService(PurchaseOrderRepository repository, ApplicationEventPublisher events) {
this.repository = repository;
this.events = events;
}
@Transactional
public PurchaseOrder placeOrder(PurchaseOrder order) {
if (order.getQuantity() == null || order.getQuantity() <= 0) {
throw new IllegalArgumentException("quantity must be positive");
}
if (order.getPriority() == null) {
order.setPriority(PurchaseOrder.Priority.STANDARD);
}
order.setStatus("SUBMITTED");
PurchaseOrder saved = repository.save(order);
// The XA JMS send becomes an after commit Kafka publish (see OrderEventPublisher).
events.publishEvent(OrderPlacedEvent.of(saved));
return saved;
}
@Transactional(readOnly = true)
public Optional<PurchaseOrder> find(Long id) {Integration: BPEL + OSB to Camel on Kafka
<con:flow>
<con:route-node name="RouteByServiceLevel">
<con:context/>
<con:actions>
<con2:dynamic-route>
<con1:id>_RouteByServiceLevel</con1:id>
<con2:service>
<con1:xqueryText>if ($lane = 'EXPRESS')
then <ctx:route><ctx:service isProxy="false">OrderRouting/business/ExpressFulfillmentBS</ctx:service></ctx:route>
else <ctx:route><ctx:service isProxy="false">OrderRouting/business/StandardFulfillmentBS</ctx:service></ctx:route></con1:xqueryText>
</con2:service>
<con2:outboundTransform>
<con3:replace varName="body" contents-only="true">
<con3:location><con1:xpathText>.</con1:xpathText></con3:location>
<con3:expr><con1:xsltTransform><con1:resource ref="OrderRouting/xslt/AddRoutingHeader"/><con1:input>$body/*</con1:input></con1:xsltTransform></con3:expr>
</con3:replace>
</con2:outboundTransform>
</con2:dynamic-route>
</con:actions>
</con:route-node>
</con:flow> // fault-policies.xml equivalent: 3 retries with backoff, then a dead letter topic for human recovery
errorHandler(deadLetterChannel("{{app.endpoints.dead-letter}}")
.maximumRedeliveries(3).redeliveryDelay(500).backOffMultiplier(2)
.useOriginalMessage().retryAttemptedLogLevel(LoggingLevel.WARN));
// OrderEventPublisher (JMS producer) -> Kafka topic orders.intake
from("direct:publishOrderPlaced").routeId("publish-order-placed")
.marshal().json(JsonLibrary.Jackson)
.to("{{app.endpoints.intake}}");
// BPEL OrderIntakeProcess: receive, validate, transform
from("{{app.endpoints.intake}}").routeId("order-intake")
.unmarshal().json(JsonLibrary.Jackson, OrderPlacedEvent.class)
.filter(simple("${body.quantity} <= 0"))
.log(LoggingLevel.WARN, "InvalidOrder ${body.orderId}")
.to("{{app.endpoints.dead-letter}}")
.stop()
.end()
.bean("orderToFulfillmentMapper", "map")
.setHeader("lane", simple("${body.serviceLevel}"))
.setHeader("orderId", simple("${body.externalRef.substring(3)}"))
// OSB dynamic-route on service level
.choice()
.when(header("lane").isEqualTo("EXPRESS"))
.marshal().json(JsonLibrary.Jackson).to("{{app.endpoints.express}}")
.otherwise()
.marshal().json(JsonLibrary.Jackson).to("{{app.endpoints.standard}}")
.end();
// OSB business services: deliver each lane to the fulfillment endpoint
from("{{app.endpoints.express}}").routeId("lane-express").to("direct:deliver");
from("{{app.endpoints.standard}}").routeId("lane-standard").to("direct:deliver");
from("direct:deliver").routeId("deliver-fulfillment")
.unmarshal().json(JsonLibrary.Jackson, FulfillmentRequest.class)
.setHeader("lane", simple("${body.serviceLevel}"))
.setHeader("orderId", simple("${body.externalRef.substring(3)}"))
.bean("fulfillmentGateway", "submit")
.process(e -> orderService.markRouted(Mapping: XSLT to typed Java
<xsl:template match="/ord:OrderPlaced">
<ful:FulfillmentRequest>
<ful:externalRef><xsl:value-of select="concat('PO-', ord:orderId)"/></ful:externalRef>
<ful:customer><xsl:value-of select="ord:customerId"/></ful:customer>
<ful:line>
<ful:sku><xsl:value-of select="translate(ord:sku, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></ful:sku>
<ful:qty><xsl:value-of select="ord:quantity"/></ful:qty>
<ful:amount><xsl:value-of select="format-number(ord:quantity * ord:unitPrice, '0.00')"/></ful:amount>
</ful:line>
<ful:destination><xsl:value-of select="ord:shipCountry"/></ful:destination>
<ful:serviceLevel>
<xsl:choose>
<xsl:when test="ord:priority = 'EXPRESS'">EXPRESS</xsl:when>
<xsl:otherwise>STANDARD</xsl:otherwise>
</xsl:choose>
</ful:serviceLevel>
</ful:FulfillmentRequest>
</xsl:template>
</xsl:stylesheet>public class OrderToFulfillmentMapper {
public FulfillmentRequest map(OrderPlacedEvent in) {
BigDecimal price = in.unitPrice() == null ? BigDecimal.ZERO : in.unitPrice();
return new FulfillmentRequest(
"PO-" + in.orderId(), // concat('PO-', ord:orderId)
in.customerId(),
new FulfillmentRequest.Line(
in.sku().toUpperCase(Locale.ROOT), // translate(sku, a-z, A-Z)
in.quantity(),
price.multiply(BigDecimal.valueOf(in.quantity()))
.setScale(2, RoundingMode.HALF_EVEN)), // format-number(q * p, '0.00')
in.shipCountry(),
"EXPRESS".equals(in.priority()) ? "EXPRESS" : "STANDARD", // xsl:choose
"camel-order-routing"); // ful:routedBy header
}
}Runtime: weblogic.xml to Dockerfile
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
<context-root>/order-service</context-root>
<container-descriptor>
<prefer-application-packages>
<package-name>com.fasterxml.jackson.*</package-name>
</prefer-application-packages>
</container-descriptor>
<session-descriptor>
<timeout-secs>1800</timeout-secs>
</session-descriptor>
<work-manager>
<name>OrderWM</name>
<max-threads-constraint><name>OrderMaxThreads</name><count>50</count></max-threads-constraint>
</work-manager>
<wl-dispatch-policy>OrderWM</wl-dispatch-policy>
</weblogic-web-app>
# Build stage
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /src
COPY pom.xml .
RUN mvn -B -q dependency:go-offline
COPY src ./src
RUN mvn -B -q package -DskipTests
# Runtime stage: no app server, just a JRE
FROM eclipse-temurin:21-jre
RUN useradd --system --uid 10001 app
WORKDIR /app
COPY --from=build /src/target/order-service.jar app.jar
USER 10001
EXPOSE 8080
ENV JAVA_TOOL_OPTIONS="-XX:MaxRAMPercentage=75"
HEALTHCHECK --interval=10s --timeout=3s --retries=12 CMD ["sh","-c","exec 3<>/dev/tcp/127.0.0.1/8080 || exit 1"]
ENTRYPOINT ["java","-jar","/app/app.jar"]
Test results (real run, Java 21, Maven 3.9)
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.060 s -- in com.surconsulting.demo.orders.OrderToFulfillmentMapperTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.001 s -- in com.surconsulting.demo.orders.OrderFlowIntegrationTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
docker compose smoke test
health: {"status":"UP"}
placed express order 1 and standard order 2
PASS order 1 status=ROUTED_EXPRESS (via Kafka)
PASS order 2 status=ROUTED_STANDARD (via Kafka)
PASS invalid quantity rejected (400)
fulfillment received: [{"lane":"standard","request":{"externalRef":"PO-2","customer":"C-200","line":{"sku":"WIDGET","qty":1,"amount":3.00},"destination":"CA","serviceLevel":"STANDARD","routedBy":"camel-order-routing"}},{"lane":"express","request":{"externalRef":"PO-1","customer":"C-100","line":{"sku":"SKU-ABC","qty":2,"amount":21.00},"destination":"US","serviceLevel":"EXPRESS","routedBy":"camel-order-routing"}}]
SMOKE TEST: PASS
Kafka topics after the run
$ kafka-topics.sh --list
__consumer_offsets
fulfillment.express
fulfillment.standard
orders.intake
$ docker compose ps
NAME IMAGE STATUS
after-kafka-1 apache/kafka:3.8.0 Up 40 seconds (healthy)
after-order-service-1 after-order-service Up 32 seconds (health: starting)
Safe AI guardrails: agents work, humans approve
Sur's agents only act inside the current phase. Nothing moves forward without a named human role approving. Every action and decision lands in an append only JSON lines log where each entry carries the SHA-256 of the one before it, so edits or deletions are detectable.
Audit log excerpt (guardrails/audit-log.jsonl)
| Time (ET) | Phase | Actor | Action | Detail | prev_hash |
|---|---|---|---|---|---|
| 09:03 | assess | agent:assessor | inventory | Scanned 1 WAR, 1 SOA composite, 1 OSB project. Found EJB 3 stateless bean, JAX-RS resource, JPA entity, WebLogic JMS producer, BPEL process, 2 XSLT maps, 2 OSB business services. | 0000000000 |
| 09:06 | assess | agent:assessor | risk_scan | Flagged: XA transaction spanning JPA and JMS; weblogic.xml work manager; BASIC auth realm; fault policy retries. | 04d048bf2f |
| 09:09 | assess | agent:assessor | report | Proposed component mapping table drafted for review. | 256109fd70 |
| 09:29 | assess | human:sur-solution-architect | changes_requested | Add the XA transaction risk and how ordering is kept per order. | 40f9041242 |
| 09:32 | assess | agent:assessor | revise | Added XA to after commit publish note; partition key is orderId. | 2dca625167 |
| 09:52 | assess | human:sur-solution-architect | approved | Assessment accepted. | f9ec65df73 |
| 09:55 | plan | agent:planner | plan | Target: Spring Boot 3.3, Java 21, Camel 4.8, Kafka. Topics orders.intake, fulfillment.express, fulfillment.standard, orders.dlt. | f1464d78b5 |
| 09:58 | plan | agent:planner | test_strategy | Parity tests for XSLT rules plus end to end flow test on in memory queues. | 90d452436f |
| 10:18 | plan | human:client-change-board | approved | Plan approved. No schema changes to PURCHASE_ORDER allowed. | daf2ae6ea4 |
| 10:21 | migrate | agent:migrator | generate | EJB OrderServiceBean to @Service with @Transactional. | 98fbf99143 |
| 10:24 | migrate | agent:migrator | generate | BPEL plus OSB pipeline to Camel routes on Kafka. | b643ecf2fa |
| 10:27 | migrate | agent:migrator | generate | XSLT maps to typed Java mapper. | 5e29cda9fd |
| 10:30 | migrate | agent:migrator | generate | Container image, compose, ECS, EKS, Azure Container Apps manifests. | 91908b21f0 |
| 10:33 | migrate | agent:migrator | policy_check | No secrets in code, no client identifiers, all endpoints configurable. PASS. | bacf450df5 |
| 10:53 | migrate | human:sur-tech-lead | approved | Code review done. Diff reviewed line by line. | c865364340 |
| 10:56 | verify | agent:verifier | run_tests | 6 tests, 0 failures, 0 errors. | 4fa2176c9e |
| 10:59 | verify | agent:verifier | smoke_test | Express and standard orders routed through Kafka; invalid order rejected. | 623b1072e5 |
| 11:02 | verify | agent:verifier | parity_check | externalRef, sku upper case, amount scale 2, service level fallback all match. | 2b2205ffd5 |
| 11:22 | verify | human:client-qa-lead | approved | Verification evidence accepted. | 803a4295a9 |
| 11:25 | release | agent:release | prepare_release | Release candidate 2.0.0 prepared. Manifests rendered, NOT applied. | f0553c77d9 |
| 11:28 | release | agent:release | rollback_plan | Keep OSB proxy live behind a feature switch for 2 weeks; route back by DNS if needed. | 27a0302ebb |
| 11:48 | release | human:client-release-manager | approved | Go for staged rollout (demo stops here, nothing deployed). | cc85b00202 |
Raw JSON lines (first 3)
{"action":"inventory","actor":"agent:assessor","detail":"Scanned 1 WAR, 1 SOA composite, 1 OSB project. Found EJB 3 stateless bean, JAX-RS resource, JPA entity, WebLogic JMS producer, BPEL process, 2 XSLT maps, 2 OSB business services.","evidence":{"before/order-service-ear/src/main/java/com/example/orders/ejb/OrderServiceBean.java":"ad3ca60c216d8b15658d30499b5601c455e3843c2f387db53bbb22b01179425f","before/osb-project/OrderRouting/pipelines/OrderRoutingPipeline.pipeline":"d34eb2c261354c8c1efa3c4b18a19a269892e065a2342418dea00be35f701193","before/soa-composite/OrderIntakeComposite/SOA/composite.xml":"2dfb658eea8a2b67f69290792882058b6944ebf4f7bd065e0634022104797eab"},"phase":"assess","prev_hash":"0000000000000000000000000000000000000000000000000000000000000000","target":"before/","ts":"2026-11-02T09:03:00-05:00","type":"agent_action"}
{"action":"risk_scan","actor":"agent:assessor","detail":"Flagged: XA transaction spanning JPA and JMS; weblogic.xml work manager; BASIC auth realm; fault policy retries.","phase":"assess","prev_hash":"04d048bf2f38f0c54977eb2d92a5b45ef80a33f3a30274783c4d5a15bd422da1","target":"before/","ts":"2026-11-02T09:06:00-05:00","type":"agent_action"}
{"action":"report","actor":"agent:assessor","detail":"Proposed component mapping table drafted for review.","phase":"assess","prev_hash":"256109fd70cdd01b67955d6104be910c650a0ab91887a83b0d1792b831c0b6b6","target":"docs/index.html#mapping","ts":"2026-11-02T09:09:00-05:00","type":"agent_action"}Done before, at scale
Two months to the Premier Support deadline
Book a 30 minute WebLogic and SOA Suite exit assessment with Sur Consulting.
Book your assessmenthttps://api.leadconnectorhq.com/widget/booking/81T4FtSrm6713g6KFqc1