[JBoss Messaging] - Re: Missing messages after the failover of Jboss Node
by mayankmit2002
plz. find below my receiver code
| private void createJMSClient ()
| {
| final Properties props = new Properties();
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| props.put(Context.PROVIDER_URL, "NOICLT13274:1100,NOICLT22560:1100,NOICLT13407:1100");
| props.put("jnp.timeout", "1000");
| props.put("jnp.sotimeout", "1000");
| props.put("jnp.disablediscovery", "true");
| props.put("jnp.partitionName", "NOICLT22560_PARTITION");
|
| try
| {
| final Context context = new InitialContext(props);
| ConnectionFactory mTopicConnectionFactory = (ConnectionFactory) context.lookup("ClusteredConnectionFactory");
| System.out.println(mTopicConnectionFactory);
| Topic mTopic = (Topic) context.lookup("topic/CMSPublic");
|
| Connection mTopicConnection = mTopicConnectionFactory.createConnection();
| Session mTopicSession = mTopicConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
| // Create subscriber
| MessageConsumer mSubscriber = mTopicSession.createConsumer(mTopic);
| mSubscriber.setMessageListener(this);
| mTopicConnection.setExceptionListener(this);
|
| mTopicConnection.start();
| isConnected = true;
| }
| catch (final CommunicationException anException)
| {
| // anException.printStackTrace();
| System.err.println("Server is not avaliable!!! \n Trying to reconnect the server!! " + anException.getMessage());
| }
| catch (final NamingException anException)
| {
| // anException.printStackTrace();
| System.err.println("Server is not avaliable!!! \n Trying to reconnect the server!! " + anException.getMessage());
| }
|
| catch (final JMSException anException)
| {
| // anException.printStackTrace();
| System.err.println("Server is not avaliable!!! \n Trying to reconnect the server!! " + anException.getMessage());
| }
| catch (Exception finalException)
| {
| // finalException.printStackTrace();
| System.err.println("Exception while starting JMS event listener. You may not be able to receive event, please restart your application");
| }
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250896#4250896
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250896
16 years, 10 months
[JBoss Messaging] - Missing messages after the failover of Jboss Node
by mayankmit2002
Configuration:
Jboss 4.2.3 GA
Jboss Messaging 1.4.2-SP1
ClusteredConnectionFactory is loadbalanced and failover enabled
Clustered and FailoverOnNodeLeave is set to true in PostOffice Service
Setup:
2 Nodes
1 Sender ( invoking calls to session bean, resulting in JMS events to clustered topic)
1 Receiver (Listing to the clustered topic, with ClusteredConnectionFactory)
Scenario:
We are running a sender, which is placing the call to the session bean on every 500ms. This call results in three events every time.
We are also running the receiver which is continuously listing to those events from the topic.
Problem:
When i terminate one of my JBoss node in cluster, client pauses for few seconds and then resumes events from other node. But, some events are missed during this process.
plz. suggest
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250894#4250894
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250894
16 years, 10 months
[JBoss Web Services] - Re: ...Port does not contain operation meta data for: {http:
by ksinno
Hi,
JBoss processes the HandlerTypes in the following order for JAXWS:
POST
ENDPOINT
PRE
Since the POST handler needs to parse some information from the soap message to identify the ENDPOINT handler chain to call, you should do your decrypting at the level of the POST handler.
To do this, you can annotate your webservice class with @EndpointConfig and define your post handlers in the file standard-jaxws-endpoint-config.xml under META-INF
Alternatively, to stay independent from JBoss specific code (ie no dependency to JBoss), you do the below configuration at the level of the deployment descriptors, by modifying the file standard-jaxws-endpoint-config.xml under [JBOSS_HOME]\server\[type]\deployers\jbossws.deployer\META-INF (path differs for JBoss 4.3 ... but same file name) and adding your post-handler chain (example below).
<endpoint-config>
| <config-name>Murex Security Handlers</config-name>
| <post-handler-chains>
| <javaee:handler-chain>
| <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
| <javaee:handler>
| <javaee:handler-name>My Security Handler</javaee:handler-name>
| <javaee:handler-class>package.security.MySecurityClass</javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </post-handler-chains>
| </endpoint-config>
The Config-name you create should be referenced in your web.xml file inside your war file such as the following:
<context-param>
| <param-name>jbossws-config-name</param-name>
| <param-value>My Security Handler</param-value>
| </context-param>
Cheers.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250884#4250884
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250884
16 years, 10 months