<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Michal,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'll add a dispose method to the 
SingleSessionCommandService.&nbsp; Don't think using a command for this would be 
a good idea as it would leave the session in a disposed state so future commands 
would fail.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regarding your earlier question, 
SingleSessionCommandService now also has constructors that allow you to pass in 
a PlaceholderResolverStrategyFactory.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=michalbali@gmail.com href="mailto:michalbali@gmail.com">Michal 
  Bali</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org 
  href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, December 02, 2008 1:24 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] Proper termination 
  of a CommandService</DIV>
  <DIV><BR></DIV>Hello,<BR>Let's say I have some implementation of a 
  CommandService (for example StatefulSessionCommandService). After I finish 
  working with this CommandService, I want to correctly 'destroy' this object. 
  Since it contains a stateful rule session, I believe this session needs to be 
  disposed. What is the right way to do it?<BR><BR>I was thinking about 
  implementing a DisposeCommand that will simply call session.dispose() in its 
  execute method. Is this a valid solution?<BR><BR>Best Regards,<BR>Michal<BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>rules-users mailing 
  list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>