Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Loading data when Application starts
Loading data when Application starts [message #1080055] Mon, 05 August 2013 08:17 Go to next message
Eclipse UserFriend
Hello,

I want to load some specific data/preferences for my e4 application without compatibility to 3.x. I took this class from a standard java application i created. It's a singleton config class with several classes that store data for specified parts of my application.

Now I have the problem when to load/create my configuration class to get access to the values when the application starts.

Do I have to create an OSGI service for this or is there somewhere the possibility to control it manually within some kind of main method as in a standard app.

Greetings
Johannes
Re: Loading data when Application starts [message #1080061 is a reply to message #1080055] Mon, 05 August 2013 08:21 Go to previous messageGo to next message
Eclipse UserFriend
You can provide a lifecycle POJO and put your startup code in a method annotated @PostContextCreate in which you can have the application context injected. Something like @PostContextCreate public void setUp(IEclipseContext){..}

http://www.vogella.com/articles/Eclipse4LifeCycle/article.html

[Updated on: Mon, 05 August 2013 08:22] by Moderator

Re: Loading data when Application starts [message #1080069 is a reply to message #1080061] Mon, 05 August 2013 08:33 Go to previous message
Eclipse UserFriend
This is exactly what I was looking for! Thank you!
Previous Topic:HandledToolbaritem display text and icon
Next Topic: e4 compatability layer: add toolbar item in main toolbar
Goto Forum:
  


Current Time: Thu Jul 24 10:42:27 EDT 2025

Powered by FUDForum. Page generated in 0.06322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top