Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
What are the recommended plugins for eclipse to work with weblogic? Specifically I would need to work with older version of weblogic, 8.1, however I could use any version of Ecplise. I would like to debug the application and set breakpoints etc.
My bigger task is to move the project over to Jboss, can I deploy the same app on both app servers within Eclipse with presumably 2 sets of config files etc, any advice? 2 separate projects?
If you are using Eclipse with the WTP, then Weblogic Integration is available through an additional server adapter. To get it, right-click the Servers view then select New > Server and click on Download additional server adapters. Select the Oracle extension from the list and proceed with the install. Once installed, you'll be able to add a new server for WebLogic from version 8.1 to 11g (for BEA WebLogic Server v8.1, look under BEA System, Inc.).
alt text http://blogs.oracle.com/gstachni/WindowsLiveWriter/DevelopingApplicationsforWeblogicServer1_C379/image_thumb.png
If you have WTP servers created for JBoss and WebLogic, it's definitely possible to deploy and run the same project on both of them, there is nothing particular to do (the proprietary deployment descriptors can coexist if you want to use them, you don't have to create 2 projects for this).
In order to debug your code running on Weblogic (or any other java server for that matter) you don't need anything but Eclipse itself. Search Google for java remote debugging.
As for deploying to Weblogic and Jboss - as long as your code is not using proprietary stuff from J2EE containers vendors you should be fine with one project. Standard configuration files will be common, container specific files will be separate and often won't even have to be removed in build time as container would just ignore them. This way the same artifact (e.g. War) could be deployed to both containers.
This concerns the JBoss part of the question: If there are real product-specific differences in the code, they should hopefully be localized to one or few classes. Apart from this hygienic measure, it would be unhelpfully painful to separate your project into two.
Most of the configuration files should be the same for the two environments too; if not, you may consider doing what we do at my job site: We have a conf_XXX and a conf_YYY directory for separate configuration files.
The problem of including/not including the correct files per deployment environment should be delegated to one or two ant build scripts. If there are indeed file differences, you can create a proj_Weblogic.war and a proj_jboss.war and deploy those to the appropriate servers. If you can't find specific deployment ant tasks, you can still use straight file copy tasks or scp to move your WAR files into the server's appropriate deployment directories.
This is easy with IntelliJ. No plugins needed - it's built in. I'd recommend junking Eclipse and trying a better IDE.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've made Java Swing application using hibernate (it automatically creates tables etc. when it is run). I need to make some installation version to my application, is it enough to just upload my jar file? What should I do when I want to publish my application? Just prepare link to jar and some readme which contains info that for example:
install newest version of java ( http://www.java.com/download )
make msyql database user 'user' with password 'password'
create database "application".
run application.jar
Edit
I want to simulate process of selling my application to some company. For example my application is hmm to manage some store, u can put there some notes, bills etc. This application works on some database, which ll be placed somewhere in this store, I don't want to make this application accessible from internet. So how should i install it? Readme file example was kinda bad, now we can assume that i need to go there and install for them database and configure it. So at the moment I need only to make possibility for company to install my software without me help, in cases for example hiring 100 new people.
If you want your app been redistributable. I'd use Java web start. Read the tutorial
Java Web Start software provides Java developers and users with many deployment advantages:
With Java Web Start software, you can place a single Java application
on a web server for deployment to a wide variety of platforms,
including Windows, Linux, and Solaris. Java Web Start software
supports multiple, simultaneous versions of the Java platform. An
application can request a specific version of the Java Runtime
Environment (JRE) software without conflicting with the needs of other
applications. Users can create a desktop shortcut to launch a Java Web
Start application outside a browser. Java Web Start software takes
advantage of the inherent security of the Java platform. By default,
applications have restricted access to local disk and network
resources. Applications launched with Java Web Start software are
cached locally for improved performance. Updates to a Java Web Start
application are automatically downloaded when the application is run
standalone from the user's desktop.
See also stackoverflow's info page Java web start info
In addition to the fine answer of #nachokk, I'll expand on points 1-3.
The best way to deploy a JWS app. or applet is to use the Deployment Toolkit Script.
(& 3.) Look to using the ExtensionInstallerService. That is what you'd used to install/configure the DB itself. Here is a demo. of the service.
You can create an installer with IzPack.
It can also be combined with Launch4J to download the JRE.
The idea is to embed jboss AS7 to my project and add it to version control. Additionally to check the ability of start the server using mvn jboss:devserver (similar to how we run mvn appengine:devserver) So does it makes sense to write my own archtype ?
To my client this reduce lot of complexities so we can create our own jboss configuration to work with and the client's C# developers who will be going to work on java project development. find it easier to setup their local machines to run their changes locally. using similar command mentioned above.(mvn jboss:devserver) I wonder if anyone ever had this idea to work by?
I would probably look into using something like Puppet, instead of checking in all of JBoss.
Puppet uses a custom declarative language to define system configurations. Your puppet script would probably do the following:
Download JBoss from a public server, and unzip it to your desired location
Copy custom configuration files from your version control repo into JBoss
Copy your applications into JBoss
Puppet is a lot more powerful than the simple scenario that I have just described, but this scenario is a start.
With this solution, you would only end up checking in your puppet script and any custom JBoss configuration files you might need. In addition, I believe it would make your JBoss upgrade path a lot simpler, as you would only need to change the version of JBoss in your puppet script, and re-run puppet.
I think the ideal way to deal with situations like this is through packaging. If your client is deploying on some sort of unix server (i include Linux in that), then they are already using a package manager to manage system software on their servers. A package manager has the ability to install software, remove it, upgrade it, and, crucially for you, to install other packages on which some package depends.
You could therefore package JBoss, so that the package manager could install it, then package your application, specifying a dependency on JBoss. When the client installs your application package, JBoss will automatically be installed.
However, this plan only works if you client has a certain degree of infrastructure set up. They need to be using a system with a package manager. They need to have a way of managing package installation (a configuration management tool like Puppet, Chef, Ansible, or something vendor-proprietary is ideal for this). They need to be able to distribute custom packages inside their environment. They need to have either a way of accepting custom packages from you, or of accepting package build scripts and then building packages themselves.
In a server environment of any size, the sysadmins should and probably will have all this infrastructure anyway, because it's fundamental to managing a fleet of servers. But if your client doesn't have it, it may be too much effort to set up.
That said, the absolutely minimal version of this approach would be for you to send them the package files for the application and JBoss by email or SFTP or whatever, and then for the sysadmins to install them manually (eg with yum localinstall). This is not a lot better than having them install JBoss manually, but it's a step in the right direction.
I was handed an application where these two JARs are simply included in the lib directory. As far as I can tell, they aren't actually distributed separate from the Java Enterprise Edition packages. Assuming that they have everything that I need, is this a good idea? It does cut down on the size of the deployment.
Those jar files are just needed in the classpath. If they are you don't need to include them in the deployment.
It's not sane to remove any package for the Java EE installation if that's what you mean. It could affect other apps that do need those packages and the bugs are kinda of hard to track down when they happen.
UPDATE
So the question would be is it OK to run Java EE libs without a Java EE insall?. If there is no Java EE installation and that app is meant to be run with a JRE there is nothing wrong with that. It's just an app that needs the JRE plus 2 libs from the Java EE, just make sure (thats the tricky part) those libs don't have any dependencies from other Java EE libs
UPDATE
Both apparently don't need other dependencies but if you want to make sure download them from the maven repositories.
It depends whether you want to deploy your application on some Java EE application server (Glassfish, JBoss etc.) or keep it outside. In latter case, it is not question if that's good idea or not - you have to include imq.jar and jms.jar in your application to be able to communicate with JMS message broker.
I have used this approach many times, one example is standalone application that sends SMS by putting it on a message queue. On the other side, there is a MDB within application server that listens on particular message queue and sends the SMS.
Our current process for upgrading the application is to undeploy the current version, and then deploy the newly created EAR process.
I have seen softwares which have an "auto update" functionality (such as Spring Tools Suite). The software downloads the updated files automatically and performs a self upgrade. There is no need to download the complete setup again and uninstall/install the application.
I just wanted to check if anything similar exists for Java EE web applications as well?
Many servers today support hot-deployment, where you deploy the app over the running one.
This of course still needs the functionality to pull the app from somewhere.
In JBoss 4 at least (and I think it is also available in 5), you can tell the deployment scanner to watch multiple directories, so it could monitor e.g. a shared drive and when you put the application there it would see it and pick it up.
The proper way to redeploy code at runtime is to use OSGi. This is a system created to allow automatic dependency resolution. It allows e.g. for you to keep running older code for existing connections, while using the new code for new connections.
It also allows you to link to newer versions of libraries, which are loaded automatically.
See https://docs.jboss.org/author/display/AS7/Helloworld+OSGi+quickstart for a nice quickstart for using OSGi with JBoss 7.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
What are the recommended plugins for eclipse to work with weblogic? Specifically I would need to work with older version of weblogic, 8.1, however I could use any version of Ecplise. I would like to debug the application and set breakpoints etc.
My bigger task is to move the project over to Jboss, can I deploy the same app on both app servers within Eclipse with presumably 2 sets of config files etc, any advice? 2 separate projects?
If you are using Eclipse with the WTP, then Weblogic Integration is available through an additional server adapter. To get it, right-click the Servers view then select New > Server and click on Download additional server adapters. Select the Oracle extension from the list and proceed with the install. Once installed, you'll be able to add a new server for WebLogic from version 8.1 to 11g (for BEA WebLogic Server v8.1, look under BEA System, Inc.).
alt text http://blogs.oracle.com/gstachni/WindowsLiveWriter/DevelopingApplicationsforWeblogicServer1_C379/image_thumb.png
If you have WTP servers created for JBoss and WebLogic, it's definitely possible to deploy and run the same project on both of them, there is nothing particular to do (the proprietary deployment descriptors can coexist if you want to use them, you don't have to create 2 projects for this).
In order to debug your code running on Weblogic (or any other java server for that matter) you don't need anything but Eclipse itself. Search Google for java remote debugging.
As for deploying to Weblogic and Jboss - as long as your code is not using proprietary stuff from J2EE containers vendors you should be fine with one project. Standard configuration files will be common, container specific files will be separate and often won't even have to be removed in build time as container would just ignore them. This way the same artifact (e.g. War) could be deployed to both containers.
This concerns the JBoss part of the question: If there are real product-specific differences in the code, they should hopefully be localized to one or few classes. Apart from this hygienic measure, it would be unhelpfully painful to separate your project into two.
Most of the configuration files should be the same for the two environments too; if not, you may consider doing what we do at my job site: We have a conf_XXX and a conf_YYY directory for separate configuration files.
The problem of including/not including the correct files per deployment environment should be delegated to one or two ant build scripts. If there are indeed file differences, you can create a proj_Weblogic.war and a proj_jboss.war and deploy those to the appropriate servers. If you can't find specific deployment ant tasks, you can still use straight file copy tasks or scp to move your WAR files into the server's appropriate deployment directories.
This is easy with IntelliJ. No plugins needed - it's built in. I'd recommend junking Eclipse and trying a better IDE.