posted 10 years ago
Are you asking about Hibernate's SessionFactory class? You don't mention the ORM, so I'll assume this is about Hibernate. A SessionFactory is a factory object that supplies Sessions. Simple as that. Normally an application will have one instance of a SessionFactory, created with a configuration that is all the mapping files you have defined. A Session is a distinct object; it is not a "ready to use" SessionFactory. Have a read o fthe configuration section of the Hibernate documentation.