-
1. Re: Volunteers for TreeCacheView
adrian.brock Dec 22, 2003 1:12 PM (in response to adrian.brock)>
> > Check /lib/, in my build jboss-cache ends up
> > there during build.
>
> I did an install on a virginmachine, getting JBoss
> from the CVS. Everything was okay, the
> jboss-cache.jar file was in output/lib and
> treecache-service.xml in output/etc. This is as it
> should be.
Sorry, I meant JBossBuild /lib, together with /bin etc.
> Copy jboss-cache.jar and treecache-service.xml to
> server//deploy. Once this is stable, I'll add it
> to (probably) the 'add' configuration.
>
>
> > I can redeploy it in
> > /server/default/deploy, but that isn't logical.
>
> Do it for now.
There's the confusion! Come to think of it: previous mentioned /lib isn't part of the UCL is it?
> > Eitherway putting in the files from
> > /cache/output/etc/ gives an error when put in
> > /server/default/deploy
>
> Yes sir, you'll need to add javagroups-all.jar to the
> deploy (or lib) directory. I was using the latest
> JavaGroups from CVS, I didn't try the one shipped
> with JBoss.
> Bela
That's the magic word! With the javagroups-2.0 in the JBoss dist tree-service.xml deploys, cache-service not.
I'll get the latest and greatest javagroups.
Thanks,
Sanne -
2. Re: JMS Resource Adapter - JTA Transaction
adrian.brock Dec 22, 2003 1:14 PM (in response to adrian.brock)Question:
I am sending/publishing to a queue/topic in an EJB but it does not commit/rollback
when the EJB/JTA Transaction commit/rollsback.
Answer:
Use the JMS resource adapter connection factory bound at java:/JmsXA -
3. Re: MDB Configuration
adrian.brock Dec 22, 2003 1:35 PM (in response to adrian.brock)Question:
How do I configure XXX for an MDB
Answer:
You will find details of configuration options in
docs/dtd/jboss_3_2.dtd (or whatever version you are using)
The default configuration is in
conf/standardjboss.xml
You can override the invoker-proxy-bindings and container-configurations in
your own META-INF/jboss.xml
NOTE: invoker-proxy-bindings apply only to 3.2.x+. In 3.0.x this configuration
was in the container-invoker-conf
Here are some examples from the testsuite:
http://cvs.sourceforge.net/viewcvs.py/jboss/jbosstest/src/resources/mdb/META-INF/ -
4. Re: FAQ - Read this second
adrian.brock Dec 22, 2003 1:41 PM (in response to adrian.brock)Question:
How do I get a singleton MDB
Answer:
From 3.2.4 you would use the following in jboss.xml<message-driven> <ejb-name>whatever</ejb-name> <configuration-name>Singleton Message Driven Bean</configuration-name> etc.
Before 3.2.4 you will have to add this configuration yourself:
http://cvs.sourceforge.net/viewcvs.py/jboss/jboss/src/etc/conf/default/standardjboss.xml?r1=1.47.2.15&r2=1.47.2.16 -
5. FAQ - Read this second
adrian.brock Jan 7, 2004 2:36 PM (in response to adrian.brock)Question:
I get the following message when using JMS and jdbc together
what is wrong?18:56:47,578 WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.
Answer:
Your jdbc datasource does not support two phase commit,
it does not support XA.
The following could occur during the commit:JMS: prepare (vote ok) JDBC: prepare (there is no prepare since it is not XA) JMS: commit (guaranteed to work since it was prepared ok) JDBC: commit (might fail)
This is bad, the JMS branch of the commit worked but the database commit failed.
NOTE: jboss-4.0.0DR3 has an implementation of the Last Resource Gambit
this reorders the local resource to make it compatible with XAJMS: prepare (vote ok) JDBC: commit -> fails, rollback JMS -> suceeds, commit JMS
This works with any number of XA resources, but only one local resource is allowed.
Help me test it and it will be backported to jboss-3.2.x
Regards,
Adrian -
6. Re: FAQ - Read this second
adrian.brock Jan 13, 2004 9:42 AM (in response to adrian.brock)Question:
How do I configure an MDB to talk to remote queue.
Answer:
You need to configure a remote provider (this is similar to local one in jms-ds.xml)
Note:
1) The name changes with "Whatever" to avoid conflicts with default
2) The ProviderUrl used for jndi
3) Use external Queue/Topic ConnectionFactory<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteMQProvider,server=Whatever"> <attribute name="ProviderName">WhateverJMSProvider</attribute> <attribute name="ProviderUrl">jnp://whatever:1099</attribute> <attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JBossMQProvider </attribute> <attribute name="QueueFactoryRef">UIL2XAConnectionFactory</attribute> <attribute name="TopicFactoryRef">UIL2XAConnectionFactory</attribute> </mbean>
Then provide your own invoker binding that uses this provider to deliver
messages to the mdb this is either in jboss.xml or standardjboss.xml:<invoker-proxy-binding> <name>whatever-message-driven-bean</name> <invoker-mbean>whatever</invoker-mbean> <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory> <proxy-factory-config> <JMSProviderAdapterJNDI>WhateverJMSProvider</JMSProviderAdapterJNDI> <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI> <MaximumSize>15</MaximumSize> <MaxMessages>1</MaxMessages> <MDBConfig> <ReconnectIntervalSec>10</ReconnectIntervalSec> <DLQConfig> <DestinationQueue>queue/DLQ</DestinationQueue> <MaxTimesRedelivered>10</MaxTimesRedelivered> <TimeToLive>0</TimeToLive> </DLQConfig> </MDBConfig> </proxy-factory-config> </invoker-proxy-binding>
Finally use the invoker proxy binder for your mdb in jboss.xml:<enterprise-beans> <message-driven> <ejb-name>MyMessageBean</ejb-name> <configuration-name>My Message Driven Bean</configuration-name> <destination-jndi-name>queue/myQueue</destination-jndi-name> <invoker-bindings> <invoker> <invoker-proxy-binding-name>whatever-message-driven-bean</invoker-proxy-binding-name> </invoker> </invoker-bindings> </message-driven>
Regards,
Adrian -
7. Re: FAQ - Read this second
adrian.brock Jan 13, 2004 9:56 AM (in response to adrian.brock)Question:
How do I access a remote jboss connection factory using a managed connection pool.
Answer:
First deploy the provider for the remote machine:<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteMQProvider,server=Whatever"> <attribute name="ProviderName">WhateverJMSProvider</attribute> <attribute name="ProviderUrl">jnp://whatever:1099</attribute> <attribute name="ProviderAdapterClass"> org.jboss.jms.jndi.JBossMQProvider </attribute> <attribute name="QueueFactoryRef">UIL2XAConnectionFactory</attribute> <attribute name="TopicFactoryRef">UIL2XAConnectionFactory</attribute> </mbean>
Second deploy the managed connection factory using this provider:
NOTE: The JMSProviderAdapterJNDI<connection-factories> <tx-connection-factory> <jndi-name>WhateverJmsXA</jndi-name> <xa-transaction/> <adapter-display-name>JMS Adapter</adapter-display-name> <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property> <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/WhateverJMSProvider</config-property> <security-domain-and-application>WhateverJmsXARealm</security-domain-and-application> </tx-connection-factory> </connection-factories>
Finally configure the user/password in conf/login-config.xml
NOTE: The name in the managed connection factory reference is the jndi name.<application-policy name = "WhateverJmsXARealm"> <authentication> <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required"> <module-option name = "principal">guest</module-option> <module-option name = "userName">guest</module-option> <module-option name = "password">guest</module-option> <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=WhateverJmsXA</module-option> </login-module> </authentication> </application-policy>
Regards,
Adrian -
8. Re: FAQ - Read this second
adrian.brock Feb 3, 2004 11:22 AM (in response to adrian.brock)Question:
What is the correct way to make a durable subscription.
Answer:
You must set the client id and the subscription name
Programmatically, you can do it like this:topicConnection.setClientID("MyClientID"); topicSession.createDurableSubscriber(topic, "MySubscriptionName");
Or you can configure it in conf/jbossmq-state.xml<StateManager> <Users> <User> <Name>john</Name> <Password>needle</Password> <Id>MyClientID</Id> </User> </Users> <DurableSubscriptions> <DurableSubscription> <ClientID>MyClientID</ClientID> <Name>MySubscriptionName</Name> <Topic>MyTopic</Topic> </DurableSubscription> </DurableSubscriptions> </StateManager>
Regards,
Adrian -
9. 3855947
adrian.brock Feb 25, 2004 12:20 PM (in response to adrian.brock)Question:
What vendor specifc properties does JBoss provide?
Answer:
As of 3.2.2 JBoss provides properties for scheduled delivery and redelivery control.
See the following link for more information.
http://sourceforge.net/tracker/index.php?func=detail&aid=744455&group_id=22866&atid=381174 -
10. Re: FAQ - Read this second
adrian.brock Mar 6, 2004 7:57 PM (in response to adrian.brock)Question:
Is there is a stand-alone distribution of jbossmq
Answer:
No, but from 3.2.4 there is a script that creates a minimal jbossmq using
hypersonic for persistence.
To build this configuration (unix users changes as approriate)
cd %JBOSS_DIST%\docs\examples\jms\standalone
ant
cd %JBOSS_DIST%\bin
run.bat -c jbossmq
NOTE: hypersonic is NOT recommend for production
see docs/examples/jms for alternate db configurations
Since jboss-3.2.4 is not release yet, here are the two files that should be placed
in docs/examples/jms/standalone (it should also work with 3.2.3)
build.xml<?xml version="1.0" encoding="UTF-8"?> <!-- This is an Ant build script that creates a minimal jbossmq configuration based on the default configuration --> <project name="Mininal JBossMQ configuration script" default="config"> <!-- Override if the script is not run from within the dist/docs/examples/jms/standalone directory. --> <property name="jboss.dist" value="../../../.."/> <target name="config"> <!-- We are mainly based on the minimal configuration --> <copy todir="${jboss.dist}/server/jbossmq"> <fileset dir="${jboss.dist}/server/minimal"> <exclude name="conf/jboss-service.xml"/> <exclude name="lib/jboss-minimal.jar"/> </fileset> </copy> <!-- We need the following from the default configuration --> <copy todir="${jboss.dist}/server/jbossmq"> <fileset dir="${jboss.dist}/server/default"> <!-- configuration --> <include name="conf/jbossmq-state.xml"/> <include name="conf/login-config.xml"/> <include name="conf/xmdesc/*"/> <!-- the main jboss jar --> <include name="lib/jboss.jar"/> <!-- jaas --> <include name="lib/jboss-jaas.jar"/> <include name="lib/jbosssx.jar"/> <!-- transactions --> <include name="lib/jboss-transaction.jar"/> <include name="deploy/transaction-service.xml"/> <!-- jms interfaces --> <include name="lib/jboss-j2ee.jar"/> <!-- local db support --> <include name="lib/jboss-common-jdbc-wrapper.jar"/> <include name="lib/xalan.jar"/> <include name="deploy/jboss-jca.sar"/> <include name="deploy/jboss-local-jdbc.rar"/> <!-- hypersonic --> <include name="lib/hsqldb*"/> <include name="deploy/hsqldb-ds.xml"/> <include name="deploy/jms/hsqldb-jdbc2-service.xml"/> <!-- jbossmq --> <include name="lib/jbossmq.jar"/> <include name="deploy/jms/jbossmq-service.xml"/> <include name="deploy/jms/jbossmq-destinations-service.xml"/> <include name="deploy/jms/uil2-service.xml"/> </fileset> </copy> <!-- This is our main configuration --> <copy todir="${jboss.dist}/server/jbossmq/conf/"> <fileset dir="${jboss.dist}/docs/examples/jms/standalone"> <include name="jboss-service.xml"/> </fileset> </copy> </target> </project>
jboss-service.xml<?xml version="1.0" encoding="UTF-8"?> <!-- $Id: jboss-minimal.xml,v 1.4.2.3 2003/10/13 03:28:38 starksm Exp $ --> <!-- ===================================================================== --> <!-- --> <!-- A minimal JBoss Server Configuration --> <!-- --> <!-- ===================================================================== --> <server> <!-- Load all jars from the JBOSS_DIST/server/<config>/lib directory. This can be restricted to specific jars by specifying them in the archives attribute. --> <classpath codebase="lib" archives="*"/> <!-- ==================================================================== --> <!-- Log4j Initialization --> <!-- ==================================================================== --> <mbean code="org.jboss.logging.Log4jService" name="jboss.system:type=Log4jService,service=Logging"> <attribute name="ConfigurationURL">resource:log4j.xml</attribute> </mbean> <!-- ==================================================================== --> <!-- JNDI --> <!-- ==================================================================== --> <mbean code="org.jboss.naming.NamingService" name="jboss:service=Naming"> <!-- The listening port for the bootstrap JNP service. Set this to -1 to run the NamingService without the JNP invoker listening port. --> <attribute name="Port">1099</attribute> </mbean> <!-- ==================================================================== --> <!-- Security --> <!-- ==================================================================== --> <mbean code="org.jboss.security.plugins.SecurityConfig" name="jboss.security:service=SecurityConfig"> <attribute name="LoginConfig">jboss.security:service=XMLLoginConfig</attribute> </mbean> <mbean code="org.jboss.security.auth.login.XMLLoginConfig" name="jboss.security:service=XMLLoginConfig"> <attribute name="ConfigResource">login-config.xml</attribute> </mbean> <!-- JAAS security manager and realm mapping --> <mbean code="org.jboss.security.plugins.JaasSecurityManagerService" name="jboss.security:service=JaasSecurityManager"> <attribute name="SecurityManagerClassName"> org.jboss.security.plugins.JaasSecurityManager </attribute> </mbean> <!-- ==================================================================== --> <!-- Transactions --> <!-- ==================================================================== --> <!-- The configurable Xid factory. For use with Oracle, set pad to true --> <mbean code="org.jboss.tm.XidFactory" name="jboss:service=XidFactory"> <!--attribute name="Pad">true</attribute--> </mbean> <!-- | The fast in-memory transaction manager. --> <mbean code="org.jboss.tm.TransactionManagerService" name="jboss:service=TransactionManager" xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml"> <attribute name="TransactionTimeout">300</attribute> <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends> </mbean> <!-- ==================================================================== --> <!-- Deployment Scanning --> <!-- ==================================================================== --> <!-- An mbean for hot deployment/undeployment of archives. --> <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment:type=DeploymentScanner,flavor=URL"> <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends> <!-- The URLComparator can be used to specify a deployment ordering for deployments found in a scanned directory. The class specified must be an implementation of java.util.Comparator, it must be able to compare two URL objects, and it must have a no-arg constructor. Two deployment comparators are shipped with JBoss: - org.jboss.deployment.DeploymentSorter Sorts by file extension, as follows: "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip", "*" - org.jboss.deployment.scanner.PrefixDeploymentSorter If the name portion of the url begins with 1 or more digits, those digits are converted to an int (ignoring leading zeroes), and files are deployed in that order. Files that do not start with any digits will be deployed last, and they will be sorted by extension as above with DeploymentSorter. --> <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute> <!-- The Filter specifies a java.io.FileFilter for scanned directories. Any file not accepted by this filter will not be deployed. The org.jboss.deployment.scanner.DeploymentFilter rejects the following patterns: "#*", "%*", ",*", ".*", "_$*", "*#", "*$", "*%", "*.BAK", "*.old", "*.orig", "*.rej", "*.bak", "*,v", "*~", ".make.state", ".nse_depinfo", "CVS", "CVS.admin", "RCS", "RCSLOG", "SCCS", "TAGS", "core", "tags" --> <attribute name="Filter">org.jboss.deployment.scanner.DeploymentFilter</attribute> <attribute name="ScanPeriod">5000</attribute> <!-- URLs are comma seperated and unprefixed arguments are considered file URLs and resolve relative to server home(JBOSS_DIST/server/default) unless the given path is absolute. Any referenced directories cannot be unpackaged archives, use the parent directory of the unpacked archive. --> <attribute name="URLs"> deploy/ </attribute> </mbean> </server>
Regards,
Adrian -
11. Re: FAQ - Read this second
p0six Mar 8, 2004 2:09 PM (in response to adrian.brock)Question:
How do I configure JBoss to use Oracle Advanced queue as a JMS Provider.
Answer:
JBoss JMS provider for Oracle Advanced Queue Patch.
http://sourceforge.net/tracker/index.php?func=detail&aid=912173&group_id=22866&atid=376687 -
12. Re: FAQ - Read this second
adrian.brock Mar 30, 2004 5:16 PM (in response to adrian.brock)Question:
I get an error about JMS (XAConnectionFactory) not bound in jboss 3.2.1
Answer:
In conf/jboss-server.xml change the scanner to the following:<attribute name="RecursiveSearch">True</attribute>
Question:
I get the same message but I have RecursiveSearch of True?
But I do get an IncompleteDeploymentException
Answer:
You have broken your JMS configuration. Most likely the persistence manager
configuration.
Enable TRACE logging as described in the "READ THIS FIRST" and look for
error messages, most likely SQLExceptions from the database.
You can ignore DEBUG messages about " jms* table already exists" these are normal. -
13. Re: FAQ - Read this second
adrian.brock Mar 30, 2004 5:21 PM (in response to adrian.brock)Question:
I get a java.net exception when using JMS what is the problem.
Answer:
There is something wrong with your network configuration.
1) On linux check /etc/hosts doesn't have 127.0.0.1 mapped to your host name
2) check your ip address is reachable from the client, try pinging the server/client
from the other machine
3) Try telnet host port, e.g. is jndi visible - telnet serverip 1099 or UIL2 - telnet serverip 8093
4) Check your dns/dhcp setup, has your lease expired.
5) nslookup will help you get a host name from an ip address to check
reverse resolution - do the server and client agree about which host binds
to which ip address?
6) Try tracing the route to the server - traceroute serverip
7) Is there an firewall in the way?
8) Use netstat to see what ports are open and bound to where, e.g. netstat -an
9) Do you have multi nics (network interface cards), are you multi-homing?
Are the services bound to all of them?
10) Add the folllowing log4j.properties to the client which will produce a log
showing where the client thinks it is connecting tolog4j.rootCategory=INFO, Default log4j.appender.Default=org.apache.log4j.FileAppender log4j.appender.Default.File=jbossmq.log log4j.appender.Default.layout=org.apache.log4j.PatternLayout log4j.appender.Default.layout.ConversionPattern=%d %-5p [%c(1)] {%t} %m%n log4j.appender.Default.Append=false log4j.category.org.jboss.mq=TRACE#org.jboss.logging.XLevel
Running this code on the client or server will help you understand what java
thinks is your hostname/ip addressimport java.net.InetAddress; public class WhatIsMyAddress { public static void main(String[] args) throws Exception { System.out.println(InetAddress.getLocalHost()); } }
Are you accidently discovering the wrong server using jboss's HAJNDI.
Try adding the following to your jndi properties to disable discovery of a jboss
server on your network.
jnp.disableDiscovery=true -
14. Re: FAQ - Read this second
adrian.brock Apr 12, 2004 3:18 AM (in response to adrian.brock)Question:
I am sending messages with a ttl (time to live) on the message.
The message should not have expired yet, but my client is not receiving messages.
Answer:
The clocks are not in synch between the client and the server.
e.g. Your client thinks it is 10 O'clock but the server thinks it is 11 O'clock.
Sending a message with a ttl of less than one hour will mean the server expires
the message immediately.
Obviously, the reverse could be true and messages don't get expired when expected.