Python object proxying: how to access proxy January 10    1

I found this recipe to create a proxy class. I've used it to wrap a custom object and would like to overload certain properties and also attach new attributes to the proxy. However, when I call any method on the proxy (from within the proxy class), I

dynamic proxies with jmx can cause thread leaks January 10    1

I have a problem in Java where I set up a dynamic proxy with a JMX interface, pass this on to another component which then makes calls to the proxy object. When I do this, the application leaks two threads for each call, threads which never seem to t

Automatic Proxy Class January 10    2

Assume I have an interfaceclass I{ public: virtual void f(int id)=0; virtual void g(int id, float x)=0; } I need a proxy class, to do some sort of id to pointer mappingclass Proxy : I { I * i[5]; public: void f(int id) { i[id]->f(id); } void g(int id

pimpl to make template coding less cluttered January 10    1

I'm attempting to create a cleaner header file for reference/documentation of header classes while still recognizing the convenience of templates. So I've got a quick .h / .hpp file// mempool.h namespace internal { template<typename T,template<class

Need design advice for exclusive access to private class state January 10    2

I have a simple system I'm working on that involves serializing user objects. I have a series of specialized template classes that act on each type to be read/write differently:template<class T> class ItemSerializer; template<> class ItemSeria

Design decision conflict for methods in a class January 10    3

Ok I will try to explain this as much as possible. I have a class, say MyLib, the methods of which will be used by another class, say Consumer class. There is a public method called Navigate() in MyLib, which will be used by Consumer. This method sor

Is there a name for this type of design January 10    1

So I am writing a game (c#, xna), and was just wondering if there is a name for what I am doing. This isn't necessarily specific to Game Programming, or my game. But programming and encapsulation in general. Essentially I have two game objects, one (

How to match compiled class name to an enum member in Java January 10    5

In Java, with Sun's JDK 1.6, with an enum such as this:public enum MyEnum { FIRST_MEMBER { public void foo() { } }, SECOND_MEMBER { public void foo() { } }, THIRD_MEMBER { public void foo() { } }; } The compiled files are: MyEnum$1.class MyEnum$2.cla

What pattern applies to encapsulating contextual queries January 10

At the moment, my project at work has a very inefficient loop which is suffering the n + 1 problem to a great degree. (6n + 1, I think.) Currently, a number of web services instantiate an object whose constructor builds a canonical representation of

How to validate Hibernate mapping against database January 10    1

How to check that Hibernate mapping configuration matches database? I'd like know if I am using wrong version of hibernate mapping before I start executing update and queries, which then would fail.I have bunch of classes that have been mapped with H

Can a java method return value depending upon condition January 10    3

I have a ICoreClient interface and AClient and BClient classes implements this.ICoreClient is exposed for users. I need to add a new method in ICoreClient interface. So, it needs to be implemented in both clients. I can not make this method generic a

How can I add similar functionality to a number of methods in java January 10    6

I have a lot of methods for logging, like logSomeAction, logAnotherAction etc.Now I want all these methods make a small pause after printing messages (Thread.sleep).If I do it manually, I would do something like this://before: public static void logS

Call method from created jar file January 10

I created jar file using standart utulity jar. My jar contains single .class file, which code is listed below. I need to call method from this class. I found some instructions how to add jar for project in my IDE (i use Idea 14), but can't call a met

Storing web content in a JAR file January 10    5

Is it possible to store web content (such as JSPs, HTML, images, CSS etc) in a JAR file?I've been looking at various options at modularising our web applications and this is one possibility.We are currently using JSF and Facelets for our view technol

You Might Also Like