.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Hibernate factory initialization

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :ASP.Net
Hi,   1. Could you please tell me where I could initialize (in the mvc code) the hibernate factory?Thanks!

View Complete Post

More Related Resource Links

Abstract Factory Design in C# , Vb.NET

Provide an interface for creating families of related or dependent objects without specifying their concrete classes

Factory Pattern in asp.net

The job of the Factory design pattern is to create concrete sub classes. You can see the Factory design pattern used throughout the .NET Framework.

The essence of the Factory Pattern is to "Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses." Factory methods encapsulate the creation of objects. This can be useful if the creation process is very complex, for example if it depends on settings in configuration files or on user input.

The Factory Design Pattern

Software architects generally think in terms of high-level abstractions rather than low-level programming details. Representing a system in terms of high-level abstractions promotes understanding of the system and reduces its perceived complexity. One such set of abstractions is software design patterns. They have been successfully applied in the past to simplify and solve recurring problems in software design.

Abstract Factory Design Pattern (Sample in C# and VB .NET)

An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation. In order to avoid duplicating the decision making everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.

Abstract Factory Pattern-Creational Patterns

The Factory pattern allowed us to decouple our client from an object which it uses. The Abstract Factory pattern extends this idea to manage separate families of objects.

A runtime selection, or configuration option, in our client could decide which family of objects is to be used. The Abstract Factory pattern allows us to write generic code to instantiate and use the family objects regardless of which family is chosen at runtime. The pattern also helps us enforce a rule where objects from just the chosen family are used uniformly by the client.

Service Station: Web Service Software Factory Modeling Edition


Web Service Software Factory: Modeling Edition is a collection of resources for modeling and building Web services for Windows Communication Foundation and ASMX.

Gerardo de Geest and Gerben van Loon

MSDN Magazine Launch 2008

Extreme ASP.NET: Web Client Software Factory


The Web Service Software Factory is designed to provide guidance and enhanced tools for building Web services using ASMX or WCF.

Fritz Onion

MSDN Magazine August 2007

Service Station: The Service Factory for WCF


This month Aaron Skonnard continues his exploration of software factories with a look at the Web Service Software Factory for Windows Communication Foundation.

Aaron Skonnard

MSDN Magazine February 2007

Service Station: Web Service Software Factory


Web Service Software Factory is designed to help you build Web service solutions that follow known architecture and design patterns, as Aaron Skonnard explains here.

Aaron Skonnard

MSDN Magazine December 2006

OWC11.Spreadsheet.11 - Retrieving the COM class factory for component with CLSID {} failed due to th

We have a web application (C#) which uses OWC11.Spreadsheet.11 to create excel files. This application works fine on XP 32bit, Windows 2003 server 32 bit versions. Recently we moved our application to a Windows 2008 web server 64bit machine. Now when we run the appication and call the functionality generate the Excel files which uses OWC11.Spreadsheet.11 it throws the following error.Retrieving the COM class factory for component with CLSID {0002E559-0000-0000-C000-000000000046} failed due to the following error: 80040154.In the code we use this library as follows using Microsoft.Office.Interop.Owc11; SpreadsheetClass xlsheet = new SpreadsheetClass();We have registered the Microsoft.Office.Interop.Owc11.dll in the global assembly cash as we have done in 2003 server.  We also tried running owc11.exe to insall all office 2003 web components.Can anyone help us to sort this issue.Thanks in advance.Sam

DataContractSerializer deserialization puzzle - by-pass member initialization.

Hi, I was using WCF and during the transmission of a object, of the type Book, see code below, the deserialization process throws a NullReferenceException. To isolate the problem, I uses a unit test like this rather than involving the full blown WCF marshalling. This appears to be solely a serialization/deserialization problem and has nothing to do with the communication issues in WCF. [Test] public void TestSerializeAndDeserializeBook() {     Book book = new Book( "Testing Serialization and Deserialization",                         new Person( 100, "Tom", "Smith" ),                         new Person( 101, "Peter", "Pan" ) );     DataContractSerializer ser = new DataContractSerializer( typeof(Book) );     using( Stream stm = new MemoryStream() )     {         ser.WriteObject( stm, book );         stm.Seek( 0, SeekOrigin.Begin );         Book regen = ser.ReadObject( stm ) as Book; // NullReferenceException here     &nb

Java Hibernate and OLAP(SSAS)

I am trying to create hibernate connection using olap4j driver I am getting this error- java.lang.IllegalAccessException: Class org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection can not access a member of class org.olap4j.driver.xmla.XmlaOlap4jDriver with modifiers "protected"     at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)     at java.lang.Class.newInstance0(Class.java:349)     at java.lang.Class.newInstance(Class.java:308)     at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:205)     at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)     at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)     at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:72)     at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnectionFactory.createConnection(JDBCConnectionFactory.java:53)     at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)     at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Connectio

Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'

