[JBoss Messaging] - Re: JMS Example?
by HibsMax
Thanks, Tim.
I agree it's straightforward and common but I don't seem to be able to get it to work for some reason. When I have my servlets, destinations and MDB deployed in the same cluster and use:
InitialContext ctx = new InitialContext();
I can access my destinations just fine.
(note: all the examples in the JBoss Messaging 1.3 doc use the same method of creating an InitialContext as shown above, none specify a URL belonging to a remote machine).
When I move the servlet to cluster1 and the destinations / MDB to cluster2, it stops working. I tried creating the InitialContext with a PROVIDER_URL that pointed Cluster2 i.e.
Properties h = new Properties();
h.put( Context.PROVIDER_URL, "jnp://cluster2:1099" );
InitialContext ctx = new InitialContext(h);
but this didn't work.
The application works if everything is deployed to a single JBoss server or to a single JBoss cluster but I can't get cluster to cluster working. That's the example I am looking for.
Peace, Anders
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067389#4067389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067389
18Â years, 9Â months
[JBoss Messaging] - Re: Messaging bridge question
by chip_schoch
This is my original jms-ds.xml.
<?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
|
| <!-- ==================================================================== -->
| <!-- JMS Stuff -->
| <!-- ==================================================================== -->
|
| <!-- The JMS provider loader -->
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=JMSProvider">
| <attribute name="ProviderName">DefaultJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">
| org.jboss.jms.jndi.JNDIProviderAdapter
| </attribute>
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- Uncomment to use HAJNDI to access JMS
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=localhost:1100
| </attribute>
| -->
| </mbean>
|
| <!-- The server session pool for Message Driven Beans -->
| <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
| name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
| <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
| <attribute name="PoolName">StdJMSPool</attribute>
| <attribute name="PoolFactoryClass">
| org.jboss.jms.asf.StdServerSessionPoolFactory
| </attribute>
| </mbean>
|
| <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
| <tx-connection-factory>
| <jndi-name>JmsXA</jndi-name>
| <xa-transaction/>
| <rar-name>jms-ra.rar</rar-name>
| <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
| <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
| <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
| <max-pool-size>20</max-pool-size>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
| </connection-factories>
I added this one for specifying my remote server.
<?xml version="1.0" encoding="UTF-8"?>
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- JMS Stuff -->
| <!-- ==================================================================== -->
|
| <!-- The JMS provider loader -->
| <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider">
|
| <attribute name="ProviderName">ConversionJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
|
| <!-- The combined connection factory -->
| <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The queue connection factory -->
| <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- The topic factory -->
| <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
| <!-- Uncomment to use HAJNDI to access JMS -->
|
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=192.168.1.75:1099
| </attribute>
| </mbean>
|
| </server>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067384#4067384
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067384
18Â years, 9Â months
[JBoss jBPM] - Re: Concurrent Processing in JBPM
by estaub
This is a short question with a really LOOONG answer - several pages long.
The answer depends on the database you're using, what transaction isolation you've specified, and, most importantly, the specific concurrency scenario you're thinking of.
To see what I mean about the scenario, consider the case you presented. The only record modified was the token. Under what conditions would another transaction be concurrently modifying the same token? Very few - the only one I can think of is some sort of intervention, like someone killing the process. I'm not sure, but I think I remember seeing specific code to deal with this concurrency scenario in JBPM.
So there's no general answer - only specific ones, which have to be considered in the context of the database and configuration.
There are some specific areas that are believed to be buggy (at least in some db/transaction/container configurations), dealing with:
- race conditions at join nodes
- race conditions at return from a subprocess
- race conditions with asynchronous agents trying to interact with a process instance soon after start - typically an MDB trying to interact with the process.
I believe these are being worked on.
-Ed Staub
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067383#4067383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067383
18Â years, 9Â months
[JBoss Portal] - Memory Leak
by brownfielda
I've noticed a slight memory leak when coding a portlet using hibernate. Every time I redeploy my portlet about 2Mb more memory is being used by the JVM.
I was using the ContactPortlet from portletswap as a reference, and found that this also had a memory leak of a smaller size (about .5Mb per deploy).
I did try some non-hibernate portlets and didn't notice any leaks. I will also try the same set-up on my linux box when I get home to see if I can eliminate Apple's JVM as a problem causer.
Due to the nature of memory leaks, I'm having difficulty pinpointing what is causing the problem and seeing if anyone has heard of such problems or can recommend some ideas for testing (new to J2EE, so perhaps I'm forgetting some critical method call upon destruction).
JBoss 2.6 bundled
Hibernate 3.2.4.sp1
OS X 10.4.10
--Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067382#4067382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067382
18Â years, 9Â months
[JBoss Seam] - Re: How bad is unused conversations?
by denis-karpov
Yes it is very important question.
now we have:
begin - marks current not long running conversation to be long running.
end - marks current long running conversation to be not long running.
join - join existing conversation (now it fails if there is no long running conversation, as I remember. Gavin promised to fix it ;-)
nest - begins nested conversation
none - leave the current long running conversation
But what if I want to start a new conversation no matter where I am now? Either I am in long running conversation or in not long running.
Like in this situation with menu bar. When I click menu item I want to start clean new long running conversation. In more strict words, to leave current conversation, to start new one (before render) and to mark a new one as long running.
(I am not sure is it possible now to leave one and start another new conversation inside one request?)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067379#4067379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067379
18Â years, 9Â months