<?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 : How can refresh the MainEntityManager after new login ?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : How can refresh the MainEntityManager after new login ?</description>
  <pubDate>Wed, 10 Jun 2026 20:57:54 -700</pubDate>
  <lastBuildDate>Mon, 19 Jan 2009 09:16:49 -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=1062</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>How can refresh the MainEntityManager after new login ? : Hi.Happy new year.my question...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1062&amp;PID=3817#3817</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=219" rel="nofollow">aladdin</a><br /><strong>Subject:</strong> 1062<br /><strong>Posted:</strong> 19-Jan-2009 at 9:16am<br /><br />Hi.Happy new year.<br><br>my question is about EntityManagerService.<br><br>How can refresh the MainEntityManager after new login ? <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...my steps <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#000033"><font color="#0000ff">Persis</font><font color="#0000ff">tenceManager</font>&nbsp; </font>pManager = <font color="#0000ff">new PersistenceManager</font>(<font color="#0000ff">true</font>, "extention");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pManager.Login(<font color="#0000ff">new</font> <font color="#0000ff">LoginCredential</font>("admin2", "password2", "")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...after success login the DefaultManager and the <font color="#0000ff">MainPm</font>.Manager must look the new manager<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff">PersistenceManager</font>.DefaultManager = pManager;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#0000ff">MainPm</font>.Initialize();<br><br>because the MainEntityManager hold the old PersistenceManager from the initialization.<br><br>It is the right way to remove the MainEntityManager <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityManagerService.RemoveEntityManager (MainEntityManager ) from the servise <br><br>and add it again<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddNewEntityManager&lt;<font color="#0000ff">MainEntityManager</font>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <font color="#0000ff">EntityManagerNames</font>.MainEntityManager, <font color="#0000ff">MainPm</font>.Manager,<font color="#0000ff"> false</font>);<br><br>thanks<br>]]>
   </description>
   <pubDate>Mon, 19 Jan 2009 09:16:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1062&amp;PID=3817#3817</guid>
  </item> 
 </channel>
</rss>