This content has been marked as final.
Show 2 replies
-
1. Re: init bean on app start
csa Jan 29, 2015 6:11 PM (in response to treblereel)1 of 1 people found this helpfulHi Dmitry,
If you can't use @Service or @Startup, an alternative would be to simply use a servlet: @WebServlet(name="startup", loadOnStartup="1"). A servlet context listener would also be an option.
Cheers,
Christian
-
2. Re: init bean on app start
treblereel Jan 29, 2015 6:22 PM (in response to csa)Wow so quick i don't want to use @Startup because of gwt's sdm. I thought that this is a potentially dangerous to use @Service or @webService annotations, so thanks for you answer !
ps:
some stuff really simple with Spring:
@Component
public class ActiveMQStarter {
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQStarter.class);
@PostConstruct
public void init() {
}