You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by hi...@jakarta.apache.org on 2004/06/28 19:04:57 UTC

[jira] Commented: (HIVEMIND-14) Add a new model named "new" to constuct the class

The following comment has been added to this issue:

     Author: Howard M. Lewis Ship
    Created: Mon, 28 Jun 2004 10:03 AM
       Body:
You can implement this yourself, today, by defining your own ServiceModel and ServiceModelFactory.

However, the call to getRegistry() would return the same instance ... invoking a method on that instance would, inside some form of proxy, create an instance of the service.

I would like to know *why* you feel you need this feature. What is your use case and why does the threaded and pooled service models not meet it?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-14?page=comments#action_36392

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-14

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-14
    Summary: Add a new model named "new" to constuct the class
       Type: New Feature

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: patofan

    Created: Mon, 28 Jun 2004 8:03 AM
    Updated: Mon, 28 Jun 2004 10:03 AM
Environment: window XP , JDK1.4.2

Description:
I need a "new model" feature to create new instance at each calling the service. 

For example as following :
   
/* XML configuration */

<service-point id="ERPOrder"     interface="test.Order" model="new">
<create-instance  class="test.OrderImpl"/>
</service-point>


/* java code */


import org.apache.hivemind.Registry;
import org.apache.hivemind.impl.RegistryBuilder;

public class Main
{

  public static void main(String[] args)
  {

    Registry registry =  RegistryBuilder.constructDefaultRegistry();

    test.Order order1 =
      (test.Order) registry.getService("ERPOrder", test.OrderImpl.class);


    test.Order order2 =
      (test.Order) registry.getService("ERPOrder", test.OrderImpl.class);


 /* I hope the result is " order1 is not equal to order2". */

    System.out.println( "result of order1 and order2 is " +     ( order1 != order2 ) ? "not equal" : "equal" );

  }
}





 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org