Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Request Manager > Customizing the Arbortext PE Request Manager
  
Customizing the Arbortext PE Request Manager
If you want to write your own Dynamic Components to run in the Arbortext PE Request Manager, you need to:
develop and compile your Java code. When you compile your Java code, you'll need to include the file e3\e3\WEB-INF\lib\e3servlet.jar in your class path. e3servlet.jar contains the definitions of the interfaces that you must implement.
place the class files in PE_HOME\e3\e3\WEB-INF\classes or place the classes in a JAR file and put the JAR in e3\e3\WEB-INF\lib.
update e3config.xml o define your components so that Arbortext PE Request Manager will load them when Arbortext Publishing Engine initializes.
As a Java servlet, the Arbortext PE Request Manager may be called to process more than one HTTP request at a time. Each request is handled by a separate thread, so all custom code must be thread-safe. Consult a good programming resource if you need to learn more about thread-safe code before developing a dynamic component. In general:
Avoid the use of global variables.
Guard accesses to any global variables you do use by using synchronized blocks or routines.
For performance, keep synchronized blocks or routines as small as possible so that one thread blocks others as briefly and infrequently as is safe.
Allocate working storage at the start of each request.
Make sure the name of every disk file you create or write to is unique.
Test your dynamic component by transmitting many simultaneous requests to the server, to make sure that your code really is thread-safe.