Developing Apama Applications > Developing Apama Applications in Java > Overview of Apama Java Applications > Parallel processing in Java applications > Using contexts in Java applications
Using contexts in Java applications
To use EPL contexts in Java applications:
1. In EPL code, create a context that you want to use in your Java application.
2. In your Java application, define an event type that contains a Context field.
3. Use this event type to obtain a reference to the context you created in EPL.
4. Use the context reference to enqueue events to that context.
For an example, see the samples\java-monitor\context directory in your Apama installation directory.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.