I have a large application that takes a significant amount of time to publish on the JBoss server. Once this job is done, I can start/stop the server as many times I want. But the problem revolves round the fact that I have to republish every time I relaunch the eclipse even though the files are already present in the server, i.e. the state of the server is lost.
It would be of great help to know of any method that could relieve me from the overhead of publishing my application every time I start a new instance of eclipse and instead just start the server.
Related
I recently set up Eclipse debugging for developing Bukkit plugins. It's really awesome being able to see what variables are changing and on what breakpoints, but my main concern is, when debugging with clients connected to my test Minecraft server, they timeout. This is due to Eclipse, when encountering a breakpoint, pauses the servers main thread and timeouts the clients after 30 seconds. I've set the server so it doesn't shut down after 60 seconds, but the clients always disconnect. Is there a client-side option to set timeout periods? Or is it embedded in the way TCP packets work? - Or just another workaround to this?
I know this is 3+ years later but I've been struggling with this myself (Using Intellij Idea instead of Eclipse though) and I've found a solution to this, which I'll post here in case anyone else comes across this. Since the readTimeout was not behaving as I wanted it to do, what I did is the following:
a) To set timeout on the client side:
Install Forge for the spigot server version you are developing (You can still join spigot based servers for plugin development).
Install RandomPatches mod (allows you to edit hard-coded vanilla minecraft variables)
Edit RandomPatches config file (randompatches.toml) and set "read_timeout_seconds" based on your liking (This should only happen for the client-side when debugging a plugin. You should not change it for production servers ofcourse).
b) To set timeout on the server side:
Edit spigot.yml file and set "timeout-time" based on your liking. If you only change the client-side, server is going to crash once this value is surpassed and you'll need to start the server again.
c) Voila! Enjoy debugging for as long as you like!
I wanted to know what is the difference between starting an application and starting a managed server in weblogic server?
I have 5 different applications targeted to one managed server, whenever I make any change to any one application I have to restart the managed server entirely to make the changes to reflect. Why is it not that when I simply start and stop the application alone from Deployments it reflects, why do I need to start the managed server every time?
Restarting the managed server will restart the entire JVM including all installed EAR files. Stopping an application simply puts the application in Admin mode so the application class files are not unloaded.
This following document discusses various methods for redeploying applications in WebLogic based on the scope of the deployment:
https://docs.oracle.com/cd/E24329_01/web.1211/e24443/redeploy.htm#DEPGD258
I'm starting to move from visualvm to java mission control. I use wildfly 8.2, which doesn't work with JMC out of the box, but have modified the JMC ini to include the required class path as per my answer in the jboss community https://developer.jboss.org/message/955742#955742
I've been able to connect successfully, however the time it takes to connect is ridiculous. Often waiting 1-10 minutes (during which time jmc often becomes unresponsive) when connecting to a local wildfly instance, it's almost instant, the delay happens only when connecting to a remote instance.
Does anyone know what would cause this to be so slow, and if anything can be done to sort it?
I am in a bind here, what's happening is I have a legacy webapp which uses an in-memory database. The app requires 64GB of RAM just to launch and it takes at least 30 minutes to start.
I have to make updates/fixes to this application. Obviously it is impossible to launch it on my PC so everything has to be done on the server. I have considered setting up an Eclipse IDE on the Linux server where this app runs, but that introduces a set of new issues. I really would like to continue using my PC's Eclipse IDE and make edits to the app.
I am able to use the remote debugging capabilities of Eclipse IDE and launch this app from the linux server no problem. However this is not enough. After I make an edit, I need to be able to save/compile the file, and load this change into the server relatively quickly. I can't wait 30 minutes every time I make some updates to the app.
Can anyone recommend ideas on what to do in this scenario? Ideally I would love to be able to launch the app in DEBUG mode inside the Linux Eclipse IDE on the server and connect to this instance using remote debugging from my local/Windows IDE. I would like to make changes in my Windows Eclipse IDE and then quickly copy the files over to the linux server, pick them up in the Linux Eclipse IDE, compile them in the Eclipse IDE instance running in debug mode, and effectively "hot swapping" the changes, thereby avoiding the need to wait 30 minutes for the app to start back up... However when I try to do this, there is a caveat... I can't seem to be able to launch the webapp in Linux Eclipse IDE in both DEBUG mode and also remote-debug-connect to it, the error I am getting in Eclipse is:
"Cannot load this JVM TI agent twice"
I get what is going on: the local debugger is launching tomcat with the -agentlib:jdwp parameter and on top of it, I am trying to force it to also start up with the same arguments and so it complains, but is there some way to trick it into allowing me to remote connect into this debug session from my Windows server?
I managed to solve this issue by updating Tomcat's context.xml to support reloadable mode:
<Context reloadable="true">
And in the app to set it to reloadable in WEB-INF/web.xml:
<web-app reloadable="true">
Now I am able to make edits in my local windows Eclipse IDE, Save them, and they automatically get updated on the server side.
Is it possible to keep the cache 'loaded' between recompiles?
Using auto-compile mode (play ~run) it calls out to several external APIs to build the response. If I am just tweaking code it is a pain to have to wait to rebuild the whole page every time.
That's the nature of development mode. The server is restarted for every recompile, and the EhCachePlugin is reinitialized. In production however, you shouldn't be using the EhCachePlugin anyway, as it not designed for a distributed environment (since each instance has it's own local cache).
I use the Play2-Memcached plugin for my production servers, and after a lot of similar frustration, I just decided to install memcached on my local machine and use that in development mode as well. I'm only kicking myself for not doing it sooner. It also comes with the added bonus of being able to flushall from the command line.