[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-07-05 Thread jorgemoralespou_2
Where can I download this release?
We are experiencing similar issues, and want to try the fix.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060924#4060924

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060924
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-07-05 Thread timfox
The release should be out in a few days.


In the mean-time you could try the code from TRUNK but beware it's not stable.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4061054#4061054

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4061054
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-29 Thread jpansier
Thanks a lot Tim.

Joel

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059025#4059025

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059025
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-28 Thread timfox
I have verified with the exact test program posted before applying the fix and 
I can confirm that scheduled delivery did work as expect if the sending session 
was non transactional, but did not work if the sending session was 
transactional.

I have applied the fix, and can confirm it now works in both cases. I have also 
added test suite cases to cover this scenario.

Fix will be in the next release, 1.4.0.CR1, due out next week.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058940#4058940

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058940
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-25 Thread fbastos1
I try to send a jms message outside transaction, creating a session with 
transaction attribute = false and acknowlegement mode to AUTO_ACKNOWLEDGE but 
the result is identic 
Fab

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057285#4057285

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057285
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-25 Thread timfox
In any case, someone will invetsigate this shortly... bogged down on other 
things right now.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057319#4057319

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057319
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-25 Thread timfox
Are you sure? That is what our tests do.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057318#4057318

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057318
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-25 Thread fbastos1
yes,
the junit test in post by joel doesn't work with the transaction attribute = 
false and acknowledgement mode = Session.AUTO_ACKNOWLEDGE 
Fab

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057358#4057358

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057358
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-22 Thread fbastos1
Hi,
I have the same problem, I wonder if it's a bug ?
Fab


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4056798#4056798

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056798
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-22 Thread timfox
Looking at the code I can see an issue.

To verify, can you try sending your scheduled message *outside* a transaction.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4056800#4056800

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056800
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-22 Thread timfox
http://jira.jboss.com/jira/browse/JBMESSAGING-1001

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4056820#4056820

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056820
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-19 Thread timfox
Can you please post your code, or an example that fails?

In the mean time, please take a look at 
org.jboss.test.messaging.jms.ScheduledDeliveryTest to see scheduled delivery in 
action.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4055524#4055524

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055524
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-19 Thread jpansier
Indeed, I have look the unit test 
org.jboss.test.messaging.jms.ScheduledDeliveryTest.

my code : 

  | @Stateless
  | @Clustered(partition=MyPartition)
  | @RemoteBinding(jndiBinding=JMSManagerBean/remote)
  | @TransactionManagement(value=TransactionManagementType.BEAN)
  | public class JMSManagerBean implements JMSManager {
  | 
  |private static final long serialVersionUID = 1L;
  | 
  |private static Logger log = Logger.getLogger(JMSManagerBean.class);
  | 
  |private QueueConnectionFactory qcf;
  |private QueueConnection qc = null;
  |private QueueSession session = null;
  |private QueueSender qs = null;
  |private Queue queue;
  | 
  |private int connect() {
  | String nomFileOut = queue/myQueue;
  | 
  | HashtableString, String properties = new 
HashtableString,String();
  | properties.put(InitialContext.INITIAL_CONTEXT_FACTORY, 
org.jnp.interfaces.NamingContextFactory);
  | properties.put(InitialContext.PROVIDER_URL, 
localhost:+HAJNDI_PORT.intValue());
  | Context ictx = new InitialContext(properties);
  | 
  | qcf = (QueueConnectionFactory) 
ictx.lookup(ClusteredConnectionFactory);
  | log.debug(Queue Out Name :  + nomFileOut);
  | 
  | queue = (Queue) ictx.lookup(nomFileOut);
  | 
  | qc = qcf.createQueueConnection();   
  | session = qc.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
  | qs = session.createSender(queue);
  | 
  | return 0;
  | }
  | 
  | 
  | public int sendMessage() {
  | try {
  | connect();
  | TextMessage messageOut; 
  | messageOut = session.createTextMessage();
  | 
  | messageOut.setText(My message);
  | messageOut.setJMSType(String.class.getName());
  | try {
  | long dateSchedule = current.getDeliveryDate().getTime();
  | log.debug(*** dateSchedule :  + dateSchedule);
  | 
messageOut.setLongProperty(JBossMessage.JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, 
dateSchedule);
  | } catch (Exception e) {
  | log.error(Problem with Schedule Property ,e);
  | }
  | messageOut.setLongProperty(JMS_JBOSS_REDELIVERY_DELAY, 1);
  | messageOut.setIntProperty(JMS_JBOSS_REDELIVERY_LIMIT, 3);
  | 
  | qs.send(messageOut);
  | 
  | log.debug(SYSTEM.CURRENTTIMEMILLIS :  + 
System.currentTimeMillis());
  | session.commit();
  | 
  | } catch (Exception e) { 
  | log.error(getClass().getName()+ unable to send message on 
queue.,e);
  | retour = ErrorManager.CAN_NOT_SEND_MT;
  | } finally {
  | disconnect();
  | }
  | return 0;
  | }
  | 
  | 
  | private int disconnect() {
  | if (qs != null) {
  | try {
  | qs.close();
  | session.close();
  | qc.close();
  | queue = null;
  | qcf = null;
  | } catch (Exception e) {
  | log.error(,e);
  | logNetcool.error(KO);
  | }
  | }
  | return 0;
  | }
  | }
  | 
  | 
Also, I tried with the AUTO_ACKNOWLEDGE mode, but the result is the same.

Thanks,
joel

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4055530#4055530

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055530
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-19 Thread timfox
Please can you post a full runnable example showing messages being sent and 
consumed earlier than they should be.

Something we can copy and paste and run.

A JUnitTest would be ideal.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4055534#4055534

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055534
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Re: Scheduled messages not delayed

2007-06-19 Thread jpansier
When I send a jms schedule message (without consumer), it doesn't appear in 
jboss jmx-console scheduleMessageCount.
But if I restart jboss server, this message appear correctly in jboss 
jmx-console scheduleMessageCount and I don't consume this.

The junit test :


  | 
  | import java.util.Date;
  | import java.util.Hashtable;
  | 
  | import javax.jms.Queue;
  | import javax.jms.QueueConnection;
  | import javax.jms.QueueConnectionFactory;
  | import javax.jms.QueueSender;
  | import javax.jms.QueueSession;
  | import javax.jms.Session;
  | import javax.jms.TextMessage;
  | import javax.naming.Context;
  | import javax.naming.InitialContext;
  | 
  | import junit.framework.TestCase;
  | 
  | public class APITest extends TestCase {
  | 
  | private QueueConnectionFactory qcf;
  | private QueueConnection qc = null;
  | private QueueSession session = null;
  | private QueueSender qs = null;
  | private Queue queue;
  | 
  | 
  | public APITest() {
  | super(APITest);
  | }
  | 
  | 
  | protected void setUp() throws Exception {
  | super.setUp();
  | HashtableString, String properties = new HashtableString, 
String();
  | properties.put(InitialContext.INITIAL_CONTEXT_FACTORY, 
org.jnp.interfaces.NamingContextFactory);
  | properties.put(InitialContext.PROVIDER_URL, localhost:1100);
  | Context jndiContext = new InitialContext(properties);
  | qcf = (QueueConnectionFactory) 
jndiContext.lookup(ClusteredConnectionFactory);
  | 
  | 
  | queue = (Queue) jndiContext.lookup(queue/pcsapiMsgOutDefault);
  | 
  | qc = qcf.createQueueConnection();   
  | session = qc.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
  | qs = session.createSender(queue);
  | 
  | 
  | }
  | 
  | protected void tearDown() throws Exception {
  | 
  | super.tearDown();
  | if (qs != null) {
  | try {
  | qs.close();
  | session.close();
  | qc.close();
  | queue = null;
  | qcf = null;
  | } catch (Exception e) {
  | System.err.println(+e);
  | }
  | }
  | 
  | }
  | 
  |public void test() throws Exception
  |{
  |try {
  |TextMessage messageOut; 
  |messageOut = session.createTextMessage();
  |
  |messageOut.setText(My message);
  |messageOut.setJMSType(String.class.getName());
  |try {
  |long dateSchedule = (new Date()).getTime()+1000*3600*2;
  |messageOut.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY, 
dateSchedule);
  |} catch (Exception e) {
  |System.err.println(Problem with Schedule Property +e);
  |}
  |messageOut.setLongProperty(JMS_JBOSS_REDELIVERY_DELAY, 1);
  |messageOut.setIntProperty(JMS_JBOSS_REDELIVERY_LIMIT, 3);
  |
  |qs.send(messageOut);
  |
  |session.commit();
  |
  |} catch (Exception e) { 
  | System.err.println(getClass().getName()+ unable to send 
message on queue.+e);
  |} 
  |
  |}
  | 
  | }
  | 
  | 


Queue Configuration : 


  | mbean code=org.jboss.jms.server.destination.QueueService
  |   
name=jboss.messaging.destination:service=Queue,name=pcsapiMsgOutDefault
  |   xmbean-dd=xmdesc/Queue-xmbean.xml
  |   depends 
optional-attribute-name=ServerPeerjboss.messaging:service=ServerPeer/depends
  |   dependsjboss.messaging:service=PostOffice/depends
  |   attribute name=Clusteredtrue/attribute
  |/mbean   
  | 

The consumer is a mdb.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=408#408

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=408
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user