ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 8, IIB9 - Java libraries in Messagebroker libraries

Post new topic  Reply to topic
 WMB 8, IIB9 - Java libraries in Messagebroker libraries « View previous topic :: View next topic » 
Author Message
tobi3010
PostPosted: Fri Aug 08, 2014 1:17 am    Post subject: WMB 8, IIB9 - Java libraries in Messagebroker libraries Reply with quote

Newbie

Joined: 02 Dec 2013
Posts: 6

Hi,

just need an hint/answer from the experts out there.
I tried to search for this in the forum but maybe i just missed the correct keywords, or just have not found what i am looking for.


What i am trying to do, and why:

I have an environment currently wmb 8 (in future it will be iib9). I "extended" ESQL by implementing some functionality in Java and making them available in ESQL by CREATE FUNCTION .... The ESQL is in an library, the Java as usual in a separate Java-Project.
By nature the esql/java library should be available in nearly all flows as it implements some core-functionality. (e.g. like making regexp.replace available in ESQL). ESQL is the favoured language and I want to keep the technology-stack small, mainly because most colleagues like ESQL more than Java.
So i have multiple applications making use of this library. When the applications are created (in the Toolkit) they link the libraries and within the libraries the including Java-projects (as jar).
But when it comes to changes i have the feeling that the classloader does not always get the right classes. And as i dont want to deploy all flows if i have a change in the library i came to the conclusion it would be best to deploy the java-artifacts only once. (To the shared-classes, as i read is also recommanded.) I am aware that by doing so you can not remove functions or change the signature of a method without serious impacts on all flows. So in that case you still would have to redeploy all flows. But in generall you only do some extensions to the functionality of a class, or correct the behaviour. By deploying it only once i would expect the changes to be working in all flows. Thats my goal, hardening the deployment, and keeping downtimes because of changes low.
Just tried this and it seems to work in general, but with some restrictions.

My problem:
First i had the Java-Project linked in the Message Broker library. Then i removed the link and tried to deploy, but the Toolkit will always find the project containing the Java-classes and include it to the library. But that is exactly what i want to avoid. I Just want to deploy this library without the java included. When removing the Java-Project from the workspace it works great, but if it is in the workspace (even not linked by the library, even if renamed or newly created ) the toolkit will find it and include it in the library.
As i am not the only one working on this workspace and broker this seems to be dangerous to me, as if anyone deploys an application making use of the library he might, without noticing, also deploy the java-artifacts.

So far thank you for reading up to here. It's a long description, but i wanted to make sure you understand what i am trying to do and why. But here are my questions:
1) What do you think of doing it this way? (Separating the ESQL from Java in this way.)
2) Do you hava long-term experience with this and can provide some troubles one might run into doing it this way?
3) If it is ok to do it like this. Is there any preferable way of excluding the jars from this library?

Kind regards and thanks in advance,
Tobias
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 08, 2014 5:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Move the java code to a separate Java project. I guess you say it is, but to be clear, this should just be a regular Eclipse Java project that is not linked to any Broker library or etc.

Make the jar file built from the java code an external project reference on the library that contains the ESQL bindings.

Put the jar file built from the java code into the shared-classes directory on every broker runtime.
Back to top
View user's profile Send private message
tobi3010
PostPosted: Mon Aug 11, 2014 1:11 am    Post subject: Reply with quote

Newbie

Joined: 02 Dec 2013
Posts: 6

Thanks mqjeff,

i already tried this. I created a new Eclipse Java-Project. But after adding the JCN_HOME/jplugin2.jar from SDPShared i can't get rid of the Java library in the WMB-Library. Seems like it is found and added wether i link it or not.
The only way of WMB not to find it seems to be not to have it in the workspace during deployment. As i need MBMessage and MBElement in some java classes i need the plugin.jar.

Any other idea, or am i missing something?

Kind regards and many Thanks,
Tobias
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 11, 2014 5:19 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

This is what jeff is telling you:

  • create a standard java project for your java code
  • create the jar file for your java code
  • create a library to be referenced in your application
  • add the jar file to the library class path
  • deploy jar file to shared-classes
  • build the app (bar file)
  • if need be remove jar file from bar file
  • deploy app.

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 8, IIB9 - Java libraries in Messagebroker libraries
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.