The documentation refers to configuring information with stanzas, but what is a stanza?
Is it just a fancy name for a sub-section of configuration?
You are correct, in this context a stanza refers to a sub-section of a IBM MQ configuration file.
For example MQ clients come by default with a config file called mqclient.ini, in this file you may see something like the following:
TCP:
ClntSndBuffSize=0
In this example the stanza is TCP and it has a single attribute ClntSndBuffSize set to the value 0.
Related
I'm checking one project code; in spring.xml I see that 'amq:broker' is configured for input and output. Along with this configuration, ActiveMQConnectionFactory>PooledConnectionFactory>JmsConfiguration>ActiveMQComponent are also configured.
I need to know what is 'broker' element and why it is required and how it is different from 'brokerURL' of ActiveMQConnectionFactory.
'Broker' section of http://activemq.apache.org/ is little confusing :)
The broker declaration is needed if you want to run ActiveMQ embedded in your VM. You can use the connection factory as well to set up an embedded broker if you use the vm-transport, albeit this offers limited configuration options for the broker.
The connection factory you need to, well, create new connections to a broker. Independent of whether it is embedded or runs externally. For that the factory needs to know where to connect to and what transport to use.
Does anyone know how to put/load configuration files required for a target in Apache ACE other than configurator? I am using apache configurator to pick .cfg files from conf directry but i always get the error:
*ERROR* Unexpected problem providing configuration xxxxx to service [xxx, id=xx, bundle=xx/osgi-dp:xxx]
Does anyone knows how to fix this?
The configurator bundle was designed to provide configuration via "cfg" files to the ACE server, relay and client. It was not designed for provisioning configuration data to a target. From your question, it looks like you are trying to do that, so...
For doing that, ACE supports the Auto Configuration Service as described in chapter 115 of the Compendium. In short, that specification uses configuration files in an XML format. These files, along with the resource processor, then get provisioned with the end result that the configuration data is sent to the Configuration Admin service automatically. More documentation about that process, and using "template" configuration files (in case you need to configure many targets with only a few differences between them) is described here:
http://ace.apache.org/user-doc/user-guide.html#using-the-template-engine-for-targets
I need to setup a URL resource in WebSphere and is following this tutorial. However, the tutorial requires the modification of WebSphere's web.xml and ibm-web-bnd.xml using WebSphere Studio. I don't have a WebSphere Studio so I need to modify those files manually using a text editor. I tried to "search" for the 2 files but the "search results" are so many that I don't know which one is the right file.
Where can I find the 2 files? Also what value do I need to set for the resource-ref's id? I notice that WebSphere Studio doesn't have any text field for setting the resource-ref's but it has a value on its code view.
Thank you!
web.xml is a standard JavaEE file and its structure is well-documented in the Servlet specification. In web.xml, you declare the URL as it is known within your local JNDI namespace (java:comp/env).
web.xml should be located inside WEB-INF, underneath your WAR project structure. If you are using an IDE (such as Eclipse) to create Web projects, this file should already be created for you (unless you use Servlet Specification 2.5 and up - Servlet Specification 2.5 is included with JavaEE 5.0 - where deployment descriptors are optional).
ibm-web-bnd.xml is a WebSphere-specific file. It contains the binding of declared artifacts (such as a URL definition) into a real artifacts. You should refer to IBM's documentation in order to figure out the format of that file.
The ibm-web-bnd.xml file should be located in the same directory as web.xml.
The id attribute of resource-ref can be set to any value you like, as long as it is cross-referenced by a matching id attribute inside ibm-web-bnd.xml. That's how WebSphere can correlate definitions in ibm-web-bnd.xml to definitions in web.xml. The random string you see in the tutorial are created by RAD or WSAD; you can place any identifier there.
EDIT (added instructions)
In a nutshell, the process is this:
In web.xml, you define the local JNDI name. That would be the name by which your Java code is referring to the URL. For example, myWebsiteUrl. Your code will have to perform a JNDI lookup on java:comp/env/myWebsiteUrl. The definition is along these lines:
<resource-env-ref>
<resource-env-ref-name>myWebsiteUrl</resource-env-ref-name>
<resource-env-ref-type>java.net.URL</resource-env-ref-type>
</resource-env-ref>
In WebSphere itself, add a URL definition. The key there is the JNDI name in WebSphere's JNDI tree by which the URL will be known. You can set any value there, although it is recommended (by convention) that you prefix it with url/. For example: url/test.
In ibm-web-bnd.xml, you need to bind myWebsiteUrl (looked-up by your application) to url/test (which is the JNDI name by which WebSphere knows the URL). The definition will be along the lines of:
<resource-env-ref name="myWebsiteUrl" binding-name="url/test"/>
Step 3 is not required. If ibm-web-bnd.xml doesn't exist at deployment time, then the GUI-based deployment flow (used when you deploy applications through the WAS administration console) will prompt you for the binding values. (If you are deploying using scripting, you can still omit the ibm-web-bnd.xml file as long as you specify the bindings in a different way, but that's beyond the scope of this answer. Read the IBM documentation about strategy files and AdminApp.installApplication)
Note: as long as you use JavaEE 5.0 and up, you don't need the id attribute in the definitions. The article you're reading, by the way, is extremely outdated.
I am using mule esb to transfer file from ftp to local directory. I am not using the standard FTP connector but the extended one.
I am getting an error:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://localhost/schemaftpext/mule-ftpext.xsd'.
Actually I am new to Mule ESB, so i do not what is the url "http://localhost/schemaftpext/mule-ftpext.xsd" says that. I need to put anything in localhost?
FYI: I am using the example "http://code.google.com/p/mule-ftpext/source/browse/trunk/Test/mule-config.xml?spec=svn23&r=23". What should i do for that localhost URL?
http://localhost/schemaftpext/mule-ftpext.xsd is just a schema URI location: there is no need to have anything available there, it is just used as an identifier. Mule's configuration loader will resolve this URI to an actual location at load-up time. The actual location is within ftpExt-1.0-SNAPSHOT.jar.
Now this implies that you need to have is the ftpExt-1.0-SNAPSHOT.jar available in Mule's classpath. Is that the case?
I'm currently developing a small EJB 3 application for WebSphere AS 7 with WebSphere-MQSeries. It's a very simple app that mainly consists of one MDB listening on a queue, convert the incoming messages and write the extracted data into a db. I've finally got up it and running, but I'm a bit confused regarding ActivationConfig annotations in the code, the ibm-ejb-jar-bnd.xml and the activation spec in WAS itself. My main question is, why do I need ALL of them? Why should/could I specify things like the queue name or destinaton type via annotation (#ActivationConfigProperty) when I still need a activation spec in WAS where I also specify the destination e.g. Queue-Name? I addition I also need a binding via an xml file? Is that right? Is it also possible to specify the activationspec-name via annotation and thus get rid of the xml binding file? Can I avoid creating the activation spec in WAS?
Hope someone can clarify things, thanks.
You cannot avoid the Activation Spec entity because it is responsible to open connection to your JMS provider, query messages according to various options like the message selector filter.
According to WebSphere 7 InfoCenter EJB-3 annotations can replace activation specification properties from binding file but the properties required by WebSphere are not standard.
So as far as I know, you have to provide:
either the binding file, written manually or edited with the deployer tool
either at deployment setting properties in the administrative console or in automated jython/wsadmin script
Be aware that the Activation Spec is a runtime component that can be stopped, typically after some rollbacks on messages. In that case, it no longer consumes message and your MDB has nothing to process until you re-activate it from the WebSphere console.