WebLogic to Spring Boot
WebLogic to Spring Boot: the re-architecture path.
More change than moving to Tomcat, and a better place to land. Each WebLogic construct has a Spring counterpart, and the semantics need checking.
The short answer
Moving from WebLogic to Spring Boot replaces the application server with an embedded one and the Java EE programming model with Spring. Session EJBs become Spring beans, message-driven beans become listeners, JMS moves to Spring messaging on an external broker, and WebLogic security becomes Spring Security. It is a re-architecture, done in phases.
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 | Spring Boot | 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.
- 1
Inventory and tests
List every EJB, MDB, queue, descriptor and weblogic.* import. Write tests for current behavior.
- 2
Extract the business logic
Move logic out of container-dependent classes into plain classes. This is safe to do while still on WebLogic.
- 3
Swap the wrappers
Replace EJB and MDB wrappers with Spring equivalents. AI-assisted tools draft, engineers review.
- 4
Run side by side
Send a slice of traffic to the new service and compare results.
- 5
Retire WebLogic
Switch the rest once the new path has been clean through a business cycle.
After go-live
Keep it running after cutover.
Yes. EJBs become Spring beans, MDBs become message listeners, JMS moves to Spring messaging on an external broker, and security moves to Spring Security. It is a re-architecture, done in phases with tests.
It involves more code change, because Spring replaces the Java EE programming model. It also leaves you with no application server and an easier release process.
Stateless session beans become @Service classes, with @Transactional for transactions. Stateful beans usually need redesign.
Choose an external broker such as RabbitMQ or ActiveMQ and use Spring JMS or AMQP. Map redelivery and dead-letter policy explicitly.
For a new target, yes. It requires Java 17 or later and the jakarta namespace, and avoids a second upgrade later.
AceMQ supports Spring and the messaging brokers 24/7 after go-live.
Know the cost before anything moves.
A fixed-price assessment gives you the inventory, the risk score and a phased plan. Scope and cost are fixed before the migration starts.
Book a Fixed-Price AssessmentGet in touch
Talk to a modernization engineer
Tell us what you run today. An engineer, not a sales script, replies within one business day.