Announcement Announcement Module
Collapse
No announcement yet.
Bean Configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean Configuration

    Hi,

    how can I configure the following dependencies with Spring?

    Code:
    Queue<String> queue = new ArrayBlockingQueue<String>(10);
    Alpha alpha = new Alpha(queue);
    Beta beta = new Beta(queue);
    Gateway gateway = new Gateway(alpha, beta);
    If I ask for a bean of type Gateway, Alpha and Beta should get the same instance of class Queue. (but no singleton!)

    ~Thomas
Working...
X