{"id":41718,"date":"2015-07-15T19:00:25","date_gmt":"2015-07-15T16:00:25","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=41718"},"modified":"2015-07-15T12:16:33","modified_gmt":"2015-07-15T09:16:33","slug":"restful-timers-in-java-ee","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html","title":{"rendered":"RESTful timers in Java EE"},"content":{"rendered":"<h2>In this post\u2026.<\/h2>\n<ul>\n<li>Whirlwind tour of EJB timers<\/li>\n<li>Working with EJB timers on the fly via simple REST interface with a <a href=\"https:\/\/github.com\/abhirockzz\/restful-ejb-timers\" target=\"_blank\">sample implementation<\/a><\/li>\n<\/ul>\n<h4>Update (14 July 2015)<\/h4>\n<p>The <a href=\"http:\/\/mi007-abhirockzz.rhcloud.com\/RESTfulEJBTimers\" target=\"_blank\">front end<\/a> for the application is now available on <a href=\"http:\/\/mi007-abhirockzz.rhcloud.com\/RESTfulEJBTimers\" target=\"_blank\">OpenShift<\/a>. Since I am a front end novice, I assembled this HTML5 + AngularJS app with help from other sources :) So it might feel a little clunky. Please bear with me while I try and improve upon this!<\/p>\n<p>From the UI, you can:<\/p>\n<ul>\n<li>look at all the active timers<\/li>\n<li>create a timer<\/li>\n<li>cancel a timer<\/li>\n<\/ul>\n<h4>Update (14 July 2015)<\/h4>\n<p>The EJB <em>@Schedule<\/em> annotation comes in handy in case you need to create timers automatically. One can use cron-like expression to configure the appropriate schedule. If you need more flexibility, the good old <em>TimerService <\/em>works like a charm.<\/p>\n<h2>Quick background<\/h2>\n<ul>\n<li>The <em>TimerService <\/em>interface was Introduced in <em>EJB 2.1<\/em> [yeah .. J2EE days ! ;-) ]<\/li>\n<li>Used to create <em>Timer <\/em>objects programmatically<\/li>\n<li>Used to work in conjunction with an implementation of the <em>TimedObject <\/em>interface [pre EJB 3.0] to serve as a call back for timer triggers<\/li>\n<li>Since EJB 3.0, the <em>@Timeout<\/em> annotation was used to mark a method in a (stateless\/singleton\/message driven) bean to act as the receiver of timer call backs from the EBJ container<\/li>\n<li>Things were further improved in EJB 3.1 with the introduction of <em>ScheduleExpression <\/em>which allowed fine grained timer scheduling \u2013 this was the programmatic equivalent of @Schedule<\/li>\n<\/ul>\n<h2>EJB Timer related components (for quick reference)<\/h2>\n<ul>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/Schedule.html\" target=\"_blank\">@Schedule<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/Schedules.html\" target=\"_blank\">@Schedules<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/TimerService.html\" target=\"_blank\">TimerService<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/Timer.html\" target=\"_blank\">Timer<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/TimedObject.html\" target=\"_blank\">TimedObject<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/Timeout.html\" target=\"_blank\">@Timeout<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/TimerHandle.html\" target=\"_blank\">TimerHandle<\/a><\/li>\n<li><a href=\"http:\/\/docs.oracle.com\/javaee\/7\/api\/javax\/ejb\/ScheduleExpression.html\" target=\"_blank\">ScheduleExpression<\/a><\/li>\n<\/ul>\n<h2>RESTful Timers<\/h2>\n<p>One can easily expose a simple RESTful interface to work with EJB Timers. Actions such as creating timers, fetching timer details as well cancelling timers can be executed on the fly.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>A simple implementation is available via <a href=\"https:\/\/github.com\/abhirockzz\/restful-ejb-timers\" target=\"_blank\">this Github project<\/a>. It\u2019s a simple <a href=\"https:\/\/github.com\/abhirockzz\/restful-ejb-timers\" target=\"_blank\">Java EE 7 Maven<\/a> project built on Netbeans. You should be able to set it up easily.<\/p>\n<h4>Here is a gist<\/h4>\n<ul>\n<li>POST a request to schedule a timer (JSON\/XML payload representing the schedule configuration)\n<pre class=\"brush:java;wrap-lines:false\">@POST\r\n@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\r\npublic Response schedule(@HeaderParam(\"name\") final String timerName, final ScheduleConfiguration config) {\r\n    auditScheduler.schedule(from(config), new TimerConfig(timerName, config.isPersistent()));\r\n    return Response.created(UriBuilder.fromResource(AuditSchedulerResource.class).path(timerName).build(timerName)).build();\r\n}\r\n<\/pre>\n<\/li>\n<li>GET all active timers and their respective details (JSON\/XML representation)\n<pre class=\"brush:java\">@GET\r\n@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\r\npublic Response getAllTimers() {\r\n    List&lt;String&gt; ejbTimers = auditScheduler.getAllTimers();\r\n    List&lt;ScheduledTimerInfo&gt; timers = ejbTimers.stream().map((id) -&gt; auditScheduler.getTimerInfo(id)).collect(Collectors.toList());\r\n    GenericEntity&lt;List&lt;ScheduledTimerInfo&gt;&gt; entities = new GenericEntity&lt;List&lt;ScheduledTimerInfo&gt;&gt;(timers) {};\r\n    return Response.ok(entities).build();\r\n}\r\n<\/pre>\n<\/li>\n<li>GET information for a specific timer (JSON\/XML representation)\n<pre class=\"brush:java\">@GET\r\n@Path(\"{id}\")\r\n@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\r\npublic Response getTimerInfo(@PathParam(\"id\") String name) {\r\n    ScheduledTimerInfo info = auditScheduler.getTimerInfo(name);\r\n    return Response.ok(info).build();\r\n}\r\n<\/pre>\n<\/li>\n<li>DELETE (cancel) an existing timer\n<pre class=\"brush:java\">@DELETE\r\n@Path(\"{id}\")\r\npublic void cancel(@PathParam(\"id\") String name) {\r\n    auditScheduler.cancel(name);\r\n}\r\n<\/pre>\n<\/li>\n<li>Use JAXB annotated POJOs to represent <a href=\"https:\/\/github.com\/abhirockzz\/restful-ejb-timers\/blob\/master\/src\/main\/java\/easy\/scheduling\/audit\/model\/ScheduleConfiguration.java\" target=\"_blank\">scheduler configuration<\/a> and <a href=\"https:\/\/github.com\/abhirockzz\/restful-ejb-timers\/blob\/master\/src\/main\/java\/easy\/scheduling\/audit\/model\/ScheduledTimerInfo.java\" target=\"_blank\">details<\/a><\/li>\n<li>Leverage default JSON support in Java EE 7<\/li>\n<\/ul>\n<p>The WADL should tell the story:<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/restful-ejb-timers-wadl1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-41729\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/07\/restful-ejb-timers-wadl1.jpg\" alt=\"restful-ejb-timers-wadl1\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Cheers!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/abhirockzz.wordpress.com\/2015\/07\/13\/restful-timers-in-java-ee\/\">RESTful timers in Java EE<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\/\">JCG partner<\/a> Abhishek Gupta at the <a href=\"http:\/\/abhirockzz.wordpress.com\/\">Object Oriented.. <\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July 2015) The front end for the application is now available on OpenShift. Since I am a front end novice, I assembled this HTML5 + AngularJS app with help from &hellip;<\/p>\n","protected":false},"author":545,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-41718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RESTful timers in Java EE - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RESTful timers in Java EE - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/100000586869380\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-15T16:00:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Abhishek Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/abhi_tweeter\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html\"},\"author\":{\"name\":\"Abhishek Gupta\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ef37bd58f3ae6f6504852858ad1d7cd7\"},\"headline\":\"RESTful timers in Java EE\",\"datePublished\":\"2015-07-15T16:00:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html\"},\"wordCount\":393,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html\",\"name\":\"RESTful timers in Java EE - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2015-07-15T16:00:25+00:00\",\"description\":\"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/07\\\/restful-timers-in-java-ee.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"RESTful timers in Java EE\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ef37bd58f3ae6f6504852858ad1d7cd7\",\"name\":\"Abhishek Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g\",\"caption\":\"Abhishek Gupta\"},\"sameAs\":[\"http:\\\/\\\/abhirockzz.wordpress.com\\\/\",\"http:\\\/\\\/www.facebook.com\\\/100000586869380\",\"http:\\\/\\\/in.linkedin.com\\\/pub\\\/abhishek-gupta\\\/27\\\/331\\\/866\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/abhi_tweeter\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/abhishek-gupta\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RESTful timers in Java EE - Java Code Geeks","description":"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html","og_locale":"en_US","og_type":"article","og_title":"RESTful timers in Java EE - Java Code Geeks","og_description":"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July","og_url":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"http:\/\/www.facebook.com\/100000586869380","article_published_time":"2015-07-15T16:00:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Abhishek Gupta","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/abhi_tweeter","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Abhishek Gupta","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html"},"author":{"name":"Abhishek Gupta","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ef37bd58f3ae6f6504852858ad1d7cd7"},"headline":"RESTful timers in Java EE","datePublished":"2015-07-15T16:00:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html"},"wordCount":393,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html","url":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html","name":"RESTful timers in Java EE - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2015-07-15T16:00:25+00:00","description":"In this post\u2026. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2015\/07\/restful-timers-in-java-ee.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"RESTful timers in Java EE"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ef37bd58f3ae6f6504852858ad1d7cd7","name":"Abhishek Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f3fc8e83d92bec29f7cb54bba3d5043d138c479a66a4711483bc6b4d95ae37c?s=96&d=mm&r=g","caption":"Abhishek Gupta"},"sameAs":["http:\/\/abhirockzz.wordpress.com\/","http:\/\/www.facebook.com\/100000586869380","http:\/\/in.linkedin.com\/pub\/abhishek-gupta\/27\/331\/866","https:\/\/x.com\/https:\/\/twitter.com\/abhi_tweeter"],"url":"https:\/\/www.javacodegeeks.com\/author\/abhishek-gupta"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/41718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/545"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=41718"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/41718\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=41718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=41718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=41718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}