Using timers in jboss modules

Prateek Jain J <[email protected]> Fri, 10 Feb 2017 16:27:00 +0000
Newsgroups gmane.comp.java.jboss.user
Message-ID <VI1PR07MB1696F58EF55A0C3B2D40C7F3B3440@VI1PR07MB1696.eurprd07.prod.outlook.com>
--===============0214921338809076094==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_VI1PR07MB1696F58EF55A0C3B2D40C7F3B3440VI1PR07MB1696eurp_"

--_000_VI1PR07MB1696F58EF55A0C3B2D40C7F3B3440VI1PR07MB1696eurp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


Hi,
I am required to create a timer/schedule service in jboss (JEE6). The issue=
 is, it gets deployed as jboss module. I know that following code works if =
deployed as EJB
@Schedule(hour=3D"*/1", persistent=3Dfalse)
but it doesnt work if deployed otherwise. Are there any recommendations or =
standard ways to create and use timers in jboss modules? I want to avoid co=
re-java way of creating TimerTask.

Regards,
Prateek Jain


--_000_VI1PR07MB1696F58EF55A0C3B2D40C7F3B3440VI1PR07MB1696eurp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:"Courier New";
	mso-fareast-language:EN-IE;}
span.lit
	{mso-style-name:lit;}
span.pun
	{mso-style-name:pun;}
span.pln
	{mso-style-name:pln;}
span.str
	{mso-style-name:str;}
span.kwd
	{mso-style-name:kwd;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-IE" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;background:white"><spa=
n style=3D"font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:=
#242729;mso-fareast-language:EN-IE"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;background:white"><spa=
n style=3D"font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:=
#242729;mso-fareast-language:EN-IE">Hi,<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;background:white"><spa=
n style=3D"font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:=
#242729;mso-fareast-language:EN-IE">I am required to create a timer/schedul=
e service in jboss (JEE6). The issue is, it gets
 deployed as jboss module. I know that following code works if deployed as =
EJB<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"background:#EFF0F1"><span style=3D"font-siz=
e:10.0pt;font-family:Consolas;color:#7D2727;border:none windowtext 1.0pt;pa=
dding:0cm;background:#EFF0F1;mso-fareast-language:EN-IE">@Schedule</span><s=
pan style=3D"font-size:10.0pt;font-family:Consolas;color:#303336;border:non=
e windowtext 1.0pt;padding:0cm;background:#EFF0F1;mso-fareast-language:EN-I=
E">(hour=3D</span><span style=3D"font-size:10.0pt;font-family:Consolas;colo=
r:#7D2727;border:none windowtext 1.0pt;padding:0cm;background:#EFF0F1;mso-f=
areast-language:EN-IE">&quot;*/1&quot;</span><span style=3D"font-size:10.0p=
t;font-family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0=
cm;background:#EFF0F1;mso-fareast-language:EN-IE">,
 persistent=3D</span><span style=3D"font-size:10.0pt;font-family:Consolas;c=
olor:#101094;border:none windowtext 1.0pt;padding:0cm;background:#EFF0F1;ms=
o-fareast-language:EN-IE">false</span><span style=3D"font-size:10.0pt;font-=
family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0cm;back=
ground:#EFF0F1;mso-fareast-language:EN-IE">)</span><span style=3D"font-size=
:10.0pt;font-family:Consolas;color:#393318;mso-fareast-language:EN-IE"><o:p=
></o:p></span></p>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;background:white"><spa=
n style=3D"font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:=
#242729;mso-fareast-language:EN-IE">but it doesnt work if deployed otherwis=
e. Are there any recommendations or standard ways
 to create and use timers in jboss modules? I want to avoid core-java way o=
f creating TimerTask.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:12.0pt;font-=
family:&quot;Cambria&quot;,serif;color:#1F497D;mso-fareast-language:EN-IE">=
Regards,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:12.0pt;font-=
family:&quot;Cambria&quot;,serif;color:#1F497D;mso-fareast-language:EN-IE">=
Prateek Jain<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_VI1PR07MB1696F58EF55A0C3B2D40C7F3B3440VI1PR07MB1696eurp_--

--===============0214921338809076094==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
--===============0214921338809076094==--