The following comment has been added to this issue:
Author: James Carman
Created: Mon, 28 Jun 2004 2:57 PM
Body:
I HOPE you're not trying to implement some sort of "stateful" service. That's
a bad idea. Are the service implementation objects inherently unpoolable, even
if you implement the PoolManageable interface?
If you REALLY need this sort of functionality, you can implement it yourself
without having to create some special service model. All you have to do is
allow your service to be a wrapper for a "logic bean", similar to how people
suggest we develop EJBs. I don't know if it's officially a design pattern or
what the name of it is, but it's easy to implement. Inside one of your service
methods, instantiate the logic bean and use it. Once the method returns, the
logic bean is no more. This is essentially what the proxy object would do IF
there were a "new" service model. But, I agree with Howard on this one. The
question is WHY you need this sort of functionality. Hope that helps
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/HIVEMIND-14?page=comments#action_36400
---------------------------------------------------------------------
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 2:57 PM
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]