This may be harsh, but your first mistake was blindly applying a
framework to a project which is almost complete.
>I made a quick switch from Linq to Sql to AR near the end of a project, and 
>didn't have the time to properly learn AR/NHibernate before I started using it.

As for advice on what the problem may be:
1. Start by reading the documentation on AR and NH session management.
(AR is primarily about attributes, so I venture to say most of the
problems are with session management). AR is not a silver bullet or
magic potion for data access you must understand the tool to use it
properly.
2. Get a license for NHProf (www.nhprof.com) and profile your
application. This will tell you the cause of your problems. Since you
have now read the documentation you can begin to solve the pain
points.

On May 26, 12:40 pm, vekaz turkovic <[email protected]> wrote:
> Hi all,
>
> I am using Castle AR in a WinForms application. I made a quick switch
> from Linq to Sql to AR near the end of a project, and didn't have the
> time to properly learn AR/NHibernate before I started using it.
> So, be gentle, this may be a really stupid question...
>
> Several users run the application simultaneously. I want to reload the
> data from the database each time a user saves something. I am getting
> the data using the same code when a form is first
> loaded, and later, after data is saved. This seemed to work ok, until I
> tested the app with two users using the app simultaneously. First user
> saves stuff, second user tries to reload the data,
> but he doesn't see the changes made by the first user until the app is
> restarted.
>
> If i dispose the current scope and create a new one, everything works
> perfectly, but it takes forever to complete. If I run the application on
> my desktop computer, the same computer where the SQL Server is,
> everything is fine. But, when I run it on my laptop, and connect to the
> server through the network, the process of saving, disposing the current
> scope, creating a new one and reloading the data (which is usually just
> several records) takes about 10 seconds.
>
> Is there any other way of forcing AR to get the data from the DB, not
> the cache? Or, am i doing all this completely wrong?
>
> I need to find solution to this asap, any suggestions are very welcome.
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to