Where does the application logic run in a Java Web Start deployment? I want to understand the intellectual property security risk of Java Web Start. On the client end does it merely start the application on a server and then proceed to process pixels (GUI objects) and mouse clicks at the client? or is my application logic executing at the client?
Implicit in my question is the assumption that I place no value on any aspects of the design that can be inferred by looking at the GUI buttons, text output and by being an experienced user of the application. The value is in the code and logic.
Java Web Start downloads code to the client, and executes it there. The application logic will execute at the client.
Basically JWS keeps local .jar in sync with that on a server to execute an application in local mode. Read about JNLP here.
So the risk for reverse engineering is the same as with any jar packet Java app.
Basically Java Web Start downloads the latest jars (Application Logic) from the server when u launch it with the help of JNLP. and then it installs this application in temporary internet files or cache.
Your whole application logic(cache) exists in cache at client side. and then your jnlp file use them (jars)
Related
I am trying to execute .jnlp file on client machine using java web start as well as open web start.
How to make sure that only single instance of jnlp application or java web start application is running on client's machine?
I found that need to use SingleInstanceService and SingleInstanceListner interfaces, but not getting how to use that.
Can anybody give example?
Thanks in advance
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.
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.
My java application uses swings and makes a connection to the MySQL database. I want to run this application as a windows service which should start immediately at the logon of any user.
I think Java Service Wrapper is useful only for console applications.So kindly suggest me a suitable method.
Thanks for the help!!!
You don't want to have apps with user interfaces as services. Services can start at boot, and if they pop up a panel, they can hang the service waiting for user input with no user to provide any input. Split out the UI from the service code if you want to run the code as a service. Or like Andy mentioned, place the exe in the users startup group.
If you want to create a Windows service, Exe4J makes this easy. It will wrap your Java application in an executable that supports options to install, start, stop and remove it from Windows services.
If you want to start a user interface at the start of a user's logon, you can put the application into the Startup group.
The binaries (e.g. tomcat6.exe, and tomcat6w.exe) that are included with Apache Tomcat can be used to turn a java application into a service. Here's a link to the documentation, which includes instructions for installing your app as a service, etc.: Tomcat as a Windows service
http://kenai.com/projects/winsw works great, and allows easy logging of System.out and System.err.
Used in Glassfish v3.
i am writing a standalone java app. the app's properties should be configurable from a webpage deployed with the app. how do i achieve this ?
Thanks in advance
note: the app has an embedded HTTP client/server module. it should only run from command prompt
I don't think that's a good idea. Webpage forms are designed to work with a server, not with a standalone client app. You could have the app run its own web server, but that would mean the app has to be running for the configuration page to work, and it's also a rather contrived setup just to do some configuration.
It might be possible for the webpage to contain JavaScript that writes to a local file - I don't know enough about the JavaScript security model to say.
But why not have the configuration dialog as part of the app's GUI? That's the normal and expected behaviour - you'd need a pretty compelling reason to deviate from it.
JMX might be the answer that you're looking for. If you expose all of your configurable properties through MBeans, then adding a web page on top of that exposing these properties is just configuration.
You can launch a standalone Java app using JNLP files (Java WebStart). If you want the user to be able to configure the application before its launched, you can have the JNLP file dynamically generated, then pass properties as environment variables through the JNLP file.
You can configure your standalone Java app to read configurable properties from a properties file (say conf.properties) on the server.
You may have a UI webpage (html/jsp) with all the field to be configured. When the page is submitted a JSP/Servlet may write/update the contents of conf.properties on the server.
UPDATE: The above solution will work assuming only an admin user wants to update the properties file.
In case anybody should be able to update it, then concurrency issue has to be taken into account.
In that scenario, you have to implement a mechanism similar to how weblogic10 updates config.xml using Admin Console.
i.e. You will have 2 conf.properties files confA & confB (initially in sync). The standalone app will always read from confB. The UI will have 2 buttons say Lock & Release configurations. When an edit is made (locked & released), it will be written to confA and at the same time changes of confA has to be replicated to confB.