All Questions
8 questions
1
vote
1
answer
118
views
Is this a good and simple example for Singleton Pattern [closed]
This is a scenario where we keep a single instance(as in Singleton Pattern) to get the configuration of an application.
Below is the main class and i set values to the configuarion values here and ...
2
votes
1
answer
656
views
Composite implementation of a prototype singleton registry
I am studying design patterns and I've implemented a composite prototype pattern which is also a singleton (one instance per JVM). The main and most important part of the code is the ...
3
votes
2
answers
18k
views
Simple singleton database connection pool
I'm studying design patterns, and to demonstrate a singleton, I've implemented a primitive database connection pool.
ConnectionPool.java
...
-2
votes
1
answer
410
views
Enum Singleton implementation in Java
I just wanted to implement the enum singleton in java. Here is my implementation where I have tried to create a singleton DataSource instance:
...
3
votes
1
answer
363
views
(Y.E.S.E.J.) Yet Another Singleton with Enum in Java
I have a Java class which has to be generated only once for all the objects that I have - it is a small program. This singleton class holds a mapping of characters. I Googled stack overflow and found ...
5
votes
3
answers
7k
views
Design of a remoteControl class for connecting to electronic devices
In a course that I'm taking on learning object oriented programming in java, I have completed an assignment for modeling a home entertainment system and the ability for a user to be able to use a ...
2
votes
1
answer
245
views
Singleton has logic and state, and logic has state
------edit---------
note: this is for a MUD client, so the commands are issued to the MUD game server
-----end edit--------
For an overview, here's the structure of the project:
...
5
votes
1
answer
6k
views
Singleton class extending a parent class to utilise shared functionality
I have a singleton class which extends from an abstract java class. Two singleton classes extend from ItemImageThreadManager, the reason for this is to use shared ...