I've created several Java applications for CICS and used CICS Explorer and deployed them to CICS TS 4.2. Everything I've read says to deploy in this manner, but what if I want to create an application to deploy to a 3rd party environment? According to everything from IBM I need to use CICS Explorer. I've actually been able to avoid CICS explorer with a nasty hack that involves creating the bundle on Z/OS, downloading the bundle, editing the cics.xml file and redeploying elsewhere. Works but the whole process leaves something to be desired.
Is there a documented alternative to using CICS Explorer to deploy CICS Java apps? I did read something about the ability to deploy osgi bundles that are not cics bundles but I've not been able to find any more information on this.
Thanks for you question. Before I can answer I have a couple of my own if you don't mind. Firstly when you say you want to deploy an application to “a 3rd party environment” what do you mean; is this a different CICS system or something else? Secondly what issues do you have with using CICS Explorer to create and deploy the application?
You can maybe use the CICS build toolkit, this allows you to create/build a deployable CICS bundle project structure from an Eclipse project. It also allows you to modify specific variables in CICS bundle resource attributes using values in a properties file, this includes the JVM server name.
Time passes and, from 2019, there's another solution to this question.
If you build your Java using Maven or Gradle, you can use the CICS bundle Maven plugin or CICS bundle Gradle plugin. They take your Java module and wrap it up into a CICS bundle ready for you to deploy to either CICS or an artifact repository.
The plugins work for any release of CICS TS, but if you also have CICS TS 5.6 and above then you can use the CICS bundle deployment API directly from those plugins to also deploy to CICS as part of your development build.
Related
We are using STS 3.4 to develop Spring portlets for Liferay 6.1.2. When we deploy the project onto the server by droping that on the server view, the deployment never gets completed.
It says the deployment is complete and portlets are ready to use but it again reinitiates the deployment process.
Any idea why this endless deployment loop is happening?
I'm not sure if STS is aware of Liferay's additional deployment process (or if you need/use it): Liferay typically processes a WAR file before actual deployment to tomcat, thus you should drop your WAR file to Liferay's deploy folder. This might add some libraries from Liferay itself (depending on your configuration in liferay-*.xml files or some other necessities that I don't remember.
Especially if you use Liferay's Plugins SDK (you don't state if you do or if you don't). If you indeed use it, you might want to try the Ant target direct-deploy for building the WAR file: The result of this should be able to deploy directly to tomcat. I'm assuming that STS omits the Liferay deployment process (and direct-deploy would mimic it). I hope (from memory) that it was available on 6.1 already.
Can't go without the hint that you should upgrade.
I am working on a simple Java-DB2 insert program connected to cics region via CICS explorer. I created a plugin for an external jar(com.ibm.db2.jcc), exported the plugin as a deployable plugin and added this in the build path of the program. The package has also been added in the dependencies (import-package) of the program. But installing the bundle in the cics region, I am getting an exception.
The bundle ABC could not be resolved. Reason:Missing constraint:Import-package:com.ibm.db2.jcc;version="0.0.0".
Can someone help me trace the problem?
I'm assuming the program you're writing is in an OSGi bundle that's being deployed into a CICS JVM Server as your OSGi environment, using CICS's OSGi CICS bundle parts. It sounds like you're taking an existing binary dependency and rebundling it as an OSGi bundle, and want to have your program resolve it using OSGi.
Based on these assumptions, it sounds like you're having to add the bundle to your build path automatically, which I don't think you should have to do. Once you've set up your target platform (http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/index.jsp?topic=%2Fcom.ibm.cics.ts.java.doc%2Ftopics%2Fdeveloping_sdk.html) any dependencies should then be resolved either from OSGi bundles in your workspace, or your target platform. It should then just be a case of adding an OSGi bundle part for each of your bundles, and exporting your CICS bundle to your region. Explorer should take care of exporting all of your relevant dependencies to CICS.
If you wanted, it should be possible to add the DB2 jar file as a lib without rebundling as an OSGi bundle, by adding the library to your Bundle-Classpath manifest declaration, but you might already have considered this!
I have a maven project that contains several sub projects/modules(ears,wars, ejb's). Is there a way I can deploy the entire project at once, and how would I do that? My IDE is NetBeans.
What is the jboss version that you are currently using?
I think that you can create one shell script which is charge of to deploy all your modules. I have not seen any plugin that allow to do that.
A little back ground: We are using Apache Felix implementation of OSGI for our web development (Adobe CQ5 which inturn is built on apache felix). We have a few bundles of our own (around 10) and each of them are configured as a project.
Issue: During the development lifecycle, we make changes to a bundle and then use an ant script to create the bundle and deploy it in the felix. I am wondering if there is some way to enable hot deployment of the changes I make during development mode that would save developers time.
Based on my research, we can use the felix file install which will monitor a folder(s) for changes to any bundles and can deploy them automatically. But this again means I need to run ant script to build the jar file and move it to the auto deploy folder the file install is watching. Is there a better/fast way to achieve this? The script is currently taking a around 10 seconds (approx) to compile the classes, create osgi specific meta data files, bundle the classes+metadata in a new jar. Is there some way to do hot deployment, so that any change I make to a java file is automatically reflected in the bundle?
Many thanks
If you develop your project in Bndtools, and run from the built-in launcher, then Bndtools will handle immediately building any Java code that you change, and deploying the updated bundle into the runtime. This leads to an extremely quick code/test/debug/fix cycle.
Having said that, I'm amazed that it takes 10 seconds to compile and build your bundles currently! Are you building on an extremely ancient computer? Or is the bundle multiple gigabytes in size?
We tried DCEVM and it does almost everything we expected to reduce the develop+fix+test life cycle. I recommend this to all java developers using big web applications. Thanks for your suggestion on bndtools Neil.
We're currently moving from a quite old Perl + Ant build system to maven.
The software itself is a client/server app using RMI as main communication system and the build produces a (large) number of jars.
This piece of software existed long before usual frameworks become mature, so the it does not make usage of :
any usual persistence layers (Hibernate/JPA like)
any MVC application frameworks like Spring
any Java EE infrastructure ( no war/ear packaging)
In fact it is shipped as a set of jar and conf files, with a set of startup/admin scripts.
We ported the compilation/building system to maven3. The client and server deployment trees are currently being ported to maven with the assembly plug-in.
What we're currently missing, in the maven framework, is to be able to deploy the app on development stations and build servers and to run some basic integration tests.
Ideally we'd like to use maven in to deploy an image of the client, server and a DB fixture ( that is actually code generated as well).
I've found a lot of pointers on how to deploy a web app, few on the integration tests themselves, and almost none on how to handle the deployment of a (very) old school C/S architecture using maven.
So my questions would be:
are there are any known and mature plug-ins capable of deploying the app. and handling the DB fixture in a C/S manner?
If not, what would be your advice(s):
use ant rules and bind them to maven life cycle in order to handle the deployment process (we have a couple of ant targets that could be adapted to fit in the process)?
write a maven plug-in that would fit the exact deployment needs?