archive-be.com » BE » B » BENNYMICHIELSEN.BE

Total: 348

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • transactions – Benny Michielsen
    what has happened the item was added changed or deleted The TodoEditDto wraps the edited dto adds a ChangeType and EditId property The EditId is generated on the client and used to identify newly saved objects when the server sends back the Id s that were generated when the todo was persisted That way a new created todo can be edited right away after saving it saved data to server foreach var persistedEdit in response PersistedEdits var foundEdit from edt in editedTodos where edt Value EditId Equals persistedEdit EditId select edt Value First foundEdit EditedTodo Id persistedEdit EditedTodo Id With some basic editing now in place some work is still needed in the UI let s now add transactional support to our save method Spring Net allows you to add this capability declarative or programmatic and even within these two approaches there are several ways to achieve your result At work I ve always used the declarative way using AutoProxy and the Transaction attribute To make that work you need to add a reference to Spring Data add the attribute to the methods that need to be transactional and add the following object definitions to your configuration object id AutoProxyCreator type Spring Aop Framework AutoProxy DefaultAdvisorAutoProxyCreator Spring Aop object id TransactionAdvisor type Spring Transaction Interceptor TransactionAttributeSourceAdvisor Spring Data property name TransactionInterceptor ref TransactionInterceptor object Transaction Interceptor object id TransactionInterceptor type Spring Transaction Interceptor TransactionInterceptor Spring Data property name TransactionManager ref TransactionManager property name TransactionAttributeSource ref AttributeTransactionAttributeSource object object id AttributeTransactionAttributeSource type Spring Transaction Interceptor AttributesTransactionAttributeSource Spring Data object Transaction TransactionPropagation Required public SaveEditedTodosResponse SaveTodos SaveEditedTodosRequest request do stuff At runtime Spring Net will create a proxy for each service that has the tranascation attribute declared on its methods and manage the transaction from in that generated class Everything you ve

    Original URL path: http://blog.bennymichielsen.be/tag/transactions/ (2016-04-29)
    Open archived version from archive


  • Using Spring.Net, SQLite and NHibernate – Benny Michielsen
    an assembly redirect assemblyBinding xmlns urn schemas microsoft com asm v1 dependentAssembly assemblyIdentity name System Data SQLite culture neutral publicKeyToken db937bc2d44ff139 bindingRedirect oldVersion 1 0 56 0 newVersion 1 0 58 0 dependentAssembly assemblyBinding This is all defined in the spring manual but it actually took me quite some time to get it running Only when adding the xml namespace the redirect was picked up when running the application The NHibernate version I had was also newer so a redirect was necessary for those dll s as well With this out of my way I still had to tell NHibernate to use SQLite The official site gives this sample configuration xml version 1 0 encoding utf 8 hibernate configuration xmlns urn nhibernate configuration 2 2 session factory name NHibernate Test property name connection provider NHibernate Connection DriverConnectionProvider property property name connection driver class NHibernate Driver SQLiteDriver property property name connection connection string Data Source nhibernate db Version 3 property property name dialect NHibernate Dialect SQLiteDialect property property name query substitutions true 1 false 0 property session factory hibernate configuration Which is almost correct but not quite Below you find the complete correct springified configuration so extract the pieces you need when using plain NHibernate The difference is in the driver class object id NHibernateSessionFactory type Spring Data NHibernate LocalSessionFactoryObject Spring Data NHibernate20 property name DbProvider ref DbProvider property name MappingAssemblies list value TodoCore value list property property name HibernateProperties dictionary entry key connection provider value NHibernate Connection DriverConnectionProvider entry key connection driver class value NHibernate Driver SQLite20Driver entry key dialect value NHibernate Dialect SQLiteDialect entry key query substitutions value true 1 false 0 dictionary property property name ExposeTransactionAwareSessionFactory value true object Great we ve configured our data access But the repository is giving me errors it can t find the database file The project structure I have is illustrated below My first attempt was to use relative path names add key db datasource value Data Source App DataTodoDb db Version 3 But that just failed to get this working I used the for me new DataDirectory variable which did cause the database to be found and used add key db datasource value Data Source DataDirectory TodoDb db Version 3 The data was now being retrieved isn t that wonderful only took me maybe two or three hours As front end I first added a WPF application but if you see that Window1 xaml file for the first time you have a bit of a writer s block Even when you drag a button on it you don t get to see one and adding a grid to the window and then trying to add a column was quite overwhelming there even seem more options available compared to the third party components I use at work So for now just good old Winforms but a WPF front end will definitely be added I also played around with the bindinglist you can create when using a grid I must admit I ve

    Original URL path: http://blog.bennymichielsen.be/2008/09/01/using-spring-net-sqlite-and-nhibernate/ (2016-04-29)
    Open archived version from archive

  • Installing a Scythe Mini Ninja – Benny Michielsen
    cooler I noticed that there was not much of thermal paste on the standard heatsink so removing any residue was quite easy I also ignored all the advice of installing the Ninja outside the case which would mean dismantling the htpc In the end it didn t save me that much time since I had to remove the ram and some of the power cables to install the heatsink also if you ve got thicker fingers than me you probably won t be able to reach all of the pins used to attach the Ninja to the motherboard Make sure to apply an even layer of thermal paste on the cpu you won t need to use all of it since too much is as bad as too little I powered the system back on again changed the bios to allow the absence of a cpu fan and off it went With the top of the case screwed back into place I first thought the upgrade didn t change a lot but I was sitting at 20cm from it When I had placed the htpc back into it s normal habitat and sat on a normal distance 2 meters the psu fan was still audible but any ambient sound can overcome it When I start a movie the system can t be heard now To test the heatsink I started two instances of cpuburn and watched the result with speedfan After 5 10 minutes the temperature reached around 50 degrees which is quite good especially if you keep in mind that the two cores will never be under that amount of load under normal use So overall a great product Author BennyM Posted on 26 08 2008 Categories Computer Tags htpc minja Leave a Reply Cancel reply Your email address

    Original URL path: http://blog.bennymichielsen.be/2008/08/26/installing-a-scythe-mini-ninja/ (2016-04-29)
    Open archived version from archive

  • minja – Benny Michielsen
    one fan clips to attach the fan and one big heatsink When removing the stock cpu cooler I noticed that there was not much of thermal paste on the standard heatsink so removing any residue was quite easy I also ignored all the advice of installing the Ninja outside the case which would mean dismantling the htpc In the end it didn t save me that much time since I had to remove the ram and some of the power cables to install the heatsink also if you ve got thicker fingers than me you probably won t be able to reach all of the pins used to attach the Ninja to the motherboard Make sure to apply an even layer of thermal paste on the cpu you won t need to use all of it since too much is as bad as too little I powered the system back on again changed the bios to allow the absence of a cpu fan and off it went With the top of the case screwed back into place I first thought the upgrade didn t change a lot but I was sitting at 20cm from it When I had placed the htpc back into it s normal habitat and sat on a normal distance 2 meters the psu fan was still audible but any ambient sound can overcome it When I start a movie the system can t be heard now To test the heatsink I started two instances of cpuburn and watched the result with speedfan After 5 10 minutes the temperature reached around 50 degrees which is quite good especially if you keep in mind that the two cores will never be under that amount of load under normal use So overall a great product Author BennyM Posted on

    Original URL path: http://blog.bennymichielsen.be/tag/minja/ (2016-04-29)
    Open archived version from archive

  • Using appSettings in your Spring configuration – Benny Michielsen
    other object relations so instead of searching through all your definitions to change them wouldn t it be better to have a central place where you can manage them Of course it would so let s use the appSettings section In order to reference the appSettings in your Spring configuration file you need to add this object definition to your configuration object name appConfigPropertyHolder type Spring Objects Factory Config PropertyPlaceholderConfigurer Spring Core property name configSections value appSettings value property object Your appSettings typically looks like this appSettings add key LoggerOutputFile value c MyOutputFile txt appSettings Now you can reference this value using LoggerOutputFile as illustrated below object name MyLogger type SpringAppSettingsConsole Infrastructure FileLogger SpringAppSettingsConsole constructor arg value LoggerOutputFile object Full sample with source code can be downloaded here SpringAppSettings zip 247 31 kb Author BennyM Posted on 11 08 2008 Categories Spring NET Tags appsettings configuration Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post Updated to BlogEngine 1 4 5 Next Next post Installing a Scythe Mini Ninja Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an

    Original URL path: http://blog.bennymichielsen.be/2008/08/11/using-appsettings-in-your-spring-configuration/ (2016-04-29)
    Open archived version from archive

  • appsettings – Benny Michielsen
    but sometimes there s the need for a configurable value These tend to change more than other object relations so instead of searching through all your definitions to change them wouldn t it be better to have a central place where you can manage them Of course it would so let s use the appSettings section In order to reference the appSettings in your Spring configuration file you need to add this object definition to your configuration object name appConfigPropertyHolder type Spring Objects Factory Config PropertyPlaceholderConfigurer Spring Core property name configSections value appSettings value property object Your appSettings typically looks like this appSettings add key LoggerOutputFile value c MyOutputFile txt appSettings Now you can reference this value using LoggerOutputFile as illustrated below object name MyLogger type SpringAppSettingsConsole Infrastructure FileLogger SpringAppSettingsConsole constructor arg value LoggerOutputFile object Full sample with source code can be downloaded here SpringAppSettings zip 247 31 kb Author BennyM Posted on 11 08 2008 Categories Spring NET Tags appsettings configuration Leave a comment on Using appSettings in your Spring configuration Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large

    Original URL path: http://blog.bennymichielsen.be/tag/appsettings/ (2016-04-29)
    Open archived version from archive

  • Updated to BlogEngine 1.4.5 – Benny Michielsen
    ve used the script from my earlier post when I upgraded from 1 3 to 1 4 there was one insert statement missing from the script The insert statement added the widget bar with its default configuration Since it was missing then and we are deleting all entries from the DataStoreSettings I ve included the insert statement the default script that ships with BE 1 4 5 has an update statement in place for that entry in the DB MSSQL2000 UpgradeTo1 4 5 0From1 4 0 0 sql 3 20 kb Finally if you are running SQL Membership and Role provider and are upgrading from an earlier version don t forget to check the applicationName of the providers in 1 4 this changed from BlogEngine Net to BlogEngine What you need to change is described in my earlier post Author BennyM Posted on 05 08 2008 Categories Computer Tags blogengine script sql update 4 thoughts on Updated to BlogEngine 1 4 5 ismael says 08 08 2008 at 09 50 Thank you Reply fred says 09 12 2008 at 21 44 Thanks for providing this very helpful script for those of us stuck on SQL 2000 Everything works well except for the users tab When I try to add new users I get errors and it seems to be trying to go back to the XML files rather than using SQL server The error says Access to the path D blogApp Datausers xml is denied Have you encountered this Reply Benny says 10 12 2008 at 12 01 You need to configure your user and role provider take a look at your Web config You ll see a node called membership and one called roleManager Out of the box you can use XmlMembershipProvider or XmlRoleProvider which used your App Date

    Original URL path: http://blog.bennymichielsen.be/2008/08/05/updated-to-blogengine-1-4-5/ (2016-04-29)
    Open archived version from archive


  • be UserRoles be Roles FOREIGN KEY RoleID REFERENCES dbo be Roles RoleID GO ALTER TABLE dbo be UserRoles CHECK CONSTRAINT FK be UserRoles be Roles GO ALTER TABLE dbo be UserRoles WITH CHECK ADD CONSTRAINT FK be UserRoles be Users FOREIGN KEY UserID REFERENCES dbo be Users UserID GO ALTER TABLE dbo be UserRoles CHECK CONSTRAINT FK be UserRoles be Users GO Object Index FK PostID Script Date 12 22 2007 14 18 36 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostCategory PostID ASC GO Object Index FK CategoryID Script Date 12 22 2007 14 19 19 CREATE NONCLUSTERED INDEX FK CategoryID ON dbo be PostCategory CategoryID ASC GO Object Index FK PostID Script Date 12 22 2007 14 19 45 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostComment PostID ASC GO Object Index FK PostID Script Date 12 22 2007 14 20 29 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostNotify PostID ASC GO Object Index FK PostID Script Date 12 22 2007 14 20 43 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostTag PostID ASC GO Object Index I TypeID Script Date 06 28 2008 19 34 43 CREATE NONCLUSTERED INDEX I TypeID ON dbo be DataStoreSettings ExtensionType ASC ExtensionId ASC GO Object Index I UserName Script Date 06 28 2008 19 35 12 CREATE NONCLUSTERED INDEX I UserName ON dbo be Profiles UserName ASC GO Load initial Data INSERT INTO be Settings SettingName SettingValue VALUES administratorrole Administrators INSERT INTO be Settings SettingName SettingValue VALUES alternatefeedurl INSERT INTO be Settings SettingName SettingValue VALUES authorname My name INSERT INTO be Settings SettingName SettingValue VALUES avatar combine INSERT INTO be Settings SettingName SettingValue VALUES blogrollmaxlength 23 INSERT INTO be Settings SettingName SettingValue VALUES blogrollupdateminutes 60 INSERT INTO be Settings SettingName SettingValue VALUES blogrollvisibleposts 3 INSERT INTO be Settings SettingName SettingValue VALUES contactformmessage I will answer the mail as soon as I can INSERT INTO be Settings SettingName SettingValue VALUES contactthankmessage Thank you The message was sent INSERT INTO be Settings SettingName SettingValue VALUES culture Auto INSERT INTO be Settings SettingName SettingValue VALUES dayscommentsareenabled 0 INSERT INTO be Settings SettingName SettingValue VALUES description Short description of the blog INSERT INTO be Settings SettingName SettingValue VALUES displaycommentsonrecentposts True INSERT INTO be Settings SettingName SettingValue VALUES displayratingsonrecentposts True INSERT INTO be Settings SettingName SettingValue VALUES email user example com INSERT INTO be Settings SettingName SettingValue VALUES emailsubjectprefix Weblog INSERT INTO be Settings SettingName SettingValue VALUES enablecommentsearch True INSERT INTO be Settings SettingName SettingValue VALUES enablecommentsmoderation False INSERT INTO be Settings SettingName SettingValue VALUES enablecontactattachments True INSERT INTO be Settings SettingName SettingValue VALUES enablecountryincomments True INSERT INTO be Settings SettingName SettingValue VALUES enablehttpcompression True INSERT INTO be Settings SettingName SettingValue VALUES enableopensearch True INSERT INTO be Settings SettingName SettingValue VALUES enablepingbackreceive True INSERT INTO be Settings SettingName SettingValue VALUES enablepingbacksend True INSERT INTO be Settings SettingName SettingValue VALUES enablerating True INSERT INTO be Settings SettingName SettingValue VALUES enablereferrertracking False INSERT INTO be Settings SettingName SettingValue VALUES enablerelatedposts True INSERT INTO be Settings SettingName SettingValue VALUES enablessl False INSERT INTO be Settings SettingName SettingValue VALUES enabletrackbackreceive True INSERT INTO be Settings SettingName SettingValue VALUES enabletrackbacksend True INSERT INTO be Settings SettingName SettingValue VALUES endorsement http www dotnetblogengine net syndication axd INSERT INTO be Settings SettingName SettingValue VALUES fileextension aspx INSERT INTO be Settings SettingName SettingValue VALUES geocodinglatitude 0 INSERT INTO be Settings SettingName SettingValue VALUES geocodinglongitude 0 INSERT INTO be Settings SettingName SettingValue VALUES handlewwwsubdomain INSERT INTO be Settings SettingName SettingValue VALUES iscocommentenabled False INSERT INTO be Settings SettingName SettingValue VALUES iscommentsenabled True INSERT INTO be Settings SettingName SettingValue VALUES language en GB INSERT INTO be Settings SettingName SettingValue VALUES mobiletheme Mobile INSERT INTO be Settings SettingName SettingValue VALUES name Name of the blog INSERT INTO be Settings SettingName SettingValue VALUES numberofrecentcomments 10 INSERT INTO be Settings SettingName SettingValue VALUES numberofrecentposts 10 INSERT INTO be Settings SettingName SettingValue VALUES postsperfeed 10 INSERT INTO be Settings SettingName SettingValue VALUES postsperpage 10 INSERT INTO be Settings SettingName SettingValue VALUES removewhitespaceinstylesheets True INSERT INTO be Settings SettingName SettingValue VALUES searchbuttontext Search INSERT INTO be Settings SettingName SettingValue VALUES searchcommentlabeltext Include comments in search INSERT INTO be Settings SettingName SettingValue VALUES searchdefaulttext Enter search term INSERT INTO be Settings SettingName SettingValue VALUES sendmailoncomment True INSERT INTO be Settings SettingName SettingValue VALUES showdescriptioninpostlist False INSERT INTO be Settings SettingName SettingValue VALUES showlivepreview True INSERT INTO be Settings SettingName SettingValue VALUES showpostnavigation True INSERT INTO be Settings SettingName SettingValue VALUES smtppassword password INSERT INTO be Settings SettingName SettingValue VALUES smtpserver mail example dk INSERT INTO be Settings SettingName SettingValue VALUES smtpserverport 25 INSERT INTO be Settings SettingName SettingValue VALUES smtpusername user example com INSERT INTO be Settings SettingName SettingValue VALUES storagelocation App Data INSERT INTO be Settings SettingName SettingValue VALUES syndicationformat Rss INSERT INTO be Settings SettingName SettingValue VALUES theme Standard INSERT INTO be Settings SettingName SettingValue VALUES timestamppostlinks True INSERT INTO be Settings SettingName SettingValue VALUES timezone 5 INSERT INTO be Settings SettingName SettingValue VALUES trackingscript INSERT INTO be PingService Link VALUES http rpc technorati com rpc ping INSERT INTO be PingService Link VALUES http rpc pingomatic com rpc2 INSERT INTO be PingService Link VALUES http ping feedburner com INSERT INTO be PingService Link VALUES http www bloglines com ping INSERT INTO be PingService Link VALUES http services newsgator com ngws xmlrpcping aspx INSERT INTO be PingService Link VALUES http api my yahoo com rpc2 INSERT INTO be PingService Link VALUES http blogsearch google com ping RPC2 INSERT INTO be PingService Link VALUES http rpc pingthesemanticweb com INSERT INTO be StopWords StopWord VALUES a INSERT INTO be StopWords StopWord VALUES about INSERT INTO be StopWords StopWord VALUES actually INSERT INTO be StopWords StopWord VALUES add INSERT INTO be StopWords StopWord VALUES after INSERT INTO be StopWords StopWord VALUES all INSERT INTO be StopWords StopWord VALUES almost INSERT INTO be StopWords StopWord VALUES along INSERT INTO be StopWords StopWord VALUES also INSERT INTO be StopWords StopWord VALUES an INSERT INTO be StopWords StopWord VALUES and INSERT INTO

    Original URL path: http://blog.bennymichielsen.be/wp-content/uploads/2008/8/MSSQL2000_Setup1.4.5.0.sql.txt (2016-04-29)
    Open archived version from archive



  •