Tuesday, July 17, 2012

private static SessionFactory sessionFactory=buildSessionFactory();





private

static SessionFactory buildSessionFactory() {

try {




SessionFactory sessionFactory =


new Configuration()




.configure(


"/com/aises/test/hibernate.cfg.xml")


//.addResource("/com/aises/test/VillageInformationFormDetailsReplica.hbm.xml")



.buildSessionFactory();

return sessionFactory;



}

catch (Throwable ex) {




// Make sure you log the exception, as it might be swallowed




System.

err.println("Initial SessionFactory creation failed." + ex);


throw new ExceptionInInitializerError(ex);




}
}

public static SessionFactory getSessionFactory() {


return sessionFactory;




}

public static void shutdown() {




// Close caches and connection pools



getSessionFactory().close();
}

Tuesday, November 18, 2008

New Folder.exe (new)

Old New Folder.exe has the effect on the hidden files.
But in the new virus with same name has a property to make the files super hidden
i.e Hide the protected os files.

  • It will make Files super hidden
  • It will make the files as system files
  • It will make the files read only
so some extra efforts are needed with the normal New Folder.exe
read the procedure for New Folder.exe removal at New Folder.exe(old)
and read how to enable the hidden files manually at EnableHiddenFiles



Step 1

Remove the virus by any good anti virus like kaspersky, AVG,Avast.



Step 2

Now Fixing the superhidden open registry editor and navigate to the key

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
\Advanced\Folder\SuperHidden
And delete the Existing "CheckedValue" of the type "String" and create another one of the same name but of the type "DWORD" and set it's value to "1" Then open "My Computer" and go to: Tools> Folder Options> View> and select "Show hidden files and folders" and
Uncheck "Hide protected operating system files".



Step 3

Restart the computer



Step 4

Relax problem solved