Rapid Application Developer - difference between "Publish" and "Republish" - java

I am new to working with RAD for Websphere. After making some Java code changes I notice the server and the EAR deployed on it will say something like "Started, Publish". Today I started my server and it says "Started, Republish" (on both the server and EAR). Can someone give me a simple explanation of what is meant by "Publish", "Republish", and any other status(es) I may come across while working on a Java web app with RAD for Websphere? Also, what is the appropriate action to take for each status if I want my Java changes to be picked up? I tried bouncing the server without doing a new build and it doesnt appear to have made any difference.

Started is the state in which your server starts deploying applications.
Publish is the state in which your server publishes a new application that was not already deployed. So, new deployment is Publish
Republish is the state in which your server already has published the application but there are few changes which need publishing again. So, instead of Publish since application is already deployed, server Republish the application to make sure that changes are published as well.

Related

Diagnose failed deployment

I have to deploy an EAR archive corresponding to a Java EE application in a client's WebLogic server. I have full access to Enterprise Manager but I'm not allowed to deploy through it—instead, I need to invoke a web service that triggers a home-brew shell script. I can see its source code: it first attempts to undeploy the app and (no matter the result) then attempts to deploy the uploaded EAR; each task call a Python script and that's where I lose track. I believe actual work is eventually done by Java libraries from WebLogic Scripting Tool.
The problem is that I'm not getting any error code or message but the application stubbornly remains in its previous release. I'm positively sure there's nothing wrong with the EAR. I've recompiled everything several times and it deploys successfully to the staging server (where I do use EM).
Is there any log file to be found either in Enterprise Manager or Administration Console?

How do I debug server-side errors?

Our Java application is going through migration from a WAS 7 server to a WAS 8.5 server - and for some reason, even though our application shows as Deployed in our Admin Console, the application itself isn't coming up on our assigned URL.
I've ruled out the possibility of a code-related problem by testing the application in my local server, so I know the problem is with some server settings - but, almost all of my experience in CS is in coding, and I don't know how to figure out where those settings have gone awry.
What options do I have to debug my application's server-side issues?
You don't specify what you mean by "coming up," so I'll start with the broad suggestions.
A couple things to sanity check:
Ensure the application has been deployed on the specific server you are trying to access it on. It's common to have multiple servers all in one cell controlled by one deployment manager, and applications can be deployed to only some of those servers. In the admin console, under Servers -> WebSphere application servers you can find the server you expect it to be on and check Installed applications.
Check to see if the application itself has started. It's possible the server has been started, but not the application. In Applications -> WebSphere enterprise applications, look for the green arrow next to your application.
If you're trying to access a servlet, make sure the context-root of your web module is set to what you expect. In the application's configuration page, it's in Context Root for Web Modules under Web Module Properties.
If all of those seem correct, or if the application is stopped and won't start, check the server logs in your profile's logs directory, especially the SystemOut.log and the ffdc folder. It may be that an error is occuring when you go to access it, or when it is starting up. Those should appear there.
If your application uses EJBs at a version less than 3.1, the EJBDeploy tool must have been run against your application either before deployment, or as part of the deployment process. If you are expecting the latter to occur, ensure the EJBDeploy tool was installed alongside WebSphere on the target system.
If all of that fails, you may way to break out the debugger (if that's allowed in your environment) and see if your code is even being reached.
Check Server Logs: in WAS Console you can find the logs of your server.
Debug in local server. By deploying an ear in your local server, you can then start the server in loggin mode. Then you shuld stop and restart your websphere aplication and it will be stoped in selected breakpoints.

Deploying clojure/java no-web app running in the background to Cloudfoundry

I have an application in Clojure which I'd like to deploy to CloudFoundry. The application is doing a background job, and needs to run periodically/always. It has no web interface. How can I deploy it to CloudFoundry?
I've found several resources which seem to indicate that it might not be difficult, but I'm not sure how to do it, I don't have yet too deep knowledge with CloudFoundry.
Thank you for help.
When you push the application, either add the --no-route argument to cf push or set no-route: true in your manifest.yml file. This bypasses the health check on CF which requires your app to be listening for incoming web requests.
Just be careful that your app continues to run. If the process exits, then CF will interpret that as your app having crashed.

web application auto install

I need to have an autoinstall/update a web application running on JBoss 6.
I need at least to:
* stop the server
* copy the war in the deployment directory
* apply DB update scripts
* start the server
Do you know an tool or open source project for that?
Thx
Christophe
Most Servlet containers have the ability to deploy without stopping the server. Some do it by dropping the WAR file in a specific directory which is polled by the webserver (if configured properly) while others expose "upload" web APIs.
JBoss typically uses Tomcat as its servlet container. While I don't know which version your version of JBoss is using, Tomcat has supported deploying on a running server for a very long time. Perhaps the documentation for Tomcat 5.5 is enough for you to determine what changes (if any) you need to make.
In the event that you really need to stop the server Tomcat has the ability to stop the server from an external program (it only requires the right kind of message to be sent); however, once stopped, Tomcat can't receive a "startup" message, it will have to be started manually.
A better solution would be to detect when the application started by looking at servlet lifecycle events, and then to "check" the database upon a "first started up" event. In the off chance that your database detection shows the database doesn't match the expected version, apply the changes. After the database detection shows the database is up-to-date, then start normal request processing. This isolates the code within your web application in such a manner that allows for easy deployment and upgrades, although it does mean more work in tailoring the application to encapsulate it's own database maintenance duties.
In the event that such a technique isn't an option, you will have to rely on an external tool to get the job done. Typically such a tool requires heavy integration of resources (sometimes across multiple machines). In such a case, an Enterprise Job Scheduler, or a workflow engine (with your own written adapters) is generally applied to solve the issues at hand.
For information, we finally implemented our own solution. Basically
One job downloads from a FTP a ZIP file containing an installer application written in Java
One unzipped, the installer is run. This one executes SQL update scripts, then deploy the WAR file using the JBoss JMX API. However for JBoss cluster support, we had to write our own MBean in order to copy the WAR file on each node.

Swing changes not refelecting in the server

I am using Java Swing. I have done some changes in client pages and I am compiling the entire application, building the ear file and deploying it in Weblogic 8.1 server. But the changes I have done are not reflected in the application. I have restarted the server, deleted logs and cache. Still i am not able to see changes. Please help me.
Swing is a library that allows creating UI in java. Weblogic is a J2EE application server. EAR file contains your server side application. What is the relationship between updating your server side and changes you are expecting to see on UI?
If you are using java web start or applet check the codebase, i.e. where the client side application is started / downloaded from

Categories

Resources