Follow these steps to attach your session listener when the engine starts:
- Move your ISessionExtension implementation into an own ivy-project that contains nothing but the extension
- Implement an `ch.ivyteam.ivy.server.IServerExtension` that can be used to start/stop your extension. Typically in here you register your code against a Manager of the ivy core engine.
- Convert your ivy-project into a PDE plugin project. Java Perspective -> Project context menu -> Configure -> convert to Plugin Projects
- Add a `META-INF/MANIFEST.MF` file.
- Add the IServerExtension (will create a plugin.xml file in the root of the project). To do open the MANIFST.MF, tab 'extensions' -> add -> IServerExtension
- Set your own ServerExtension as 'class' of the IServerExtension
- Export -> JAR -> include 'src, META-INF/MANIFEST.MF, plugin.xml'
- Put the JAR to your engine under `lib/patch`
- Start the engine. The name of your extension should appear in the list of started services.
**Environment**
- tested on Axon.ivy 6.5
- the simplified registration via extension point should work since Axon.ivy 6.1
**Sample project**
- ivy project with SessionExtension and the ServerExtension: [SessionExtensionSample_65.iar][1]
- compiled, exported JAR to run with an ivy engine: [SessionExtensionSample.jar][2]
**Screenshots:**
![server extension implementation][3]
![manifest][4]
![extension point][5]
![engine output][6]
[1]: http://developer.axonivy.com/q-and-a-attachments/SessionExtensionSample_65.iar/upfiles/SessionExtensionSample_65.iar
[2]: http://developer.axonivy.com/q-and-a-attachments/SessionExtensionSample_65.jar/upfiles/SessionExtensionSample_65.jar
[3]: http://answers.axonivy.com/upfiles/Java_-_SessionExt-src-ch-ivyteam-sample-SessionLifecycle.java_-_Axon.ivy_Designer__028.png
[4]: http://answers.axonivy.com/upfiles/Java_-_SessionExt-META-INF-MANIFEST.MF_-_Axon.ivy_Designer__026.png
[5]: http://answers.axonivy.com/upfiles/Java_-_SessionExt-META-INF-MANIFEST.MF_-_Axon.ivy_Designer__027.png
[6]: http://answers.axonivy.com/upfiles/rew@zuglinrew_-media-rew-data-!axonIvyProducts-engine_53272_(eyo_before_65)-bin_025.png