Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002482 [Resin] minor always 03-03-08 09:18 03-03-08 12:08
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.5
Summary 0002482: @PersistenceContext with EJB
Description (rep by Matt Johnson)

I've downloaded the latest 3.1.5 and tried again with that version. I am
still getting the same results. I have a quartz job that calls an EJB3.
That bean will persist an object to the database. It looks like the
transaction is committing, but my data never makes it to the database.

Here is the code for my bean:
@PersistenceContext(unitName="npguide")
    private EntityManager em;

@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    public void grab(String url, Date date) {
        log.info("starting grab");
        Report report = new Report();
        report.setDate(new Date());
        report.setSection("test section");
        report.setText("this is my test text");
        em.persist(report);
        log.info("report: " + report.getId()+" " + report);
    }

The Resin log files show this.

[06:55:52.307] {NPGuideJobsScheduler_Worker-1} Transaction[01:b903dcdb]
begin
 INFO (ReportGrabberBean.java:147) - starting grab
 INFO (ReportGrabberBean.java:153) - report: null
npguide.entity.Report@18c668c[date=Fri Feb 29 06:55:52 CST 2008]
[06:55:52.345] {NPGuideJobsScheduler_Worker-1} Transaction[01:b903dcdb]
committing

So it says the transaction is committing, but I don't see anything in
the database.


Additional Information
Attached Files

- Relationships

- Notes
(0002802)
ferg
03-03-08 12:08

jpa/213{0,1,2}

(Amber documentation is at http://caucho.com/resin/doc/amber.xtp) [^]
 

- Issue History
Date Modified Username Field Change
03-03-08 09:18 ferg New Issue
03-03-08 12:08 ferg Note Added: 0002802
03-03-08 12:08 ferg Assigned To  => ferg
03-03-08 12:08 ferg Status new => closed
03-03-08 12:08 ferg Resolution open => fixed
03-03-08 12:08 ferg Fixed in Version  => 3.1.6


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker