Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be excellent to make the WorldCreator through the Middle-Tier Applicaton Server #121

Closed
YARSUN opened this issue Jul 6, 2018 · 14 comments

Comments

@YARSUN
Copy link

YARSUN commented Jul 6, 2018

As far as I understood, I was not alone asking such a question (http://www.expandframework.com/forum/8-discussion/1920-worldcreator-and-xaf-application-server.html , http://www.expandframework.com/forum/8-discussion/5065-application-server-with-worldcreator.html) and it would be great to realize the availability of objects who created with the help of WorldCreator through the Middle-Tier XpandServerApplication.
If I can help in this matter - please let me know. I did a lot of tests and experiments. Maybe for start - it's possible to load WC (example: through creating Win application in app server code started and after - upload/inject dynamically types to the XpandServerApplication exported types) module when ServerApplication is started...

@apobekiaris
Copy link
Member

Thanks for the offer however I cannot suggest at the moment what needs to be done as I need time for research. What is your timeframe for this?

@YARSUN
Copy link
Author

YARSUN commented Jul 6, 2018

You really flash) We have the time until about 10.2018-11.2018. If in this frame time this task in any - even the most complex and uncomfortable performance will be solved, it will be cool. Next we will be equal in proportion to your development. Otherwise, we will have to "dance with a tambourine" and try to make our generator/modifier of objects and somehow "screw" it to the XAF (((

@apobekiaris
Copy link
Member

the time is more than enough I will update you again when I spent some time researching deeply.

@YARSUN
Copy link
Author

YARSUN commented Jul 6, 2018

Thank's for you Work Apostolis! Great! Will be waiting for updates...

@melihyilman
Copy link

Hello, any news ? :)

@YARSUN
Copy link
Author

YARSUN commented Jul 13, 2018

Hi! Nop) at the current time.

@apobekiaris
Copy link
Member

apobekiaris commented Jul 24, 2018

it is possible with this patch (see Demos/Middle Tier/E4036-WCF solution in the included sources) to run Worldcreator both on the server and on client. For this you need to use the same clasess used in the Program.cs files and provide a WorldCreatorConnestring in both app.config. Note of course that server has no UI and if a client uses worldcreator means that the model only for that client would changed and will lead to problems unless the server and all clients are restarted. I think a simple notification using the nottification module would benefit here but not sure maybe you can feedback if needed.

@YARSUN
Copy link
Author

YARSUN commented Jul 24, 2018

Thank's Apostolis! I'll try path and make a review.

@YARSUN
Copy link
Author

YARSUN commented Aug 2, 2018

Hi Apostolis! It's not working, I'll try update my project and sample in Demos/Middle Tier/E4036-WCF:

When LogOn under Administrator:
Sheme need for update. Sql text: Table 'SequenceReleasedObject' not found

в DevExpress.Xpo.DB.ConnectionProviderSql.ProcessUpdateSchema(Boolean skipIfFirstTableNotExists, DBTable[] tables)
в DevExpress.Xpo.DB.DataStoreSerializedBase.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, DBTable[] tables)
в DevExpress.Xpo.DB.ConnectionProviderSql.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, DBTable[] tables)
в DevExpress.Xpo.SimpleDataLayer.<>c__DisplayClass4.b__3()
в DevExpress.Xpo.SimpleDataLayer.ReentrancyAndThreadSafetyChecked[T](Func1 action) в DevExpress.Xpo.SimpleDataLayer.UpdateSchema(Boolean dontCreate, XPClassInfo[] types) в DevExpress.Xpo.Session.PrepareQueries(ObjectsQuery[] queries, Boolean doDetectPostProcessing, IPersistentValueExtractor persistentValueExtractor) в DevExpress.Xpo.ExplicitUnitOfWork.IsFlushRequired(ObjectsQuery[] queries) в DevExpress.Xpo.ExplicitUnitOfWork.GetObjectsInternal(ObjectsQuery[] queries) в DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler1 handler, MessageHandler1 createMessageHandler) в DevExpress.Xpo.Session.GetObjects(ObjectsQuery query) в DevExpress.Xpo.XPBaseCollection.Load() в DevExpress.Xpo.XPBaseCollection.get_Objects() в DevExpress.Xpo.XPBaseCollection.System.Collections.IEnumerable.GetEnumerator() в DevExpress.Xpo.XPCollection1.<System.Collections.Generic.IEnumerable.GetEnumerator>d__0.MoveNext()
в System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() в System.Linq.Buffer1..ctor(IEnumerable1 source) в System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
в Xpand.Persistent.Base.General.SequenceGenerator.GetNextSequence(String sequenceType)
в Xpand.Persistent.Base.General.SequenceGenerator.GenerateSequence(Session session, String sequenceType, Action1 seq) в Xpand.Persistent.Base.General.SequenceGenerator.GenerateSequence(ISupportSequenceObject supportSequenceObject, ITypeInfo typeInfo) в Xpand.Persistent.Base.General.SequenceGenerator.GenerateSequence(ISupportSequenceObject supportSequenceObject) в Xpand.ExpressApp.ModelDifference.DataStore.BaseObjects.ModelDifferenceObject.OnSaving() в DevExpress.Xpo.Session.TriggerObjectSaving(Object theObject) в DevExpress.Xpo.Session.PreProcessSavedList() в DevExpress.Xpo.Session.BeginFlushChanges() в DevExpress.Xpo.Session.FlushChanges() в DevExpress.Xpo.Logger.LogManager.Log(String category, LogHandlerVoid handler, MessageHandler1 createMessageHandler, ExceptionHandler exceptionHandler)
в DevExpress.ExpressApp.Xpo.XPObjectSpace.DoCommit()
в DevExpress.ExpressApp.BaseObjectSpace.CommitChanges()
в Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoUserModelDictionaryDifferenceStore.OnDifferenceObjectSaving(ModelDifferenceObject userModelDifferenceObject, ModelApplicationBase model)
в Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoDictionaryDifferenceStore.SaveDifference(ModelApplicationBase model)
в Xpand.ExpressApp.ModelDifference.DictionaryStores.XpoUserModelDictionaryDifferenceStore.SaveDifference(ModelApplicationBase model)
в DevExpress.ExpressApp.XafApplication.LoadUserDifferences()
в DevExpress.ExpressApp.XafApplication.Logon(PopupWindowShowActionExecuteEventArgs logonWindowArgs)
в DevExpress.ExpressApp.Win.WinApplication.Logon(PopupWindowShowActionExecuteEventArgs logonWindowArgs)

In my project I get a error System.NullReferenceException: "The object reference does not instance of the object." when initialize a ShowNavigationItemController (I added that for debug - http://www.expandframework.com/support/6-bugs/4730-exception-occurs-while-activating-the-xpand-expressapp-security-controllers-shownavigationitemcontroller-controller-object-reference-not-set-to-an-instance-of-an-object.html#9632)
public partial class ShowNavigationItemController : Xpand.ExpressApp.Security.Controllers.ShowNavigationItemController
{
protected override void OnActivated()
{
base.OnActivated();
}

    protected override void OnAfterConstruction()
    {
        base.OnAfterConstruction();
    }

    protected override void InitializeItems()
    {
        base.InitializeItems(); <-----
    }

Error details:
System.NullReferenceException
HResult=0x80004003
Сообщение = Ссылка на объект не указывает на экземпляр объекта.
Источник = DevExpress.ExpressApp.v18.1
Трассировка стека:
at DevExpress.ExpressApp.XafApplication.GetCheckCompatibilityType(IObjectSpaceProvider objectSpaceProvider)
at DevExpress.ExpressApp.Win.WinApplication.CreateApplicationUpdater()
at DevExpress.ExpressApp.Win.WinApplication.CheckCompatibilityCore()
at DevExpress.ExpressApp.XafApplication.CheckCompatibility()
at DevExpress.ExpressApp.XafApplication.CreateObjectSpace(Type objectType)
at DevExpress.ExpressApp.ReportsV2.ApplicationReportObjectSpaceProvider.CreateObjectSpace(Type type)
at DevExpress.ExpressApp.ReportsV2.ReportsStorage.CollectInplaceReportsData()
at DevExpress.ExpressApp.ReportsV2.InplaceReportsCacheHelper.CollectAllInplaceReportsData()
at DevExpress.ExpressApp.ReportsV2.InplaceReportsCacheHelper.EnsureCache()
at DevExpress.ExpressApp.ReportsV2.InplaceReportsCacheHelper.GetReportDataInfoList(Type targetObjectType)
at DevExpress.ExpressApp.ReportsV2.CustomizeNavigationItemsController.CreateReportNavigationItems(Type targetObjectType)
at DevExpress.ExpressApp.ReportsV2.CustomizeNavigationItemsController.showNavigationItemController_NavigationItemCreated(Object sender, NavigationItemCreatedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at DevExpress.ExpressApp.SystemModule.ShowNavigationItemController.OnNavigationItemCreated(IModelNavigationItem item, ChoiceActionItem navigationItem)
at DevExpress.ExpressApp.SystemModule.ShowNavigationItemController.ProcessItem(IModelNavigationItem item, ChoiceActionItemCollection choiceActionItems)
at DevExpress.ExpressApp.SystemModule.ShowNavigationItemController.InitializeItems()
at HASKI.Module.Controllers.ShowNavigationItemController.InitializeItems() in C:\WORK\Проекты\HASKI\HASKI.Module\Controllers\ShowNavigationItemController.cs:line 37
at HASKI.Module.Controllers.ShowNavigationItemController.OnActivated() in C:\WORK\Проекты\HASKI\HASKI.Module\Controllers\ShowNavigationItemController.cs:line 27
at DevExpress.ExpressApp.Utils.BoolList.OnResultValueChanged(Boolean oldResultValue, Boolean resultValue)
at DevExpress.ExpressApp.Utils.BoolList.EndUpdate()
at DevExpress.ExpressApp.WindowController.SetWindow(Window newWindow)
at DevExpress.ExpressApp.Window.ActivateControllers()

I'am not understand why.

@apobekiaris
Copy link
Member

where does this happen? in the modified demo? can you post it? does the demo work as expected b4 modifying?

@YARSUN
Copy link
Author

YARSUN commented Aug 2, 2018

Hi!
For sample project: No, I just update sample project to last XAF library and Xpand.
For my project - how can I send to you in private channel?

@YARSUN
Copy link
Author

YARSUN commented Aug 2, 2018

E4036-WCF.zip

@apobekiaris
Copy link
Member

the problem was when database not exist, I patch it here

@apobekiaris
Copy link
Member

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants