Advertisement
Guest User

Untitled

a guest
Jul 14th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. @Singleton
  2. @Startup
  3. public class FooEJB {
  4.  
  5. @Schedule(hour = "*", minute = "*", second = "*/5", info ="foo timer",persistent=true)
  6. public void printDate() {
  7. System.out.println("It is " + new java.util.Date().toString());
  8. }
  9. }
  10.  
  11. <datasource jta="true" jndi-name="java:/jdbc/fooDS" pool-name="pgre" enabled="true" use-ccm="true">
  12. <connection-url>jdbc:postgresql://db_host/foodb</connection-url>
  13. <transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation>
  14. <driver>postgresql</driver>
  15. <security>
  16. <user-name>foo</user-name>
  17. <password>pwd/password>
  18. </security>
  19. <validation>
  20. <validate-on-match>false</validate-on-match>
  21. <background-validation>false</background-validation>
  22. </validation>
  23. <timeout>
  24. <set-tx-query-timeout>false</set-tx-query-timeout>
  25. <blocking-timeout-millis>0</blocking-timeout-millis>
  26. <idle-timeout-minutes>0</idle-timeout-minutes>
  27. <query-timeout>0</query-timeout>
  28. <use-try-lock>0</use-try-lock>
  29. <allocation-retry>0</allocation-retry>
  30. <allocation-retry-wait-millis>0</allocation-retry-wait-millis>
  31. </timeout>
  32. <statement>
  33. <share-prepared-statements>false</share-prepared-statements>
  34. </statement>
  35. </datasource>
  36.  
  37.  
  38. <timer-service thread-pool-name="default" default-data-store="clustered-store">
  39. <data-stores>
  40. <database-data-store name="clustered-store" datasource-jndi-name="java:/jdbc/fooDS" database="postgresql" partition="timer" refresh-interval="10000"/>
  41. </data-stores>
  42. </timer-service>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement