Usually when I restart the server apache (To deploy an application in production version) the Agent can't load correctly and I need to restart server one time again. The server is a production server and I can't restart every time.
Since the agent is loaded into the runtime, changes can only take effect on an application restart. You are modifying the tomcat config to load the dynatrace agent then starting it up and it makes you restart it a second time? The only reason i can see for this occuring is if you are using a older agent file to do the install then the server version you are on, in that case the agent would startup on the installed version, then phone home to the server, find the updated files, download them, and then say it needs an application restart for the latest update to take effect.