Re: Error when using EJB / persistence

2008-06-30 Thread Mohammed Imran
Hi you are missing the Temporal annotation, i.e.

@Temporal(value = TemporalType.TIMESTAMP)
@Column(name=TIME_STAMP)
   public java.sql.Date getTimeStamp() { return timeStamp; }

Regards,

Imran


2008/6/27 purdticker [EMAIL PROTECTED]:


 Looks like that was the problem after all... conversion issues.  For some
 reason this date column is actually a varchar.

 No more help on this thread required :)

 --
 View this message in context:
 http://www.nabble.com/Error-when-using-EJB---persistence-tp18161971s134p18164045.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.




Messages are not being redelivered (JMS)

2008-06-25 Thread Mohammed Imran
I am experiencing problems with redelivery of messages in activemq/geronimo
it seems to not redeliver the message when a system exception occurs. I know
that ActiveMQ has a max redelivery count, however the messages seem to stop
being processed after 1-2 attempts. I am not getting anywhere near the max
redelivery count. user@geronimo.apache.org

I enclose a very simple example. This ear simple has 1 MDB which will
automatically throw an EJBException. (In the source code I have configured
it to use ActiveMQ default queues and connection factory this was only done
so you can quickly see what happens without setting up your own queue and
connection factory. I also enclose a runnable class which will send a
message to the queue.)

The expected result should be MDB retires 5/10/xxx amount of times whatever
the max redelivery count is set to and then stops redelivering the message.
However as I have said earlier on I am not getting this, seems to only retry
once.

package test;

import javax.ejb.*;
import javax.jms.MessageListener;
import javax.jms.Message;

@MessageDriven(activationConfig = { @ActivationConfigProperty( propertyName
= destinationType, propertyValue = javax.jms.Queue),
@ActivationConfigProperty( propertyName = destination, propertyValue =
TestMDBBean.QUEUE_NAME) ,@ActivationConfigProperty( propertyName =
acknowledgeMode, propertyValue = Auto-acknowledge) })
//@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class TestMDBBean implements MessageListener {
public static final String QUEUE_NAME = SendReceiveQueue;//ErrorQueue;;
public void onMessage(Message message) { System.err.println(This is a
test); throw new EJBException(This is a lovely test); }
}

open-ejbjar.xml

?xml version=1.0 encoding=UTF-8?
openejb-jar
xmlns=http://www.openejb.org/xml/ns/openejb-jar-2.1;
xmlns:naming=http://geronimo.apache.org/xml/ns/naming-1.1;
xmlns:security=http://geronimo.apache.org/xml/ns/security-1.1;
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.1;
xmlns:pkgen=http://www.openejb.org/xml/ns/pkgen-2.0;
enterprise-beans
message-driven
ejb-nameTestMDBBean/ejb-name
resource-adapter
!-resource-linkMyJMSResources/resource-link-
resource-linkActiveMQ RA/resource-link
/resource-adapter
/message-driven

/enterprise-beans
/openejb-jar

Geronimo application

?xml version=1.0 encoding=UTF-8?
application
xmlns=http://geronimo.apache.org/xml/ns/j2ee/application-1.2;
xmlns:security=http://geronimo.apache.org/xml/ns/security-1.2;
xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.2;
application-name=My

sys:environment
sys:moduleId
sys:groupIdtester/sys:groupId
sys:artifactIdmdb/sys:artifactId
sys:version1/sys:version
sys:typecar/sys:type
/sys:moduleId
sys:dependencies

!--
sys:dependency
sys:groupIdMy.jms/sys:groupId
sys:artifactIdMyJMSResources/sys:artifactId
sys:version1.0/sys:version
sys:typerar/sys:type
/sys:dependency
--

sys:dependency
sys:groupIdorg.apache.geronimo.configs/sys:groupId
sys:artifactIdactivemq-ra/sys:artifactId
sys:version2.1.1/sys:version
sys:typecar/sys:type
/sys:dependency

/sys:dependencies

sys:hidden-classes/
sys:non-overridable-classes/
/sys:environment

/application