Search Results

Search found 64 results on 3 pages for 'omer bach'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • GAE transaction exception suggestion

    - by bach
    Hi, The current situation encourages the design of the system to split object fields to seperate objects in order to reduce the chance of the JDOCanRetryException to be thrown. If we could have the fields that were changed by the other client who changed the object in the exception content itself we could deside whether to re-retrieve the object or ignore...

    Read the article

  • GAE update different fields of the same entity

    - by bach
    Hi, UserA and UserB are changing objectA.filedA objectA.filedB respectively and at the same time. Because they are not changing the same field one might think that there are no overlaps. Is that true? or the implementation of pm.makePersistnace() actually override the whole object... good to know...

    Read the article

  • C++ iterator and const_iterator problem for own container class

    - by BaCh
    Hi there, I'm writing an own container class and have run into a problem I can't get my head around. Here's the bare-bone sample that shows the problem. It consists of a container class and two test classes: one test class using a std:vector which compiles nicely and the second test class which tries to use my own container class in exact the same way but fails miserably to compile. #include <vector> #include <algorithm> #include <iterator> using namespace std; template <typename T> class MyContainer { public: class iterator { public: typedef iterator self_type; inline iterator() { } }; class const_iterator { public: typedef const_iterator self_type; inline const_iterator() { } }; iterator begin() { return iterator(); } const_iterator begin() const { return const_iterator(); } }; // This one compiles ok, using std::vector class TestClassVector { public: void test() { vector<int>::const_iterator I=myc.begin(); } private: vector<int> myc; }; // this one fails to compile. Why? class TestClassMyContainer { public: void test(){ MyContainer<int>::const_iterator I=myc.begin(); } private: MyContainer<int> myc; }; int main(int argc, char ** argv) { return 0; } gcc tells me: test2.C: In member function ‘void TestClassMyContainer::test()’: test2.C:51: error: conversion from ‘MyContainer::iterator’ to non-scalar type ‘MyContainer::const_iterator’ requested I'm not sure where and why the compiler wants to convert an iterator to a const_iterator for my own class but not for the STL vector class. What am I doing wrong?

    Read the article

  • In c++ is there any Events/delegates/interfaces/notifications! anything?

    - by Bach
    Say i have these classes ViewA and ViewB In objective C using the delegate pattern I could do @protocol ViewBDelegate{ - (void) doSomething(); } then in ViewB interface: id<ViewBDelegate> delegate; then in ViewA implementation i set the delegate: viewB.delegate = self; and now I can call in doSomething from viewB onto any that unknown type delegate. [delegate doSomething]; "C++ How to Program" has been the worse read an can't find simple examples that demonstrates basic design patterns. What i'm looking for in C++ is: events ActionScript and java either delegates or notifications in Objective C anything that allows class A, Class B and Class C to know that ClassX didSomething()!!! thanks

    Read the article

  • links for 2011-03-17

    - by Bob Rhubart
    Siba Prasad: Oracle Database on Amazon RDSg Siba Prasad share an analysis of the pros and cons. (tags: oracle database cloud amazon) LIVE WEBCAST March 24 2pm PT- Why Switch from Red Hat and SUSE Linux to Oracle Linux? (Oracle's Linux Blog) Featuring Oracle's Monica Kumar, Sr.Director of Linux, Oracle VM and MySQL and Avi Miller, Principal Sales Consultant, Linux and Virtualization. (tags: oracle linux) Webcast: IBM SOA vs. Oracle SOA, March 24, 1pm ET / 10am PT Maneesh Joshi and Bruce Tierney guide you to a solid understanding of the differences between the Oracle and IBM approach to comprehensive SOA. (tags: oracle soa bpm) Finding the Right Solution to Source and Manage Your Contractors (PeopleSoft Apps Strategy) "Talent has become a primary competitive advantage for most organizations. Contingent labor offers talent on flexible terms; it offers the ability to scale up operations, close skill gaps, and manage risk in the process of delivering services." - Mark Rosenberg (tags: oracle peoplesoft enterprisearchitecture) Oracle Business Intelligence Customers: Have Your Voice Heard in the "2011Wisdom of the Crowds Business Intelligence Market Survey" (BI & Analytics Pulse) "The Wisdom of the Crowds survey combines social media, crowd sourcing, and good old fashioned market research to provide vendors and customers alike an unvarnished and insightful snap shot of what's top of mind with business intelligence professionals." (tags: oracle businessintelligence) Martin Bach: Troubleshooting Grid Infrastructure startup Martin Bach hunts down the problem that caused one of his blades to reboot after an EXT3 journal error. (tags: oracle grid rac) Oracle WebCenter: Social Networking & Collaboration (Oracle Enterprise 2.0 Blog) Kelley Ruppel with information on "how the new release of Oracle WebCenter provides unprecedented Social Networking and Collaboration." (tags: oracle webcenter enterprise2.0 collaboration) VirtaThon: 100% Virtual Java/Oracle/MySQL Conference! | Bex Huff "The goal is simple," says Oracle ACE Director Bex Huff. "Because it's all online, the conference is very cheap. Pricing is not yet announced... but it should be around $300. Also, unlike other conferences, every speaker gets paid a small fee depending on the popularity of his or her session." (tags: oracle oracleace java mysqql) Griffiths Waite Blog: BPM 11g PS3 GW's Ian Heathcock shares a link to "a most interesting article on Oracle's recent release discussing the new features and how PS3 adds value  to the whole SOA message." (tags: oracle soa) The Buttso Blathers: Tutorial: JSF 2.0 and JPA 2.0 with WebLogic Server using NetBeans Should you take application architecture advice from a man named Buttso? In this case, yes. (tags: oracle jsf jpa weblogic) Setting-up a High Available Tuned SOA Environment Middleware Magic (tags: ping.fm) How to Configure Weblogic Messaging Bridge with JBoss Middleware Magic (tags: ping.fm Weblogic JBoss) Richard Veryard on Architecture: Emergent Architecture (tags: ping.fm entarch emergence)

    Read the article

  • Android Handler postDelayed executes twice

    - by Ömer Baykal
    When I use Handler and its postDelayed method, the run() method executes twice. Below is part of my code. Handler deneme = new Handler(); deneme.postDelayed(new Runnable() { @Override public void run() { randomOyna(); } }, 1000); where randomOyna is the method public void randomOyna() { Log.v("sonOlarak", "çalisti"); } I monitor the LogCat and see that "çalisti" entry is written twice, so that randomOyna is called twice. The task is scheduled truely, but executes both after 1 sec and 2 secs. Can you help me???

    Read the article

  • setup.iss file is not generated

    - by Omer Dagan
    I have a installshiled project which generates setup.exe file. I'd like to enable silent install by generating proper setup.iss file. I ran the following command: Setup.exe /r which lunched the installer, but it never created the setup.iss file. I looked in C:\Windows as the documentation suggested, as well as some other locations (local directory, program files etc.) Why isn't it created and how to fix? Thanks,

    Read the article

  • UITableView background customization strange behavior

    - by Omer
    Hi, There is a couple of hours that I'm trying to set a tableView background image. My controller is a subclass of UITableViewController, and I simply wrote this lines of code in ViewDidLoad method. UIImage *image = [UIImage imageNamed:@"home-portrait-iphone.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; self.tableView.backgroundView = imageView; Everything looks great on the simulator, I mean, I see my table and as background view, y can see the image. But when the app is running on the device (ipod touch), I get this error: Program received signal: “SIGABRT”. and the stack says: * -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00' and the exception is thrown in the assignment, a mean this line: self.tableView.backgroundView = imageView; any ideas? Thank you in advance.

    Read the article

  • Android: No icon for Notification

    - by Omer
    Hello, I wanted to create a notification without the icon in the status bar (the state that is not expanded). I tried the custom expanded view and set the icon for this view only. But it did not work. When I give 0 as icon to the constructor, the icon disappears but notification also does not appear in the expanded view. Notification notification = new Notification(0, "", 0); I tried a lot of combinations but didn't come out with a solution. By the way, I know it is working because I saw this feature in some apps. Thanks.

    Read the article

  • NullPointerException while raise an embedded ldap server using spring

    - by omer c
    Hello, I'm trying to raise the Spring Embedded Ldap Server using: But I'm keep on getting this exception: 2010-06-10 14:33:35,559 ERROR main ApacheDSContainer start - Server startup failed java.lang.NullPointerException at org.apache.directory.server.core.schema.DefaultSchemaService.initialize(DefaultSchemaService.java:382) at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1425) at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:907) at org.springframework.security.ldap.server.ApacheDSContainer.start(ApacheDSContainer.java:160) at org.springframework.security.ldap.server.ApacheDSContainer.afterPropertiesSet(ApacheDSContainer.java:113) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4212) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) I'm using spring 3.0.2 and added the following jars for the ldap: spring-security-ldap-3.0.2.RELEASE.jar spring-ldap-1.3.0.RELEASE-all.jar apacheds-all-1.5.6.jar shared-ldap-0.9.15.jar slf4j-api-1.5.6.jar slf4j-simple-1.5.6.jar Help please....

    Read the article

  • Getting Tap/Touch Position when selecting a TableView cell

    - by Omer
    Hi, hope to get some help here because this is something that really makes me mad... I have a view with a tableView, and when I tap a cell I want to present a popOver window pointing the arrow to the cell I tapped. the things that I think I need is: 1- the position of the cell in the screen (not in the view, because on large tables the Y value of the cell's rect could be grater than screen hight) or 2- a CGPoint or something similar that represents the point in the screen I tapped. I can't figured this out, and makes me really mad!!! Any help will very very very very usefull. Have a nice day.

    Read the article

  • How to add Points and Markers Dynamically to Google Maps from JSF

    - by Omer
    I have an app in J2EE with a couple of projects. Got my .war project that communicates with a EJB business project which has access to some Data. I have an entity which has some information about places, and I want to show a collection of those places in a single map on a JSF page. I have a Collection of coordinates to be assigned as points on a polyline in Google maps, and I've got this collection as a return of a java function of the jsf page, but I dont know how to get this collection from jsf and then how to make the map work I'll be very greatful if someone can give me some jsf code as an example. (and if someone knows how to set the autoReshape attribute for maps in jsf using javascript, please tell me the secret!!!!) Thanks a lot.

    Read the article

  • How to automate MS Outlook

    - by Omer Akhter
    I have to generate an email at end of the day (daily-status) which is templated. I have add tasks to different list and on the top, I have to have count of these tasks such as: X Tasks: 2 of 5 Y Tasks: 3 of 5 X Tasks: X Task 1 X Task 2 Y Tasks: Y Task 1 Y Task 2 Y Task 3 I don't want write code in .NET etc. Is there anyway to script outlook to update numbers above when I change the list contents automatically. Or even better, if an input box can take input for each list contents and generate the email

    Read the article

  • PHP/Java Bridge - Access Java objects in PHP

    - by Omer Hassan
    I have a Red5 application which defines some public Java methods. When I start the server, an object of the application class gets created. I am trying to call the public methods of the application class from PHP using the existing instance of the Java application class. So here's my Java application: public class App extends org.red5.server.adapter.ApplicationAdapter { public boolean appStart(IScope app) { // This method gets called when the application starts // and an object of this App class is created. return true; } // This is the method I would like to call from PHP. public void f() { } } From PHP, I would like to get access to the App object that is created and call the method f() on it. I have tried playing around with this thing called "context". So in the Java method App.appStart(), I did this: // Save a reference to this App object to be retrieved later in PHP. new PhpScriptContextFactory().getContext().put("x", this); And in PHP, I tried to access the saved object like this: require_once("http://localhost:5080/JavaBridge/java/Java.inc"); var_dump(java_is_null(java_context()->get("x"))); Unfortunately, the java_is_null() function in PHP returns true. I also tried saving the App object in a static variable of App class but when I access that variable in PHP, its value is null.

    Read the article

  • Hibernate+PostgreSQL throws JDBCConnectionException: Cannot open connection

    - by Omer Salmanoglu
    false true auto thread org.postgresql.Driver 1234 jdbc:postgresql://localhost/postgres postgres public org.hibernate.dialect.PostgreSQLDialect false true org.hibernate.transaction.JDBCTransactionFactory false false false false 100 When I press "Save" button I get the following exception: javax.servlet.ServletException: org.hibernate.exception.JDBCConnectionException: Cannot open connection javax.faces.webapp.FacesServlet.service(FacesServlet.java:325) root cause javax.faces.el.EvaluationException: org.hibernate.exception.JDBCConnectionException: Cannot open connection javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) root cause org.hibernate.exception.JDBCConnectionException: Cannot open connection org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:98) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1463) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344) $Proxy108.beginTransaction(Unknown Source) com.yemex.beans.CompanyBean.saveOrUpdate(CompanyBean.java:52) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.apache.el.parser.AstValue.invoke(AstValue.java:196) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:312) root cause java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost/postgres java.sql.DriverManager.getConnection(Unknown Source) java.sql.DriverManager.getConnection(Unknown Source) org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133) org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1463) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344) $Proxy108.beginTransaction(Unknown Source) com.yemex.beans.CompanyBean.saveOrUpdate(CompanyBean.java:52) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.apache.el.parser.AstValue.invoke(AstValue.java:196) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)

    Read the article

  • Is it possible to implement a GC.GetAliveInstancesOf<T>() (for use in debugging)?

    - by Omer Raviv
    Hi, I know this was answered before, but I'd like to pose a somewhat different question. Is there any conceivable way to implement GC.GetAliveInstancesOf(), that can be evaluated in Visual Studio Debug Watch window? Sasha Goldstein shows one solution in this article, but it requires every class you want to query inherit from a specific base class. I'll emphasize that I only want to use this method during debugging, so I don't care that the GC may change an object's address in memory during runtime. One idea might be to somehow harness the !dumpheap –type command of SOS, and do some magic trick to create a temporary variable and have it point out to the memory address printed by SOS. Does anyone have a solution that works?

    Read the article

  • throws SecurityException when signing with the default debug keystore

    - by Omer
    I am receiving a SecurityException since yesterday when I launch the service using signature protection level for permission with the default debug keystore. The strange thing is I wasn't receiving this error before yesterday and I didn't make any security related change. On the other hand, my own keystore using for releases is still working good. Related AndroidManifest.xml part: <permission android:name="com.my.app.privateservices" android:protectionLevel="signature" /> <service android:name=".MyService" android:permission="com.my.app.privateservices" />

    Read the article

  • JDO difficulties in retrieving persistent vector

    - by Michael Omer
    I know there are already some posts regarding this subject, but although I tried using them as a reference, I am still stuck. I have a persistent class as follows: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class GameObject implements IMySerializable{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) protected Key m_databaseKey; @NotPersistent private final static int END_GAME_VAR = -1000; @Persistent(defaultFetchGroup = "true") protected GameObjectSet m_set; @Persistent protected int m_databaseType = IDatabaseAccess.TYPE_NONE; where GameObjectSet is: @PersistenceCapable(identityType = IdentityType.APPLICATION) @FetchGroup(name = "mySet", members = {@Persistent(name = "m_set")}) public class GameObjectSet { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private Vector<GameObjectSetPair> m_set; and GameObjectSetPair is: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class GameObjectSetPair { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; @Persistent private String key; @Persistent(defaultFetchGroup = "true") private GameObjectVar value; When I try to fetch the entire structure by fetching the GameObject, the set doesn't have any elements (they are all null) I tried adding the fetching group to the PM, but to no avail. This is my fetching code Vector<GameObject> ret = new Vector<GameObject>(); PersistenceManager pm = PMF.get().getPersistenceManager(); pm.getFetchPlan().setMaxFetchDepth(-1); pm.getFetchPlan().addGroup("mySet"); Query myQuery = pm.newQuery(GameObject.class); myQuery.setFilter("m_databaseType == objectType"); myQuery.declareParameters("int objectType"); try { List<GameObject> res = (List<GameObject>)myQuery.execute(objectType); ret = new Vector<GameObject>(res); for (int i = 0; i < ret.size(); i++) { ret.elementAt(i).getSet(); ret.elementAt(i).getSet().touchSet(); } } catch (Exception e) { } finally { pm.close(); } Does anyone have any idea? Thanks Mike

    Read the article

  • In native C++, how does one use a SqlCe .sdf database?

    - by Omer Sabic
    Is there a simple way, without .NET? I've found some libraries but none for SqlCe 3.5. There is http://sqlcehelper.codeplex.com/ but it's far from done, since a major feature like using a password is not yet implemented. I've looked at the source and it uses OLEdb to handle the database. The offical Microsoft Northwind example (that is shipped with SQL Compact 3.1, but not with 3.5) also doesn't work, I've tried setting it up with no success. Actually I don't have a sample working code. Was anyone able to set it up paired with a passworded .sdf? What are the alternatives? Thanks.

    Read the article

  • Configurable Values in Enum

    - by Omer Akhter
    I often use this design in my code to maintain configurable values. Consider this code: public enum Options { REGEX_STRING("Some Regex"), REGEX_PATTERN(Pattern.compile(REGEX_STRING.getString()), false), THREAD_COUNT(2), OPTIONS_PATH("options.config", false), DEBUG(true), ALWAYS_SAVE_OPTIONS(true), THREAD_WAIT_MILLIS(1000); Object value; boolean saveValue = true; private Options(Object value) { this.value = value; } private Options(Object value, boolean saveValue) { this.value = value; this.saveValue = saveValue; } public void setValue(Object value) { this.value = value; } public Object getValue() { return value; } public String getString() { return value.toString(); } public boolean getBoolean() { Boolean booleanValue = (value instanceof Boolean) ? (Boolean) value : null; if (value == null) { try { booleanValue = Boolean.valueOf(value.toString()); } catch (Throwable t) { } } // We want a NullPointerException here return booleanValue.booleanValue(); } public int getInteger() { Integer integerValue = (value instanceof Number) ? ((Number) value).intValue() : null; if (integerValue == null) { try { integerValue = Integer.valueOf(value.toString()); } catch (Throwable t) { } } return integerValue.intValue(); } public float getFloat() { Float floatValue = (value instanceof Number) ? ((Number) value).floatValue() : null; if (floatValue == null) { try { floatValue = Float.valueOf(value.toString()); } catch (Throwable t) { } } return floatValue.floatValue(); } public static void saveToFile(String path) throws IOException { FileWriter fw = new FileWriter(path); Properties properties = new Properties(); for (Options option : Options.values()) { if (option.saveValue) { properties.setProperty(option.name(), option.getString()); } } if (DEBUG.getBoolean()) { properties.list(System.out); } properties.store(fw, null); } public static void loadFromFile(String path) throws IOException { FileReader fr = new FileReader(path); Properties properties = new Properties(); properties.load(fr); if (DEBUG.getBoolean()) { properties.list(System.out); } Object value = null; for (Options option : Options.values()) { if (option.saveValue) { Class<?> clazz = option.value.getClass(); try { if (String.class.equals(clazz)) { value = properties.getProperty(option.name()); } else { value = clazz.getConstructor(String.class).newInstance(properties.getProperty(option.name())); } } catch (NoSuchMethodException ex) { Debug.log(ex); } catch (InstantiationException ex) { Debug.log(ex); } catch (IllegalAccessException ex) { Debug.log(ex); } catch (IllegalArgumentException ex) { Debug.log(ex); } catch (InvocationTargetException ex) { Debug.log(ex); } if (value != null) { option.setValue(value); } } } } } This way, I can save and retrieve values from files easily. The problem is that I don't want to repeat this code everywhere. Like as we know, enums can't be extended; so wherever I use this, I have to put all these methods there. I want only to declare the values and that if they should be persisted. No method definitions each time; any ideas?

    Read the article

  • How is "Make Object ID" implemented in the .NET debugger?

    - by Omer Raviv
    Hi, I would like know how this feature is implemented in VS - I understand it holds some sort of weak-reference to the object in the debugged-application's memory, but how exactly is it accomplished? I know simply tracking the address (as in native code) wouldn't work, because the GC might move the object about, invalidating the address. Thanks.

    Read the article

  • Which is the best Linux C/C++ debugger (or front-end to gdb) to help teaching programming?

    - by omer.gimenez
    I teach a sort of "lite" C++ programming course to novices ("lite" meaning no pointers, no classes, just plain old C, plus references and STL string and vectors). Students have no previous experience in programming, so I believe that using an interactive debugger would help them understand program flow, variables, and recursion. The course is taught in Linux. Teaching them to use gdb is just overkill (they will not use nor understand most features). I just need something simple but easy to use: to see at which line the program is now, what is in the stack (local variables, previous calls, etc.). I look something similar to old Turbo Pascal or Turbo C++ Borland's debugger, or Visual Studio debugger. Thank you,

    Read the article

< Previous Page | 1 2 3  | Next Page >