Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002468 [Resin] minor always 02-28-08 06:53 03-03-08 12:31
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.6 Product Version 3.1.5
  Product Build
Summary 0002468: EJB/JPA EntityManager with commit
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.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0002804)
ferg
03-03-08 12:31

jpa/2130
 

- Issue History
Date Modified Username Field Change
02-28-08 06:53 ferg New Issue
03-03-08 12:31 ferg Note Added: 0002804
03-03-08 12:31 ferg Assigned To  => ferg
03-03-08 12:31 ferg Status new => closed
03-03-08 12:31 ferg Resolution open => fixed
03-03-08 12:31 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