<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Multiple EntityManagers &amp; DefaultManager</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Multiple EntityManagers &amp; DefaultManager</description>
  <pubDate>Sat, 11 Apr 2026 22:17:13 -700</pubDate>
  <lastBuildDate>Fri, 10 Dec 2010 01:56:09 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2338</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Multiple EntityManagers &amp; DefaultManager : I eventually solved this by implementing...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2338&amp;PID=9359#9359</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=877" rel="nofollow">pompomJuice</a><br /><strong>Subject:</strong> 2338<br /><strong>Posted:</strong> 10-Dec-2010 at 1:56am<br /><br />I eventually solved this by implementing my entitymanagers as singletons and avoiding the use of DefaultManager.<DIV>&nbsp;</DIV><DIV>Works fine.</DIV>]]>
   </description>
   <pubDate>Fri, 10 Dec 2010 01:56:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2338&amp;PID=9359#9359</guid>
  </item> 
  <item>
   <title>Multiple EntityManagers &amp; DefaultManager : I have been working on a application...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2338&amp;PID=9254#9254</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=877" rel="nofollow">pompomJuice</a><br /><strong>Subject:</strong> 2338<br /><strong>Posted:</strong> 26-Nov-2010 at 5:00am<br /><br /><P style="LINE-HEIGHT: normal; MARGIN: 0cm 1.5pt 0.75pt" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>I have been working on a application that only has one entity manager. When I attempted to add another one (something that should be relatively easy) everything went Nuclear! My assumption that GetDefaultEntityManager was some sort of a attempted&nbsp;singleton pattern was way off. I don't even know why it has a generic parameter, it does not seem to use it O_o? <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0.75pt 1.5pt" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>&nbsp;<O:P></O:P></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0.75pt 1.5pt" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>What is the intended usage pattern for working with multiple entity managers? If you look at the code everything just seems wrong. Entity Manager defines the following property in the base class:<O:P></O:P></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 1.5pt 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>public</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>static</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>EntityManager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> DefaultManager { </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>get</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>; </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>set</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>; }<O:P></O:P></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 1.5pt 0pt" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>But then it goes and generates this:</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><O:P></O:P></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0cm 1.5pt 10pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" ="Ms&#111;normal"><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>///</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>&lt;summary&gt;</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: green; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>Gets the default manager. </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>&lt;/summary&gt;<BR></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>public</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>new</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>static</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>IdentityEntityManager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> DefaultManager </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><BR></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>{</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><BR><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>get</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> { </SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>return</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN> GetDefaultEntityManager&lt;</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #2b91af; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>IdentityEntityManager</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>&gt;(); }</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><BR></SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN>}</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: gray; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><O:P></O:P></SPAN></P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-ZA" lang=EN><DIV>Now it looks correct, but GetDefaultEntityManager just&nbsp;fetches the very first entitymanger you worked with regardless of the generic paramter specified. I have searched the forum, noone is complaining so that leads me to believe I am missing something.</DIV><DIV>&nbsp;</DIV><DIV>Should I have just instantiated my entity managers explicitly somewhere in my code with a proper singleton pattern from the getgo? Or is there a way in which I can recover without having to go through all my code and rip out all the references to DefaultManager. This is not cool. </DIV><DIV>&nbsp;</DIV><DIV>DevForce is such a phenomenal piece of software, but every now and again you get these weird and blatently broken pieces of functionality that makes no sense. How can you code something like DevForce but get such basic things wrong!?</SPAN><O:P></O:P></DIV><span style="font-size:10px"><br /><br />Edited by pompomJuice - 26-Nov-2010 at 5:05am</span>]]>
   </description>
   <pubDate>Fri, 26 Nov 2010 05:00:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2338&amp;PID=9254#9254</guid>
  </item> 
 </channel>
</rss>