[JNDI/Naming/Network] - Connection Refused looking up jmx/rmi/RMIAdaptor on JBoss_4_
by harleybl
I am having trouble looking up the jmx/rmi/RMIAdaptor within JBoss 4.2.0 GA GA. I looked all over site and did not find an answer. This did work with JBoss 4.0.3SP1 and the same configuration which makes me scratch my head.
I have the following policy file and -Djava.security.policy variable pointing to this file in my run.bat script.
grant {
| permission java.security.AllPermission;
| permission java.util.PropertyPermission "*", "read,write";
| permission java.net.SocketPermission "*", "connect,accept,resolve,listen";
| };
This following simple example from the Wiki fails with the exception to follow:
public static void main( String args[] )
| throws Exception
| {
| MBeanServerConnection server;
| Properties prop = new Properties();
| prop.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| String serverHost = InetAddress.getLocalHost().getHostName();
| prop.put(Context.PROVIDER_URL, serverHost);
| InitialContext initialContext = new InitialContext( prop );
|
| server = ( MBeanServerConnection ) initialContext.lookup( "jmx/rmi/RMIAdaptor" );
| ObjectName on = new ObjectName( "jboss.system:type=Server" );
| Object ver = server.getAttribute( on, "Version" );
| System.out.println( "Version " + ver );
| }
|
Here is the exception of Connection Refused...
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: ST-BLUMENXP and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server ST-BLUMENXP:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server ST-BLUMENXP:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at PrintVersion.main(PrintVersion.java:29)
| Caused by: javax.naming.CommunicationException: Failed to connect to server ST-BLUMENXP:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server ST-BLUMENXP:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| ... 4 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server ST-BLUMENXP:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
| ... 5 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at java.net.Socket.connect(Socket.java:469)
| at java.net.Socket.<init>(Socket.java:366)
| at java.net.Socket.<init>(Socket.java:266)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
| ... 5 more
|
I took out the jboss code and stepped through in the debugger and it is failing to connect to the socket, almost like it's not listening. However I can telnet to 1099 on my local machine and get a connection, so that is why I am confused about the Connection refused exception.
At first I thought it was a security problem but it's not even getting that far.
Any help would be most appriciated.
Thanks,
Harley
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056936#4056936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056936
18Â years, 10Â months
[JBossWS] - Re: MTOM + WS Security = problem
by davideling
Ehm... sorry my last reply was only a code snippet...
Service implementation
| @WebService(endpointInterface="serviceJBossCipheredSigned.ServiceJBossCipheredSigned",
| portName="ServiceJBossCipheredSignedSOAP",
| serviceName="ServiceJBossCipheredSigned"
| )
| @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING)
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| public class ServiceJBossCipheredSignedImpl implements
| ServiceJBossCipheredSigned {
| // bla bla ...
| }
|
Service configuration (jboss-wsse-service.xml):
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>WEB-INF/wsse.keystore</key-store-file>
| <key-store-password>jbossws</key-store-password>
| <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
| <trust-store-password>jbossws</trust-store-password>
| <config>
| <encrypt type="x509v3" alias="wsseClient"/>
| <sign type="x509v3" alias="wsseServer" />
| <requires>
| <signature />
| <encryption />
| <username />
| </requires>
| </config>
| </jboss-ws-security>
|
Client implementation:
| public void testInvocation() throws Exception {
|
| // 1) Service
| Service service = Service.create(
| new File("wsdl/mywsdl.wsdl").toURL(),
| new QName("http://serviceJBossCipheredSigned/",
| "ServiceJBossCipheredSigned")
| );
|
| // Configuration file WS-Security
| ((ServiceExt) service).setSecurityConfig(
| "META-INF/jboss-wsse-client.xml");
|
| // 2) Port Creation
| ServiceJBossCipheredSigned port = (ServiceJBossCipheredSigned)
| service.getPort(
| new QName("http://serviceJBossCipheredSigned/",
| "ServiceJBossCipheredSignedSOAP"),
| ServiceJBossCipheredSigned.class);
|
| // Enable MTOM
| SOAPBinding binding =
| (SOAPBinding) ((BindingProvider) port).getBinding();
| binding.setMTOMEnabled(true);
|
| // Enable WS-Security on port
| ((StubExt) port).setConfigName("Standard WSSecurity Client");
|
| // Set endpoint address
| Map<String, Object> reqContext =
| ((BindingProvider)port).getRequestContext();
| reqContext.put(
| BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
| "http://bla bla"
| );
|
| // Set username e password
| reqContext.put(Stub.USERNAME_PROPERTY, "myUsername");
| reqContext.put(Stub.PASSWORD_PROPERTY, "myPassword");
|
| ... bla bla and invocation
|
| );
|
Client configuration
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
|
| <key-store-file>META-INF/wsse.keystore</key-store-file>
| <key-store-password>jbossws</key-store-password>
| <trust-store-file>META-INF/wsse.truststore</trust-store-file>
| <trust-store-password>jbossws</trust-store-password>
|
| <config>
| <username/>
| <encrypt type="x509v3" alias="wsseServer"/>
| <sign type="x509v3" alias="wsseClient"/>
| <requires>
| <signature />
| <encryption />
| </requires>
| </config>
|
| </jboss-ws-security>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056935#4056935
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056935
18Â years, 10Â months
[JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
by anescu
"pete.muir(a)jboss.org" wrote : You've probably got the problem described here:
|
| http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ regard @NotNull, @Length etc.
Hi,
I have the same problem with an @Email annotated field.
The problem is that the field can allow null values (so no @NotNull, the field is nullable in the DB). It throws the same error as this thread describes. I looked into the EmailValidator and for a null/empty string it shoul be a valid email. And still I get the InvalidStateException...
public boolean isValid(Object value) {
| if ( value == null ) return true;
| if ( !( value instanceof String ) ) return false;
| String string = (String) value;
| if ( string.length() == 0 ) return true;
| Matcher m = pattern.matcher( string );
| return m.matches();
| }
I also have the same problem with a field marked with @Pattern. If the field is empty (and also is not required), when the page is saved I get to the debug page with a stacktrace and again the cause is InvalidStateException
I looked into the Pattern isValid method from SVN and it doesn't check if the field is of length 0 ( aka '' - empty string).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056931#4056931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056931
18Â years, 10Â months
[JBossWS] - Re: MTOM + WS Security = problem
by mr_d
Hello davideling,
Thanks for your reply,
My annotations on my service implementation are:
| @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING)
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
|
as suggested in http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#MTOM.2FXOP.
If I try your annotations (without @SOAPBinding) I have the same exception:
| javax.xml.ws.soap.SOAPFaultException: Endpoint {http://foo.org/mtom}ServiceImpl does not contain
| operation meta data for: {http://www.w3.org/2001/04/xmlenc#}EncryptedData
|
Now, the weird part: If I disable ws security on the client part, it works (even if on the server side I have @EndpointConfig(configName = "Standard WSSecurity Endpoint")). As I said on my first post, when I activate mtom and ws-security, it seems that only mtom works, so if my client send an encrypted soap message, the server will not know how to handle it and will throws the exception.
You said, you've got the attachment inlined. I don't know what a soap message looks like using mtom + ws security, but mtom is supposed to use multi parts isn't it? So, are you sure that ws security has not disable mtom?
Well, maybe I need to dig more information
:oD.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056930#4056930
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056930
18Â years, 10Â months
[JBossCache] - Getting following error while trying to use JBoss Cache with
by madhavsapreï¼ yahoo.com
Hi,
I'm trying to configure JBoss POJOCache to be used with JBoss AS. I have configured POJOCache MBean in the jboss-service.xml as follows
jboss:service=Naming
jboss:service=TransactionManager
REPEATABLE_READ
REPL_ASYNC
DefaultCluster
5000
10000
15000
org.jboss.cache.eviction.LRUPolicy
20
10000
0
I do not want to use CacheLoader as I want to have control over what goes into cache through our DAO layer. I get following exception when I
start JBoss
org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.c
ache.aop.POJOCache; - nested throwable: (java.lang.ClassNotFoundException: No Cl
assLoaders found for: org.jboss.cache.aop.POJOCache)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
:196)
at org.jboss.system.ServiceController.install(ServiceController.java:226
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jbos
s.cache.aop.POJOCache
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryCl
assLoader.java:511)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassL
oader.java:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:
1204)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:
286)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:
344)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
tor.java:449)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java
:171)
... 36 more
I'm new to JBoss Cache. Can someone advise if I can use JBoss Cache with JBoss AS without specifying CacheLoader? If so, how do I configure
POJOCache MBean in jboss-service.xml?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056929#4056929
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056929
18Â years, 10Â months
[Messaging, JMS & JBossMQ] - Is JMSProviderLoader backward compatible with JMS 1.0?
by stitcher
What can I see from the documentation, JMSProviderLoader has three parameters, among others:
# FactoryRef - the jndi binding of the javax.jms.ConnectionFactory within the jndi context (jboss4/jms1.1 only)
# QueueFactoryRef - the jndi binding of the javax.jms.QueueConnectionFactory within the jndi context
# TopicFactoryRef - the jndi binding of the javax.jms.TopicConnectionFactory within the jndi context
http://www.jboss.org/wiki/Wiki.jsp?page=ConfigJMSProvider
But in reality, it tries to use domain specific factories to create common sessions, which gives java.lang.AbstractMethodError, because jms 1.0 classes are kinda different from jms 1.1 classes. Shouldn't it be backward compatible?
I'm using JBoss 4.2.0 and my external JMS server is JMS 1.0 implementation. The vendor, SeeBeyond, doesn't have a library to connect to JBoss. Is there any way to integrate both without much of a hassle?
I've found another topic on the subject, but they are ended up using vendor's library.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=92925
Here's the stacktrace from what I've got so far:
| 15:01:25,622 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@ebc2a2(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)1ca3f82 destination=external/icandev/jndi-mytopic isTopic=true tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=false)
| 15:01:25,622 DEBUG [JmsActivation] Setting up org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@ebc2a2(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)1ca3f82 destination=external/icandev/jndi-mytopic isTopic=true tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=false)
| 15:01:25,622 DEBUG [JmsActivation] Retrieving the jms provider adapter java:/RemoteJMSProvider for org.jboss.resource.adapter.jms.inflow.JmsActivation@10cface(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec(a)ebc2a2 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@1262a85 active=false destination=Topic[etNotifier] pool=org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1eb18de transacted=true)
| 15:01:25,622 DEBUG [JmsActivation] Using jms provider adapter org.jboss.jms.jndi.JNDIProviderAdapter@2d2da4 for org.jboss.resource.adapter.jms.inflow.JmsActivation@10cface(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec(a)ebc2a2 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@1262a85 active=false destination=Topic[etNotifier] pool=org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1eb18de transacted=true)
| 15:01:25,637 DEBUG [JmsActivation] Using context {java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces} for org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@ebc2a2(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)1ca3f82 destination=external/icandev/jndi-mytopic isTopic=true tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=false)
| 15:01:25,637 DEBUG [JmsActivation] Setup DLQ org.jboss.resource.adapter.jms.inflow.JmsActivation@10cface(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec(a)ebc2a2 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@1262a85 active=false destination=Topic[etNotifier] pool=org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1eb18de transacted=true)
| 15:01:25,637 DEBUG [JmsActivation] Retrieving destination external/icandev/jndi-mytopic of type javax.jms.Topic
| 15:01:25,637 DEBUG [JmsActivation] Got destination Topic[etNotifier] from external/icandev/jndi-mytopic
| 15:01:25,637 DEBUG [JmsActivation] setup connection org.jboss.resource.adapter.jms.inflow.JmsActivation@10cface(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec(a)ebc2a2 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@1262a85 active=false destination=Topic[etNotifier] pool=org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1eb18de transacted=true)
| 15:01:25,637 DEBUG [JmsActivation] Attempting to lookup topic connection factory external/icandev/jms/connectionfactory/topic/lhDevEHIT_iqmDevEHIT
| 15:01:25,637 DEBUG [JmsActivation] Got topic connection factory STCConnectionFactory: icanqa.acme.org:19549 from external/icandev/jms/connectionfactory/topic/lhDevEHIT_iqmDevEHIT
| 15:01:25,637 DEBUG [JmsActivation] Attempting to create topic connection with user null
| 15:01:25,637 DEBUG [JmsActivation] Using topic connection com.stc.jms.client.STCTopicConnection@278a47
| 15:01:25,637 DEBUG [JmsActivation] established connection org.jboss.resource.adapter.jms.inflow.JmsActivation@10cface(spec=org.jboss.resource.adapter.jms.inflow.JmsActivationSpec(a)ebc2a2 mepf=org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory@1262a85 active=false destination=Topic[etNotifier] connection=com.stc.jms.client.STCTopicConnection@278a47 pool=org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1eb18de transacted=true)
| 15:01:25,653 DEBUG [JmsActivation] Created session pool org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1e74fe9
| 15:01:25,653 DEBUG [JmsActivation] Starting session pool org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool@1e74fe9
| 15:01:25,653 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@ebc2a2(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)1ca3f82 destination=external/icandev/jndi-mytopic isTopic=true tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=false)
| java.lang.AbstractMethodError: com.stc.jms.client.STCTopicConnection.createSession(ZI)Ljavax/jms/Session;
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.setup(JmsServerSession.java:115)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.setupSessions(JmsServerSessionPool.java:200)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSessionPool.start(JmsServerSessionPool.java:90)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupSessionPool(JmsActivation.java:536)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:309)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:249)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:589)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056924#4056924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056924
18Â years, 10Â months
[JBoss Messaging] - Re: Selector Help needed - Possible alternative suggestions
by anhminh_tran
Hi Tim,
Thanks for looking at my question.
Yes, we have multiple consumers that might have the same selectors and or different selectors.
The idea of using the producer and consumer model for us is this.
There will be many requests that will be made concurrently. These requests all go into a persisent queue for guaranteed delivery. These requests are for a "job" to be worked on. These jobs might be quick or long running jobs.
What we want is to have a variable number of consumers. Each consumer will sit on a different box, since each job is very CPU intensive. Each consumer will look for certain types of jobs and process them one-at-a-time.
We want to have multiple consumers to have the *same* selectors because we want to scale side-ways; just add more boxes to be able to process more messages (jobs).
We also want to have multiple consumers to have different selectors, since certain types of jobs are known to be much smaller than the other jobs. So we want to have dedicated consumers to work on these types of jobs. This is so that the long running jobs do not clog up all the consumers and queue up all the small jobs. In our use case, it's ok to have the long running jobs take their time to do the work.. but it's mandatory to get all the small jobs through as soon as possible.
The other caveat is that certain consumers should be able to config to look for small jobs first, then if there are no small jobs in the queue, grab a big job. When do, start looking for a small job again... and so on..
So, we have three types of consumers if you may. One dedicated to handling small jobs. One dedicated to handling big jobs. One looks for small jobs, if non are there, look for big jobs to work on.
We actually do have requirements to have multiple consumers of big jobs to work on same and different types of of jobs..
We have all of these implemented and working with one problem that we didn't expect. That is, the consumer that is applying a selector, seems to be holding hostage all the messages that fit it's selector even though he's only called receive() for one message.
What we need is for other consumers to be able to apply the same selector and be able to get the messages that the other consumer didn't call receive() on yet. That way, we can have many consumers work on many of the same types of jobs. We need this to scale the processing of these jobs.
My other thought is if there is a way to specify for the consumer applying the selector that he only wants 1 message to be returned that matches his criteria. He will work on his job and then go ask for 1 more of the same.
Thanks,
Minh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056923#4056923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056923
18Â years, 10Â months