users@glassfish.java.net

RE: Time(r) for trouble

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 25 May 2010 09:01:15 -0400

which database are you connecting to?
what is the connection string you are using to connect to the db?

what are the permissions assigned for the user used in the connection?

 

do you want your DML to be executed outside of the transaction

http://openejb.apache.org/3.0/transaction-annotations.html
?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 

> Date: Tue, 25 May 2010 05:38:35 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Time(r) for trouble
>
> Hi to all.
> My first post here, I always check this forum for guidelines and suggestions so I thank you all for the precious help.
> I made a search before posting but found nothing, I hope to post in the correct section.
>
> I have a glassfish (v3 build 74.2) installed on a debian linux (2.6.26-2-amd64) with sun java v6u20.
> Having some tests with scheduled copy of data from a database to another, this morning I undeployed my ear application but glassfish appears to have not expunged the timer associated with the app. If I try to redeploy my app, I get an EJBException:
>
> [i]Exception while loading the app javax.ejb.EJBException at com.sun.ejb.containers.EJBTimerService.createEJBException(EJBTimerService.java[/i]
>
> This is a little extract from the log:
>
> [i]... Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: An SQL data change is not permitted for a read-only connection, user or database. Error Code: 20000 Call: INSERT INTO EJB__TIMER__TBL (TIMERID, BLOB, INITIALEXPIRATIONRAW, SCHEDULE, INTERVALDURATION, OWNERID, STATE, LASTEXPIRATIONRAW, PKHASHCODE, CREATIONTIMERAW, CONTAINERID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [9@@1274779192846@@server@@domain1, [B_at_1189857e, 1274792400000, 0 # 0 # 0/1 # * # * # * # * # null # null # null # true # [b]importaGiacenze[/b] # 0, 0, server, 0, 0, 0, 1274789405048, 83543919289827330] Query: InsertObjectQuery(com.sun.ejb.containers.TimerState_at_46838f70) ...[/i]
>
> That [b]importaGiacenze[/b] is my scheduled method, and I think that the SQL error is reported as -from that method- I try to access an external unmanaged database (via DriverManager.getConnection(...)). The method is annotated this way:
> [i]@Schedule(hour = "0/1") @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)[/i]
> while the other connection (this one is managed) has the 'Non Transactional Connections' property checked (enabled) in the GF admin panel.
>
> I just have sit down and wait to see if timers will expunge themselves eventually, but that's not happened. I searched the manual, but I could only find the command 'list-timers' - which tells me there are 2 active timers btw. Now I don't really know what to do.
>
> I take advantage of this post to ask for help with another question: can I deploy an EJB with two method annotated as @Schedule, or is limited to just once for each EJB?
>
> A sincere thanks to anyone who could help me,
> Ivan
> [Message sent by forum member 'gioz79']
>
> http://forums.java.net/jive/thread.jspa?messageID=471341
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4