Decision
When is Spring Boot the right WebLogic target?
Choose Spring Boot when you want to stop depending on an application server at all. You build one executable jar, run it in a container or on a plain JVM, and release each application on its own schedule. The cost is code change: the Java EE container services must become Spring ones.
If you want the least change, look at WebLogic to Tomcat or a Jakarta EE server. For a wider view, see WebLogic migration.
Construct by construct
How does each WebLogic construct map to Spring?
| WebLogic and Java EE | Check carefully | |
|---|---|---|
| Stateless session EJB | A @Service bean | Transaction boundaries the container applied silently |
| Stateful session EJB | Redesign. Often a session-scoped bean or externalized state | Passivation, session size, failover |
| Message-driven bean | @JmsListener or @RabbitListener method | Concurrency, redelivery, poison messages |
| JMS in WebLogic | Spring JMS or AMQP against an external broker | Ordering and exactly-once expectations |
| @Resource data source via JNDI | Spring Boot auto-configured pool, with properties | Pool sizing and any JNDI lookups left in code |
| Container-managed transactions | @Transactional | Rollback rules differ for checked exceptions |
| JPA with a server persistence unit | Spring Data JPA with Hibernate | Entity manager scope and lazy loading |
| JAX-RS resources | Spring MVC controllers, or keep Jersey | Exception mappers and filters |
| WebLogic security realm | Spring Security | Role names, SSO and identity provider settings |
| Work manager | TaskExecutor and thread pool settings | Priorities and limits tuned over the years |
Before and after
What does an EJB look like after the move?
Before: a stateless session bean annotated @Stateless with @TransactionAttribute(REQUIRED), injected into servlets with @EJB. After: a class annotated @Service and @Transactional, injected by constructor. The annotations are mechanical to change, and a recipe can do most of it. The review is about what the old container did without being asked.
Example. Every business method on an EJB runs in a transaction by default (REQUIRED), whether or not anyone wrote an annotation. In Spring, a method with no @Transactional runs with no transaction. If the conversion adds @Service and drops the transaction attribute on a few methods, two writes that used to commit or fail together can now half-succeed. Rollback rules also need a check: both models roll back on unchecked exceptions by default and not on checked ones, but EJB ApplicationException settings have no automatic Spring equivalent. Characterization tests on the failure paths catch both.
Messaging
What about message-driven beans and JMS?
A message-driven bean gets a listener method. The work is in the surrounding behavior. WebLogic's JMS server handled persistence, redelivery limits and error destinations. An external broker handles them too, but with its own configuration. Decide the broker first, then map redelivery and dead-letter policy explicitly.
AceMQ runs RabbitMQ, Kafka and ActiveMQ for clients, so this decision is one we can support after cutover. See what we support after migration.
Security
How does WebLogic security move to Spring Security?
WebLogic realms, role mappings in weblogic.xml and security providers all have to be restated in Spring Security configuration. Spring Security 6 removed older configuration styles, so write it for the current model from the start. A mistake here is a vulnerability rather than a build error, so a named engineer reviews every authorization rule and we test with deliberately unauthorized requests.
Baseline
Which Spring Boot version should the target be?
Spring Boot 3, on Java 17 or later, with the jakarta namespace. Starting on Boot 2 only adds a second migration later. The details are on the Spring Boot 3 migration page. If the WebLogic code is javax, see javax to jakarta migration.
Delivery
How is the move phased?
This is the strangler approach from our eight principles: the old and new run together until the new proves itself.
Step 01 of 05
Inventory and tests
List every EJB, MDB, queue, descriptor and weblogic.* import. Write tests for current behavior.
Step 02 of 05
Extract the business logic
Move logic out of container-dependent classes into plain classes. This is safe to do while still on WebLogic.
Step 03 of 05
Swap the wrappers
Replace EJB and MDB wrappers with Spring equivalents. AI-assisted tools draft, engineers review.
Step 04 of 05
Run side by side
Send a slice of traffic to the new service and compare results.
Step 05 of 05
Retire WebLogic
Switch the rest once the new path has been clean through a business cycle.