Hi, I'm using REST WCF3.5. In my .svc file, the Factory attribute is giving me Warning in the Visual Studio Team Suite saying "Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'." <%@ ServiceHost Language="C#" Debug="true" Service="RestService" CodeBehind="~/App_Code/RestService.cs" Factory="AppServiceHostFactory" %> using System; using System.ServiceModel; using System.ServiceModel.Activation; using Microsoft.ServiceModel.Web; class AppServiceHostFactory : ServiceHostFactory {  protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)  {   WebServiceHost2 host = new WebServiceHost2(serviceType, true, baseAddresses);                 // Add the basic authenticator interceptor   host.Interceptors.Add(new BasicAuthenticationInterceptor(    System.Web.Security.Membership.Provider, "foo"));   return host;  } } I've added the reference as well & Everything works fine but I was wondering why am I getting this warning?? Thanks!  

Problem with DCOM Initialization - 80070005

Hi,   I have a problem with communication with a DCOM object   I have the following architecture. 3 computers in the same domain let's call it MyDomain on the first  computer i have an application installed which has a DCOM component for some data operation on the second Computer i have Microsoft Dynamics CRM 4.0 installed which call the DCOM interface through a webservice rhich runs under the CRM App Pool. The app pool runs unde the domain admin account. On this computer i have registered the com TLB file using regtlibv12 and on the computer with the DCOM component i gave rights to the domain admin to be able to call and initialize the dcom component remotely Everything work fine when i call the dcom component from the CRM web interface on the computer where CRM is installed. But when i try to call the component accesing the CRM interface from a different computer it fails with the error from the title   Here is how i initialize the DCOM component   Type objectType = Type.GetTypeFromCLSID(new Guid(mentorClassId), mentorServer, true);     objectServer = Activator.CreateInstance(objectType) as IObjectServer; IObjectServer is the interface exposed by the DCOM. The first line works well in both cases , but the application crashes at the second line when the call is done from outside the web machine, using the CRM interface.   Could any

NET Framework Initialization Error: C:\WINDOWS\Microsoft.NET\Framework|v2.050727\mscorwks.dll could

After making a full restore, i can not open some applications (Microsoft Office 2003, Intuit Quickbook POS). Once i try to open them it shows me the following message: NET Framework Initialization Error: C:\WINDOWS\Microsoft.NET\Framework|v2.050727\mscorwks.dll could not be loaded.   However it does let me open several others such as Microsoft Works, etc, etc.

MS-JDBC / Hibernate / JDBC Type 9 (NVARCAHR)

We are using MS-JDBC v3.0 against SQL 2008 but getting the following error from java/hibernate: 2010-08-11 19:35:35,193 DEBUG [com.example.test.Test] - No Dialect mapping for JDBC type: -9 org.hibernate.MappingException: No Dialect mapping for JDBC type: -9     at org.hibernate.dialect.TypeNames.get(TypeNames.java:79)     at org.hibernate.dialect.TypeNames.get(TypeNames.java:104)     at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:393)     at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:582) . . . The only work around we find is to provide a custom extension of the sqlDialect. Is this really needed ?

SQL Server not starting - FallBack certificate initialization failed

I can not start my SqlServer 2008 Express. The problem seemed to start when I changed my "Built In account, Log in as" from Local Service to Local System. If I try to change back to Local Service I get the messagebox with WMI Provider Error, "Cannot find object or property. [0x80092004]". Getting a bit confused, but read http://support.microsoft.com/kb/900497    mentioned about  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\SuperSocketNetLib, Value name: Certificate, Type: REG_SZ not having a valid value then 2005 would not starte - my value is blank. Changing it to 0 did not work.How can I import a valid certificate using SQL Server Configuration Manager. And how do you turn off Forced Encryption? Not sure if this would fix it, but couldn't hurt.====================================== 2009-03-08 01:39:06.01 Server      Error: 17190, Severity: 16, State: 1.2009-03-08 01:39:06.01 Server      FallBack certificate initialization failed with error code: 1.2009-03-08 01:39:06.01 Server      Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.2009-03-08 01:39:06.01 Server      Error: 17182, Severity: 16, State: 1.2009-03-08 01:39:06.01 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to i
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend