Websphere Name Space Bindings affect the JNDI scope resolution order - jms

Here is the situation:
I'm on websphere Network Deployment v8.0.0.3
I've an application which use 2 queuese
One Queue is for internal application usage (Publisher and Consumer are inside the same application) the other queue is used by other modules deployed on Other application server inside the cell.
So I have configured the 1st queue at Cell Scope level and the second queue at Cluster scope level.
Everything was working until I added a Name Space Binding.
After that every jms jndi object Cluster Scoped are not present anymore inside a dumpNameSpace.sh output.
Seams like the resolution of the scopes are modified by the presence of a Name Space Binding.
Which indeed is really odd but I got the same behaviour on 2 different installations of WAS.
Thanks for anyone which knows this.
Update
This is the diff between the jndi dump that works and the one which not.
--- clsdumpOk 2012-08-07 11:49:43.000000000 +0200
+++ clsdumpKo2 2012-08-07 11:49:59.000000000 +0200
## -454,28 +454,12 ##
(top)/clusters/TestCluster/jdbc/modulobase
(top)/clusters/TestCluster/jms
(top)/clusters/TestCluster/jms/as
-(top)/clusters/TestCluster/jms/as/BatchRequest
-(top)/clusters/TestCluster/jms/as/BatchResponse
(top)/clusters/TestCluster/jms/as/ciccio
-(top)/clusters/TestCluster/jms/as/FSCleaner
(top)/clusters/TestCluster/jms/as/License
(top)/clusters/TestCluster/jms/as/Mailer
-(top)/clusters/TestCluster/jms/as/Plans
-(top)/clusters/TestCluster/jms/as/RiaResponse
-(top)/clusters/TestCluster/jms/ConnectionFactory
-(top)/clusters/TestCluster/jms/pac
-(top)/clusters/TestCluster/jms/pac/as
-(top)/clusters/TestCluster/jms/pac/as/Events
(top)/clusters/TestCluster/jms/queue
-(top)/clusters/TestCluster/jms/queue/batch-request
-(top)/clusters/TestCluster/jms/queue/batch-response
-(top)/clusters/TestCluster/jms/QueueConnectionFactory
-(top)/clusters/TestCluster/jms/queue/events
-(top)/clusters/TestCluster/jms/queue/filesystem-cleaner
(top)/clusters/TestCluster/jms/queue/license
(top)/clusters/TestCluster/jms/queue/mailer
-(top)/clusters/TestCluster/jms/queue/plans
-(top)/clusters/TestCluster/jms/TopicConnectionFactory
(top)/clusters/TestCluster/jta
(top)/clusters/TestCluster/jta/usertransaction
(top)/clusters/TestCluster/SecurityServer
## -495,8 +479,10 ##
(top)/clusters/TestCluster/url/casCfgFile
(top)/clusters/TestCluster/UserRegistry
(top)/clusters/TestCluster/wb25
-(top)/clusters/TestCluster/wb25/topic
-(top)/clusters/TestCluster/wb25/topic/ria-response
+(top)/clusters/TestCluster/wb25/conf
+(top)/clusters/TestCluster/wb25/conf/locking
+(top)/clusters/TestCluster/wb25/conf/locking/lockingEnabled
+(top)/clusters/TestCluster/wb25/conf/rootFolder
(top)/clusters/TestCluster/wm
(top)/clusters/TestCluster/wm/ard
(top)/clusters/TestCluster/wm/default
as you can see once the
+(top)/clusters/TestCluster/wb25/conf/locking/lockingEnabled
is added
all the rest is removed.
It's really weird.

The problem in WebSphere for Environment -> Naming -> Namespace Bindings
is the following:
If you set some JNDI nodes with the naming:
url/someVariable
or generically
something/someVar
and than you use the same "something" for some other object like:
URL
or
JDBC
or
JMS
The Name space binding put "something" in read-only mode and when WebSphere try to configure other resources will fail.
You cannot spot this during configuration because only at the first reboot of the Application Server you will get this.
So be carefull when chose names inside jndi.

Related

From Websphere 6.1.35 to Websphere 8.5.5.17 - application startup impacted by filesystem scan

This is an old application and we have trouble to have the application changed.
During the deploy of a CRM like application, migrated from a 6.1.35 environment to a 8.5.5.17 websphere application server environment, the startup time of the application changed from 10 seconds to 12 minutes.
We made sono troubleshooting and we found that the problem is a remote filesystem which has 1.200.000 files. This remote filesystem is "mounted" in a path that is part of the WAR cell. This is done after the deploy of the application.
What make the application startup so slow is that on 8.5.5.17, all the files present in the path of the application are traversed (thus it tries to traverse the 1.200.000 file in the remote filesystem, which takes, as you may guess, 12 minutes...).
Anybody knows if this changed behaviour from WAS 6.1.x to WAS 8.5.5.x is intended?
Is there any workaround to block this?
WebSphere Application Server creates a list of files in the application when starting the application. It's a bit overzealous when creating the list in that it includes files that it does not need to look at during application start. For large applications, the file list can consume a lot of memory and can take a long time to generate. Since it is a Java EE application server, it should only be concerned with files in Java-EE-defined locations when starting the application. The list is not used during application run time. Therefore, the application server should only look in the directories:
/
META-INF/*
WEB-INF
WEB-INF/classes/*
WEB-INF/lib/*
APAR PH09294, included in 8.5.5.16 and 9.5.0.1, provides a way for you to limit the file list to the above locations. You can specify a setting either in the application or in the application server. (If you are using a version prior to 8.5.5.16 or 9.5.0.1, you should look at PM37942, which is a bit more cumbersome but still works.)
To enable the setting in the application, add the following to the MANIFEST.MF of either the EAR or the WAR. (Remember when editing MANIFEST.MF, obey the formatting rules. MANIFEST.MF must end with a blank line.) Adding the setting to a WAR limits the file list for just that WAR. Adding the setting to an EAR limits the file list for all WARs in that EAR.
IBM-Enable-File-List-Include-Filter: true
You can apply the setting to the server by setting a JVM custom property.
The following JVM custom property applies the setting to all applications on the server:
Property: org.eclipse.jst.j2ee.commonarchivecore.EnableFilesListIncludeFilter
Value: true
You can also apply the setting to all servers in a profile by adding the following line to the <WAS_PROFILE_HOME>/properties/amm.filter.properties file:
IBM-Enable-File-List-Include-Filter = true
Finally, to apply the setting to all profiles, add the above line to the <WAS_HOME>/properties/amm.filter.properties
Where should you set it? If you set it in the application, then wherever you deploy the application, the file list will be limited in scope. You do not depend on any setting in the application server. So for any large application, a developer should always include the setting in the application. An administrator might consider applying the setting to the entire WebSphere Application Server installation.

existdb: identify database server

We have a number of (developer) existDb database servers, and some staging/production servers.
Each have their own configuration, that are slightly different.
We need to select which configuration to load and use in queries.
The configuration is to be stored in an XML file within the repository.
However, when syncing the content of the servers, a single burnt-in XML file is not sufficient, since it is overwritten during copying from the other server.
For this, we need the physical name of the actual database server.
The only function found, request:get-server-name that is not quite stable since a single eXist server can be accessed through a number of various (localhost, intranet or external) URLs. However, that leads to unnecessary duplication of the configuration, one for each external URL...
(Accessing some local files in the file system is not secure and not fast.)
How to get the physical name of the existDb server from XQuery?
I m sorry but I don't fully understand your question, are you talking about exist's default conf.xml or your own configuration file that you need to store in a VCS repo? Should the xquery be executed on one instance and trigger an event in all others, or just some, or...? Without some code it is difficult to see why and when something gets overwritten.
you could try console:jmx-token which does not vary depending on URL (at least it shouldn't)
Also you might find it much easier to use a docker based approach. Either with multiple instances coordinated via docker-compose or to keep the individual configs from not interfering with each other when moving from dev to staging to production https://github.com/duncdrum/exist-docker
If I understand correctly, you basically want to be able to get the hostname or the IP address of a server from XQuery. If the functions in the XQuery Request module are not doing as you wish, then another option would be to set a Java System Property when starting eXist-db. This system property could be the internal DNS name or IP of your server, for example: -Dour-server-name=server1.mydomain.com
From XQuery you could then read that Java System property using util:system-property("our-server-name").

Is it possible to copy/export WebSphere Application Server Cell configuration from one environment to another environment?

Remember this is not Standalone Environment.
In one physical server I have set up a Cell with one Deployment Manager, one Node, one application server and configured them. Now I need to create 12 more similar cell with same configuration in different physical servers. So is it possible to copy/export configuration from one environment to another ?
Creating the Cell is not a problem for me, I want to skip the step of configuring again and again.
Start by looking at this IBM KnowledgeCenter topic on properties-based configuration and administration. It has a number of links to other topics with additional information. The property file based configuration allows you to extract a text file of properties from an existing WebSphere Application Server configuration, perform some processing on the text file (like changing hostnames, ports, etc) using your favorite tools and then apply that configuration to another cell, node, or server.

Use IBM IIB mqsichangeproperties to change SOAPRequest WebService URL

Can I use IBM IIB mqsichangeproperties to change SOAPRequest WebService URL. This will help in avoiding a redeployment when the URLs change slightly without any change to the XSDs. Also helps when migrating from test to production
I think not, normally the command can affect SOAPInput SOAPReply nodes and to modify in SOAPRequest I would use mqsiapplybaroverride, verifying exactly as it is called in the URL bar with mqsireadbar. The downside is you have to redeploy.
mqsichangeproperties would help you change the hostname of IntegrationNode. The hostname will change for different environments from test to PROD as you will have different Integration Nodes for each of em.What you will change is the suffix like in the URI
http://hostname:7080/ProductDetails_v3
Which you could do by overriding it using a properties file with mqsiapplybaroverride or you can fetch the suffix from a DB store it in some variable & provide it in LocalEnvironment before making the request.
Please refer the link for LocalEnvironment Overrides for SOAPRequest Nodes
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac56192_.htm

Websphere Message broker multi-instance message flow

I am looking for a command to change the message broker message flow instance in the run time. I know it is quite easy with MB explorer. But I am more interested towards the server side mqsi command. Ours is a AIX env with message broker 8 installed.
The number of instances a message flow has on the execution group is configured in the BAR file, before deployment.
If you want to change the number of additional instances you will need to redeploy your flow.
You can use the mqsiapplybaroverride command to change the configuration of the flow in the BAR file, and the mqsideploy command to redeploy the BAR.
As of IIB v9 you can control the number of instances dynamically at runtime by assigning a workload management policy.
See the description here:
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bn34262_.htm
Once you have assigned a policy you can change it using the mqsichangepolicy command specifying an xml policy document that has a different number of instances.
Alternatively you can use the web ui to change it directly on the running broker.

Resources