Yashar
Yashar

Reputation: 1162

Converting from Seam to weld CDI

I am converting a project from Seam to CDI and I am quite new in these fields. I am stuck in converting @Startup, @Cretae, @RequestParameter , @Out , @AutoCreate ,@ Destroy tags, what is the alternative for these tags in Weld CDI?

Upvotes: 1

Views: 1568

Answers (3)

Ondra Žižka
Ondra Žižka

Reputation: 46816

Check this automated Seam to CDI conversion application:

https://github.com/jharting/classic

Upvotes: 1

John Ament
John Ament

Reputation: 11723

Also, you can use @Disposes in your CDI objects to destroy a produced object, @PreDestroy would do it if it's an auto created bean whereas @Disposes destroys an object created by @Produces. @Produces is the rough equivalent of @Out.

@RequestParameter can be brought in via Solder Servlet, no direct equivalent in CDI directly.

Upvotes: 1

LightGuard
LightGuard

Reputation: 5378

There's an @Startup EJB annotation and the @PostConstruct annotation that map to what you're looking for. Have you seen the migration bit on jdf http://www.jboss.org/jdf/migrations/seam2/open18_migration/ ?

Upvotes: 1

Related Questions