Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo+Hibernate] IAction: the chosen operation is currently not available
[Teneo+Hibernate] IAction: the chosen operation is currently not available [message #605274] Sat, 05 May 2007 09:25
Eclipse UserFriend
Originally posted by: nospam.eric.gmail.com

Hi,

I try to use Teneo in combination w/ Hibernate but I face some problems when
writing some test code involving Teneo and Hibernate in the run method of an
IAction. When running the application, I get a dialog box w/ the message
"The chosen operation is currently not available".

Could someone help me finding out what's wrong in the following piece of
code which prevent me from getting the job done when I click on the button
associated w/ the action?

Many thanks,

Eric


public void run(final IAction action) {


String dataStoreName;


dataStoreName = "LibraryDataStore";


HbDataStore dataStore;


dataStore = HbHelper.INSTANCE.createRegisterDataStore(dataStoreName);

dataStore.setEPackages(new EPackage[] { RezeptePackage.eINSTANCE });

dataStore.initialize();


SessionFactory sessionFactory;


sessionFactory = dataStore.getSessionFactory();


Session session;


session = sessionFactory.openSession();

session.beginTransaction();


Recipe recipe;


recipe = RezepteFactory.eINSTANCE.createRecipe();

recipe.setName("Chocolat");

session.save(recipe);


session.getTransaction().commit();

session.close();


dataStore.close();


}
Previous Topic:[Teneo] PersistenceMappingBuilder error
Next Topic:[Teneo+Hibernate] IAction: the chosen operation is currently not available
Goto Forum:
  


Current Time: Thu Sep 26 14:22:02 GMT 2024

Powered by FUDForum. Page generated in 0.06953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top