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/08/05 16:25:19 UTC

[jira] Created: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Message:

  A new issue has been created in JIRA.

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 7:24 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 8:45 AM
       Body:
Allowing the proxy to implement all interfaces of the implementing class is not a good idea.  You should code to the service interface.  What you can do in this situation is this...

public interface ILifecycle
{
  public void start();
  public void stop();
}

public interface IBusiness
{
  public void doSomething();
  public void doSomethingElese();
}

public interface IService extends IBusiness, ILifecycle
{
  // Add some methods here if you wish.
}

So, in your application you could use the service interface everywhere you needed to use both your business interface AND your lifecycle interface.  Your business logic need only know about your business interface.  This is what I do using EJBs so that I keep my remote interface in sync with my impl class without making my impl class implement the remote interface.  I introduce a superinterface that contains the business methods and have my impl class implement that and have the remote interface extend it.  
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37058

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 8:45 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 8:38 AM
       Body:
How do you propose to use these lifecycle interface methods in your application?  I'm thinking there may be a better way to structure this stuff.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37057

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 8:38 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 9:11 AM
       Body:
Sounds like a neat idea!  Maybe the multiple superinterfaces stuff was on the SCJD exam. ;-)  A lot of people don't know that one, actually.  Anyway, glad I could help.  Happy coding!  
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37060

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 9:11 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 10:06 AM
       Body:
I would say that this issue should be closed.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37062

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 10:06 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Zhengmao Hu
    Created: Thu, 5 Aug 2004 9:06 AM
       Body:
Thank you James! 
That's a great idea. It is a shame that I (as a SCJP) didn't know it is possible for an Interface to extends multiple super interfaces.

I am implementing an ApplicationContextService service, which has a method getApplicatoinContext() to return a Spring ApplicationContext. And it has a setConfigLocations() method to let location of configuration files to be set inside hivemodules.xml. And the lifecycle method restart() will call ApplicationContext's refresh() method to re-read configuration files.

Thank you again!
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37059

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 9:06 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Howard M. Lewis Ship
    Created: Thu, 5 Aug 2004 1:14 PM
       Body:
Note the best forum to discuss this, please go to the wiki.

I've been thinking in a different direction ... different services, different interfaces ... SAME implementation. Server A would define interface, interceptors and factory.  Service B  would defined interfaces, interceptors ... and reference service A.  Same exact instance.

This would allow a "composite" service to have multiple interfaces. It does post some problem w.r.t. service models (it doesn't make sense for threaded and pooled).
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37078

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 1:14 PM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Updated: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org>.
     [ https://issues.apache.org/jira/browse/HIVEMIND-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated HIVEMIND-39:
-----------------------------------------

    Assignee:     (was: Howard M. Lewis Ship)

> The ability to specify multiple interfaces of a service
> -------------------------------------------------------
>
>                 Key: HIVEMIND-39
>                 URL: https://issues.apache.org/jira/browse/HIVEMIND-39
>             Project: HiveMind
>          Issue Type: Wish
>          Components: framework
>    Affects Versions: 1.0
>            Reporter: Zhengmao Hu
>            Priority: Minor
>
> (Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)
> Currently, one service can only have one interface specifiled.
> Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
>     
> public ProxyBuilder(String type, ServicePoint point)
> {
>    ...
>    _classFab.addInterface(_serviceInterface);
>    ...
> }
> public void addServiceMethods(String indirection)
> {
>    ...
>    Method[] methods = _serviceInterface.getMethods();
>    for (int i = 0; i < methods.length; i++) ...
>    ...
> }
> Because of this behavior, if there is a class:
> class ServiceABImpl implements ServiceA, ServiceB
> This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.
> So, there is a wish, wish that more than one interfaces can be specified to one service.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Naresh Sikha
    Created: Thu, 5 Aug 2004 1:08 PM
       Body:
I've watched the question of multiple interfaces crop up many times now. Here's a relevant thread from the hivemind-user list:

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=hivemind-user@jakarta.apache.org&msgNo=56


---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37077

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 1:08 PM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


RE: [jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by James Carman <ja...@carmanconsulting.com>.
Could we change the <implementation> element to take a comma-separated list
of regular expressions for matching service-ids within the registry?  That
might help this situation (and another one that we recently discussed
involving contributing an interceptor to multiple services)...

<implementation service-id="ServiceA, ServiceB">
  <invoke-factory service-id="hivemind.BuilderFactory">
    <construct class="com.myco.ServiceABImpl" />
  </invoke-factory>
</implementation>

<implementation service-id="mymodule.*">
  <interceptor service-id="SecurityInterceptor" />
</implementation>

I think this could be done without breaking current module definition files,
since nobody was using the regular expressions before anyway.  

-----Original Message-----
From: hivemind-dev@jakarta.apache.org
[mailto:hivemind-dev@jakarta.apache.org] 
Sent: Thursday, August 05, 2004 1:35 PM
To: hivemind-dev@jakarta.apache.org
Subject: [jira] Commented: (HIVEMIND-39) The ability to specify multiple
interfaces of a service

The following comment has been added to this issue:

     Author: Christian Essl
    Created: Thu, 5 Aug 2004 10:34 AM
       Body:
The aggregate interface certainly solves the issues. However I think it
comes with two problems:

First you have to add a conceptual unnecessary interface, which increases
complexity and second you bind two things together just because of the
current implementation, which decreases flexibility.

My suggestion would be that an implementation can map to more than one
service, where the service represents one interface.

This would also come handy for interceptors. I.e. if you have a
SecurityInterceptor you would probably have different requirements for
live-cycle and business methods. If the interceptor does not support
(interface or method based) filtering you are lost, if it (certainly) does
you have higher setup needs and probably less performance. (IMO the same
applies to other interceptors as well). 

I think the current one to one mapping of service to implementations, breaks
a main reason interfaces exist in Java: That implementations (classes) can
represent different out of hierarchy types and where the user is shielded
from not only how (that could be done with abstract classes) but also where
the types are implemented.

---------------------------------------------------------------------
View this comment:
 
http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37063

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 10:34 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org
can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major"
interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can
only implement one interface, that makes the usage of this class/service
inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to
one service.


---------------------------------------------------------------------
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



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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Christian Essl
    Created: Thu, 5 Aug 2004 10:34 AM
       Body:
The aggregate interface certainly solves the issues. However I think it comes with two problems:

First you have to add a conceptual unnecessary interface, which increases complexity and second you bind two things together just because of the current implementation, which decreases flexibility.

My suggestion would be that an implementation can map to more than one service, where the service represents one interface.

This would also come handy for interceptors. I.e. if you have a SecurityInterceptor you would probably have different requirements for live-cycle and business methods. If the interceptor does not support (interface or method based) filtering you are lost, if it (certainly) does you have higher setup needs and probably less performance. (IMO the same applies to other interceptors as well). 

I think the current one to one mapping of service to implementations, breaks a main reason interfaces exist in Java: That implementations (classes) can represent different out of hierarchy types and where the user is shielded from not only how (that could be done with abstract classes) but also where the types are implemented.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37063

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 10:34 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


Re: contributing an interceptor to multiple services

Posted by Howard Lewis Ship <hl...@gmail.com>.
Might be related to EagerLoad, if any EagerLoad-ed service uses the
BuilderFactory. Otherwise, you'd get it when you invoke a service
method on any implementation constructed by the BuilderFactory.

On Fri, 6 Aug 2004 09:56:20 -0400, James Carman
<ja...@carmanconsulting.com> wrote:
> Oh, it throws the exception.  The exception is thrown when trying to build
> the registry.
> 
> 
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Friday, August 06, 2004 9:38 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: Re: contributing an interceptor to multiple services
> 
> This is something that needs looking into, because the code is
> supposed to fail with an exception, rather than endlessly recurse. I
> even have a test for this, which is why I'm confused that it can
> happen!
> 
> On Thu, 5 Aug 2004 21:53:10 -0400, James Carman
> <ja...@carmanconsulting.com> wrote:
> > Ok, I got it to do it.  All you need to do is this (in your own module)...
> >
> > <implementation service-id="hivemind.BuilderFactory">
> >   <interceptor service-id="hivemind.LoggingInterceptor" />
> > </implementation>
> >
> > This does cause a recursive problem.  It fails when you try to build a
> > registry, though, so you won't get too far with that sort of
> configuration.
> >
> >
> >
> > -----Original Message-----
> > From: Christian Essl [mailto:christianessl@yahoo.de]
> > Sent: Thursday, August 05, 2004 4:32 PM
> > To: hivemind-dev@jakarta.apache.org
> > Subject: Re: contributing an interceptor to multiple services
> >
> > James,
> >
> > At the danger that this has also been discussed before IMO the problem of
> > recursive calls as I see is as follows (maybe I take it too serious as IMO
> > Spring has sort of the same):
> >
> > An interceptor is created by an intercept able Service
> > (InterceptorFactory). The InterceptorFactory can be created again by an
> > intercept able Service (ServiceImplementationFactory). The interceptor
> > itself can use any intercept able service and each of this services can
> > use another intercept able service.
> >
> > So if you by mistake add the interceptor also to the InterceptorFactory or
> > the ServiceImplementationFactory you have a chicken-egg problem (which I
> > strongly guess will result in an Exception). But worse if you add the
> > interceptor to any of the direct or indirect services unconditional used
> > during the interception call (i.e. LoggingService) than you have an
> > endless loop, because the interceptor on the used service calls the
> > service again and by this way itself.
> >
> > What make it worse are modules. If you take care it is well possible that
> > your defined interceptor works until another module changes - than your
> > definition can be broken. IMO you would need full integration tests for
> > such a feature.
> >
> > As said probably I take the problem to serious, Spring (at least) had the
> > same, but in Spring it is easier to manage because there is not so much
> > indirection and you fully control all beans. Hivemind is just more
> > powerful than Spring that's why I like Hivemind more.
> >
> > On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org>
> > wrote:
> >
> > > The following comment has been added to this issue:
> > >
> > >      Author: James Carman
> > >     Created: Thu, 5 Aug 2004 12:06 PM
> > >        Body:
> > > I don't know if I understand how this feature causes any dangers.  It's
> > > true that an interceptor could be called multiple times on the same
> > > thread during one service method invocation (a service you're calling
> > > uses another service which also has the same interceptor applied).  I
> > > guess a service interceptor COULD be written to have some
> > > thread-specific state (using ThreadLocalStorage of course) and it might
> > > not manage that properly.  However, that can arise if you do it by
> > > copy/paste also, no?  I wouldn't say that this feature would CAUSE that
> > > problem, though.
> > > ---------------------------------------------------------------------
> > > View this comment:
> > >
> >
> http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
> > >
> > > ---------------------------------------------------------------------
> > > View the issue:
> > >   http://issues.apache.org/jira/browse/HIVEMIND-39
> > >
> > > Here is an overview of the issue:
> > > ---------------------------------------------------------------------
> > >         Key: HIVEMIND-39
> > >     Summary: The ability to specify multiple interfaces of a service
> > >        Type: Wish
> > >
> > >      Status: Open
> > >    Priority: Minor
> > >
> > >     Project: HiveMind
> > >  Components:
> > >              framework
> > >    Versions:
> > >              1.0
> > >
> > >    Assignee: Howard M. Lewis Ship
> > >    Reporter: Zhengmao Hu
> > >
> > >     Created: Thu, 5 Aug 2004 7:24 AM
> > >     Updated: Thu, 5 Aug 2004 12:06 PM
> > >
> > > Description:
> > > (Sorry, because sending email to
> > > hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so
> > > i post it here)
> > >
> > > Currently, one service can only have one interface specifiled.
> > >
> > > Inside ProxyBuilder.java, the proxy class built only implements this
> > > "major" interface. This behavior is coded as such:
> > >
> > > public ProxyBuilder(String type, ServicePoint point)
> > > {
> > >    ...
> > >    _classFab.addInterface(_serviceInterface);
> > >    ...
> > > }
> > >
> > > public void addServiceMethods(String indirection)
> > > {
> > >    ...
> > >    Method[] methods = _serviceInterface.getMethods();
> > >    for (int i = 0; i < methods.length; i++) ...
> > >    ...
> > > }
> > >
> > >
> > > Because of this behavior, if there is a class:
> > >
> > > class ServiceABImpl implements ServiceA, ServiceB
> > >
> > > This class will be wrapped inside a proxy class, but the proxy class can
> > > only implement one interface, that makes the usage of this class/service
> > > inconvienent.
> > >
> > > So, there is a wish, wish that more than one interfaces can be specified
> > > to one service.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> > >
> >
> > --
> > Christian Essl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> >
> >
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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


RE: contributing an interceptor to multiple services

Posted by James Carman <ja...@carmanconsulting.com>.
Oh, it throws the exception.  The exception is thrown when trying to build
the registry.

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Friday, August 06, 2004 9:38 AM
To: hivemind-dev@jakarta.apache.org
Subject: Re: contributing an interceptor to multiple services

This is something that needs looking into, because the code is
supposed to fail with an exception, rather than endlessly recurse. I
even have a test for this, which is why I'm confused that it can
happen!

On Thu, 5 Aug 2004 21:53:10 -0400, James Carman
<ja...@carmanconsulting.com> wrote:
> Ok, I got it to do it.  All you need to do is this (in your own module)...
> 
> <implementation service-id="hivemind.BuilderFactory">
>   <interceptor service-id="hivemind.LoggingInterceptor" />
> </implementation>
> 
> This does cause a recursive problem.  It fails when you try to build a
> registry, though, so you won't get too far with that sort of
configuration.
> 
> 
> 
> -----Original Message-----
> From: Christian Essl [mailto:christianessl@yahoo.de]
> Sent: Thursday, August 05, 2004 4:32 PM
> To: hivemind-dev@jakarta.apache.org
> Subject: Re: contributing an interceptor to multiple services
> 
> James,
> 
> At the danger that this has also been discussed before IMO the problem of
> recursive calls as I see is as follows (maybe I take it too serious as IMO
> Spring has sort of the same):
> 
> An interceptor is created by an intercept able Service
> (InterceptorFactory). The InterceptorFactory can be created again by an
> intercept able Service (ServiceImplementationFactory). The interceptor
> itself can use any intercept able service and each of this services can
> use another intercept able service.
> 
> So if you by mistake add the interceptor also to the InterceptorFactory or
> the ServiceImplementationFactory you have a chicken-egg problem (which I
> strongly guess will result in an Exception). But worse if you add the
> interceptor to any of the direct or indirect services unconditional used
> during the interception call (i.e. LoggingService) than you have an
> endless loop, because the interceptor on the used service calls the
> service again and by this way itself.
> 
> What make it worse are modules. If you take care it is well possible that
> your defined interceptor works until another module changes - than your
> definition can be broken. IMO you would need full integration tests for
> such a feature.
> 
> As said probably I take the problem to serious, Spring (at least) had the
> same, but in Spring it is easier to manage because there is not so much
> indirection and you fully control all beans. Hivemind is just more
> powerful than Spring that's why I like Hivemind more.
> 
> On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org>
> wrote:
> 
> > The following comment has been added to this issue:
> >
> >      Author: James Carman
> >     Created: Thu, 5 Aug 2004 12:06 PM
> >        Body:
> > I don't know if I understand how this feature causes any dangers.  It's
> > true that an interceptor could be called multiple times on the same
> > thread during one service method invocation (a service you're calling
> > uses another service which also has the same interceptor applied).  I
> > guess a service interceptor COULD be written to have some
> > thread-specific state (using ThreadLocalStorage of course) and it might
> > not manage that properly.  However, that can arise if you do it by
> > copy/paste also, no?  I wouldn't say that this feature would CAUSE that
> > problem, though.
> > ---------------------------------------------------------------------
> > View this comment:
> >
>
http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
> >
> > ---------------------------------------------------------------------
> > View the issue:
> >   http://issues.apache.org/jira/browse/HIVEMIND-39
> >
> > Here is an overview of the issue:
> > ---------------------------------------------------------------------
> >         Key: HIVEMIND-39
> >     Summary: The ability to specify multiple interfaces of a service
> >        Type: Wish
> >
> >      Status: Open
> >    Priority: Minor
> >
> >     Project: HiveMind
> >  Components:
> >              framework
> >    Versions:
> >              1.0
> >
> >    Assignee: Howard M. Lewis Ship
> >    Reporter: Zhengmao Hu
> >
> >     Created: Thu, 5 Aug 2004 7:24 AM
> >     Updated: Thu, 5 Aug 2004 12:06 PM
> >
> > Description:
> > (Sorry, because sending email to
> > hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so
> > i post it here)
> >
> > Currently, one service can only have one interface specifiled.
> >
> > Inside ProxyBuilder.java, the proxy class built only implements this
> > "major" interface. This behavior is coded as such:
> >
> > public ProxyBuilder(String type, ServicePoint point)
> > {
> >    ...
> >    _classFab.addInterface(_serviceInterface);
> >    ...
> > }
> >
> > public void addServiceMethods(String indirection)
> > {
> >    ...
> >    Method[] methods = _serviceInterface.getMethods();
> >    for (int i = 0; i < methods.length; i++) ...
> >    ...
> > }
> >
> >
> > Because of this behavior, if there is a class:
> >
> > class ServiceABImpl implements ServiceA, ServiceB
> >
> > This class will be wrapped inside a proxy class, but the proxy class can
> > only implement one interface, that makes the usage of this class/service
> > inconvienent.
> >
> > So, there is a wish, wish that more than one interfaces can be specified
> > to one service.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> 
> --
> Christian Essl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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



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


Re: contributing an interceptor to multiple services

Posted by Howard Lewis Ship <hl...@gmail.com>.
This is something that needs looking into, because the code is
supposed to fail with an exception, rather than endlessly recurse. I
even have a test for this, which is why I'm confused that it can
happen!

On Thu, 5 Aug 2004 21:53:10 -0400, James Carman
<ja...@carmanconsulting.com> wrote:
> Ok, I got it to do it.  All you need to do is this (in your own module)...
> 
> <implementation service-id="hivemind.BuilderFactory">
>   <interceptor service-id="hivemind.LoggingInterceptor" />
> </implementation>
> 
> This does cause a recursive problem.  It fails when you try to build a
> registry, though, so you won't get too far with that sort of configuration.
> 
> 
> 
> -----Original Message-----
> From: Christian Essl [mailto:christianessl@yahoo.de]
> Sent: Thursday, August 05, 2004 4:32 PM
> To: hivemind-dev@jakarta.apache.org
> Subject: Re: contributing an interceptor to multiple services
> 
> James,
> 
> At the danger that this has also been discussed before IMO the problem of
> recursive calls as I see is as follows (maybe I take it too serious as IMO
> Spring has sort of the same):
> 
> An interceptor is created by an intercept able Service
> (InterceptorFactory). The InterceptorFactory can be created again by an
> intercept able Service (ServiceImplementationFactory). The interceptor
> itself can use any intercept able service and each of this services can
> use another intercept able service.
> 
> So if you by mistake add the interceptor also to the InterceptorFactory or
> the ServiceImplementationFactory you have a chicken-egg problem (which I
> strongly guess will result in an Exception). But worse if you add the
> interceptor to any of the direct or indirect services unconditional used
> during the interception call (i.e. LoggingService) than you have an
> endless loop, because the interceptor on the used service calls the
> service again and by this way itself.
> 
> What make it worse are modules. If you take care it is well possible that
> your defined interceptor works until another module changes - than your
> definition can be broken. IMO you would need full integration tests for
> such a feature.
> 
> As said probably I take the problem to serious, Spring (at least) had the
> same, but in Spring it is easier to manage because there is not so much
> indirection and you fully control all beans. Hivemind is just more
> powerful than Spring that's why I like Hivemind more.
> 
> On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org>
> wrote:
> 
> > The following comment has been added to this issue:
> >
> >      Author: James Carman
> >     Created: Thu, 5 Aug 2004 12:06 PM
> >        Body:
> > I don't know if I understand how this feature causes any dangers.  It's
> > true that an interceptor could be called multiple times on the same
> > thread during one service method invocation (a service you're calling
> > uses another service which also has the same interceptor applied).  I
> > guess a service interceptor COULD be written to have some
> > thread-specific state (using ThreadLocalStorage of course) and it might
> > not manage that properly.  However, that can arise if you do it by
> > copy/paste also, no?  I wouldn't say that this feature would CAUSE that
> > problem, though.
> > ---------------------------------------------------------------------
> > View this comment:
> >
> http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
> >
> > ---------------------------------------------------------------------
> > View the issue:
> >   http://issues.apache.org/jira/browse/HIVEMIND-39
> >
> > Here is an overview of the issue:
> > ---------------------------------------------------------------------
> >         Key: HIVEMIND-39
> >     Summary: The ability to specify multiple interfaces of a service
> >        Type: Wish
> >
> >      Status: Open
> >    Priority: Minor
> >
> >     Project: HiveMind
> >  Components:
> >              framework
> >    Versions:
> >              1.0
> >
> >    Assignee: Howard M. Lewis Ship
> >    Reporter: Zhengmao Hu
> >
> >     Created: Thu, 5 Aug 2004 7:24 AM
> >     Updated: Thu, 5 Aug 2004 12:06 PM
> >
> > Description:
> > (Sorry, because sending email to
> > hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so
> > i post it here)
> >
> > Currently, one service can only have one interface specifiled.
> >
> > Inside ProxyBuilder.java, the proxy class built only implements this
> > "major" interface. This behavior is coded as such:
> >
> > public ProxyBuilder(String type, ServicePoint point)
> > {
> >    ...
> >    _classFab.addInterface(_serviceInterface);
> >    ...
> > }
> >
> > public void addServiceMethods(String indirection)
> > {
> >    ...
> >    Method[] methods = _serviceInterface.getMethods();
> >    for (int i = 0; i < methods.length; i++) ...
> >    ...
> > }
> >
> >
> > Because of this behavior, if there is a class:
> >
> > class ServiceABImpl implements ServiceA, ServiceB
> >
> > This class will be wrapped inside a proxy class, but the proxy class can
> > only implement one interface, that makes the usage of this class/service
> > inconvienent.
> >
> > So, there is a wish, wish that more than one interfaces can be specified
> > to one service.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> 
> --
> Christian Essl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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


RE: contributing an interceptor to multiple services

Posted by James Carman <ja...@carmanconsulting.com>.
Ok, I got it to do it.  All you need to do is this (in your own module)...

<implementation service-id="hivemind.BuilderFactory">
  <interceptor service-id="hivemind.LoggingInterceptor" />
</implementation>

This does cause a recursive problem.  It fails when you try to build a
registry, though, so you won't get too far with that sort of configuration. 

-----Original Message-----
From: Christian Essl [mailto:christianessl@yahoo.de] 
Sent: Thursday, August 05, 2004 4:32 PM
To: hivemind-dev@jakarta.apache.org
Subject: Re: contributing an interceptor to multiple services

James,

At the danger that this has also been discussed before IMO the problem of 
recursive calls as I see is as follows (maybe I take it too serious as IMO 
Spring has sort of the same):

An interceptor is created by an intercept able Service 
(InterceptorFactory). The InterceptorFactory can be created again by an 
intercept able Service (ServiceImplementationFactory). The interceptor 
itself can use any intercept able service and each of this services can 
use another intercept able service.

So if you by mistake add the interceptor also to the InterceptorFactory or 
the ServiceImplementationFactory you have a chicken-egg problem (which I 
strongly guess will result in an Exception). But worse if you add the 
interceptor to any of the direct or indirect services unconditional used 
during the interception call (i.e. LoggingService) than you have an 
endless loop, because the interceptor on the used service calls the 
service again and by this way itself.

What make it worse are modules. If you take care it is well possible that 
your defined interceptor works until another module changes - than your 
definition can be broken. IMO you would need full integration tests for 
such a feature.

As said probably I take the problem to serious, Spring (at least) had the 
same, but in Spring it is easier to manage because there is not so much 
indirection and you fully control all beans. Hivemind is just more 
powerful than Spring that's why I like Hivemind more.


On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org> 
wrote:

> The following comment has been added to this issue:
>
>      Author: James Carman
>     Created: Thu, 5 Aug 2004 12:06 PM
>        Body:
> I don't know if I understand how this feature causes any dangers.  It's 
> true that an interceptor could be called multiple times on the same 
> thread during one service method invocation (a service you're calling 
> uses another service which also has the same interceptor applied).  I 
> guess a service interceptor COULD be written to have some 
> thread-specific state (using ThreadLocalStorage of course) and it might 
> not manage that properly.  However, that can arise if you do it by 
> copy/paste also, no?  I wouldn't say that this feature would CAUSE that 
> problem, though.
> ---------------------------------------------------------------------
> View this comment:
>
http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
>
> ---------------------------------------------------------------------
> View the issue:
>   http://issues.apache.org/jira/browse/HIVEMIND-39
>
> Here is an overview of the issue:
> ---------------------------------------------------------------------
>         Key: HIVEMIND-39
>     Summary: The ability to specify multiple interfaces of a service
>        Type: Wish
>
>      Status: Open
>    Priority: Minor
>
>     Project: HiveMind
>  Components:
>              framework
>    Versions:
>              1.0
>
>    Assignee: Howard M. Lewis Ship
>    Reporter: Zhengmao Hu
>
>     Created: Thu, 5 Aug 2004 7:24 AM
>     Updated: Thu, 5 Aug 2004 12:06 PM
>
> Description:
> (Sorry, because sending email to 
> hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so 
> i post it here)
>
> Currently, one service can only have one interface specifiled.
>
> Inside ProxyBuilder.java, the proxy class built only implements this 
> "major" interface. This behavior is coded as such:
>
> public ProxyBuilder(String type, ServicePoint point)
> {
>    ...
>    _classFab.addInterface(_serviceInterface);
>    ...
> }
>
> public void addServiceMethods(String indirection)
> {
>    ...
>    Method[] methods = _serviceInterface.getMethods();
>    for (int i = 0; i < methods.length; i++) ...
>    ...
> }
>
>
> Because of this behavior, if there is a class:
>
> class ServiceABImpl implements ServiceA, ServiceB
>
> This class will be wrapped inside a proxy class, but the proxy class can 
> only implement one interface, that makes the usage of this class/service 
> inconvienent.
>
> So, there is a wish, wish that more than one interfaces can be specified 
> to one service.
>
>
> ---------------------------------------------------------------------
> 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
>



-- 
Christian Essl 

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



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


Re: contributing an interceptor to multiple services

Posted by Christian Essl <ch...@yahoo.de>.
Yes you are absolutely right it is merely a shortcut to do something that 
you can do already. The shurtcut just makes it easier - unfortunately also 
to do it wrong.

Mabe it would help if additional to the inclusion expression an exclusion 
expression is  provided on the <implementation> tag.

On Thu, 5 Aug 2004 19:53:07 -0400, James Carman 
<ja...@carmanconsulting.com> wrote:

> Ok, I'm not so sure that would happen, but there's one way to find out.  
> Can
> you get HiveMind to do it currently?  The proposed change shouldn't cause
> this problem should it?  The proposed change is merely a shortcut to do
> something that you can already do in HiveMind.  Correct?
>
> -----Original Message-----
> From: Christian Essl [mailto:christianessl@yahoo.de]
> Sent: Thursday, August 05, 2004 4:32 PM
> To: hivemind-dev@jakarta.apache.org
> Subject: Re: contributing an interceptor to multiple services
>
> James,
>
> At the danger that this has also been discussed before IMO the problem of
> recursive calls as I see is as follows (maybe I take it too serious as 
> IMO
> Spring has sort of the same):
>
> An interceptor is created by an intercept able Service
> (InterceptorFactory). The InterceptorFactory can be created again by an
> intercept able Service (ServiceImplementationFactory). The interceptor
> itself can use any intercept able service and each of this services can
> use another intercept able service.
>
> So if you by mistake add the interceptor also to the InterceptorFactory 
> or
> the ServiceImplementationFactory you have a chicken-egg problem (which I
> strongly guess will result in an Exception). But worse if you add the
> interceptor to any of the direct or indirect services unconditional used
> during the interception call (i.e. LoggingService) than you have an
> endless loop, because the interceptor on the used service calls the
> service again and by this way itself.
>
> What make it worse are modules. If you take care it is well possible that
> your defined interceptor works until another module changes - than your
> definition can be broken. IMO you would need full integration tests for
> such a feature.
>
> As said probably I take the problem to serious, Spring (at least) had the
> same, but in Spring it is easier to manage because there is not so much
> indirection and you fully control all beans. Hivemind is just more
> powerful than Spring that's why I like Hivemind more.
>
>
> On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), 
> <hi...@jakarta.apache.org>
> wrote:
>
>> The following comment has been added to this issue:
>>
>>      Author: James Carman
>>     Created: Thu, 5 Aug 2004 12:06 PM
>>        Body:
>> I don't know if I understand how this feature causes any dangers.  It's
>> true that an interceptor could be called multiple times on the same
>> thread during one service method invocation (a service you're calling
>> uses another service which also has the same interceptor applied).  I
>> guess a service interceptor COULD be written to have some
>> thread-specific state (using ThreadLocalStorage of course) and it might
>> not manage that properly.  However, that can arise if you do it by
>> copy/paste also, no?  I wouldn't say that this feature would CAUSE that
>> problem, though.
>> ---------------------------------------------------------------------
>> View this comment:
>>
> http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
>>
>> ---------------------------------------------------------------------
>> View the issue:
>>   http://issues.apache.org/jira/browse/HIVEMIND-39
>>
>> Here is an overview of the issue:
>> ---------------------------------------------------------------------
>>         Key: HIVEMIND-39
>>     Summary: The ability to specify multiple interfaces of a service
>>        Type: Wish
>>
>>      Status: Open
>>    Priority: Minor
>>
>>     Project: HiveMind
>>  Components:
>>              framework
>>    Versions:
>>              1.0
>>
>>    Assignee: Howard M. Lewis Ship
>>    Reporter: Zhengmao Hu
>>
>>     Created: Thu, 5 Aug 2004 7:24 AM
>>     Updated: Thu, 5 Aug 2004 12:06 PM
>>
>> Description:
>> (Sorry, because sending email to
>> hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so
>> i post it here)
>>
>> Currently, one service can only have one interface specifiled.
>>
>> Inside ProxyBuilder.java, the proxy class built only implements this
>> "major" interface. This behavior is coded as such:
>>
>> public ProxyBuilder(String type, ServicePoint point)
>> {
>>    ...
>>    _classFab.addInterface(_serviceInterface);
>>    ...
>> }
>>
>> public void addServiceMethods(String indirection)
>> {
>>    ...
>>    Method[] methods = _serviceInterface.getMethods();
>>    for (int i = 0; i < methods.length; i++) ...
>>    ...
>> }
>>
>>
>> Because of this behavior, if there is a class:
>>
>> class ServiceABImpl implements ServiceA, ServiceB
>>
>> This class will be wrapped inside a proxy class, but the proxy class can
>> only implement one interface, that makes the usage of this class/service
>> inconvienent.
>>
>> So, there is a wish, wish that more than one interfaces can be specified
>> to one service.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
>
>



-- 
Christian Essl 

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


RE: contributing an interceptor to multiple services

Posted by James Carman <ja...@carmanconsulting.com>.
Ok, I'm not so sure that would happen, but there's one way to find out.  Can
you get HiveMind to do it currently?  The proposed change shouldn't cause
this problem should it?  The proposed change is merely a shortcut to do
something that you can already do in HiveMind.  Correct?

-----Original Message-----
From: Christian Essl [mailto:christianessl@yahoo.de] 
Sent: Thursday, August 05, 2004 4:32 PM
To: hivemind-dev@jakarta.apache.org
Subject: Re: contributing an interceptor to multiple services

James,

At the danger that this has also been discussed before IMO the problem of 
recursive calls as I see is as follows (maybe I take it too serious as IMO 
Spring has sort of the same):

An interceptor is created by an intercept able Service 
(InterceptorFactory). The InterceptorFactory can be created again by an 
intercept able Service (ServiceImplementationFactory). The interceptor 
itself can use any intercept able service and each of this services can 
use another intercept able service.

So if you by mistake add the interceptor also to the InterceptorFactory or 
the ServiceImplementationFactory you have a chicken-egg problem (which I 
strongly guess will result in an Exception). But worse if you add the 
interceptor to any of the direct or indirect services unconditional used 
during the interception call (i.e. LoggingService) than you have an 
endless loop, because the interceptor on the used service calls the 
service again and by this way itself.

What make it worse are modules. If you take care it is well possible that 
your defined interceptor works until another module changes - than your 
definition can be broken. IMO you would need full integration tests for 
such a feature.

As said probably I take the problem to serious, Spring (at least) had the 
same, but in Spring it is easier to manage because there is not so much 
indirection and you fully control all beans. Hivemind is just more 
powerful than Spring that's why I like Hivemind more.


On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org> 
wrote:

> The following comment has been added to this issue:
>
>      Author: James Carman
>     Created: Thu, 5 Aug 2004 12:06 PM
>        Body:
> I don't know if I understand how this feature causes any dangers.  It's 
> true that an interceptor could be called multiple times on the same 
> thread during one service method invocation (a service you're calling 
> uses another service which also has the same interceptor applied).  I 
> guess a service interceptor COULD be written to have some 
> thread-specific state (using ThreadLocalStorage of course) and it might 
> not manage that properly.  However, that can arise if you do it by 
> copy/paste also, no?  I wouldn't say that this feature would CAUSE that 
> problem, though.
> ---------------------------------------------------------------------
> View this comment:
>
http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
>
> ---------------------------------------------------------------------
> View the issue:
>   http://issues.apache.org/jira/browse/HIVEMIND-39
>
> Here is an overview of the issue:
> ---------------------------------------------------------------------
>         Key: HIVEMIND-39
>     Summary: The ability to specify multiple interfaces of a service
>        Type: Wish
>
>      Status: Open
>    Priority: Minor
>
>     Project: HiveMind
>  Components:
>              framework
>    Versions:
>              1.0
>
>    Assignee: Howard M. Lewis Ship
>    Reporter: Zhengmao Hu
>
>     Created: Thu, 5 Aug 2004 7:24 AM
>     Updated: Thu, 5 Aug 2004 12:06 PM
>
> Description:
> (Sorry, because sending email to 
> hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so 
> i post it here)
>
> Currently, one service can only have one interface specifiled.
>
> Inside ProxyBuilder.java, the proxy class built only implements this 
> "major" interface. This behavior is coded as such:
>
> public ProxyBuilder(String type, ServicePoint point)
> {
>    ...
>    _classFab.addInterface(_serviceInterface);
>    ...
> }
>
> public void addServiceMethods(String indirection)
> {
>    ...
>    Method[] methods = _serviceInterface.getMethods();
>    for (int i = 0; i < methods.length; i++) ...
>    ...
> }
>
>
> Because of this behavior, if there is a class:
>
> class ServiceABImpl implements ServiceA, ServiceB
>
> This class will be wrapped inside a proxy class, but the proxy class can 
> only implement one interface, that makes the usage of this class/service 
> inconvienent.
>
> So, there is a wish, wish that more than one interfaces can be specified 
> to one service.
>
>
> ---------------------------------------------------------------------
> 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
>



-- 
Christian Essl 

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



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


Re: contributing an interceptor to multiple services

Posted by Christian Essl <ch...@yahoo.de>.
James,

At the danger that this has also been discussed before IMO the problem of 
recursive calls as I see is as follows (maybe I take it too serious as IMO 
Spring has sort of the same):

An interceptor is created by an intercept able Service 
(InterceptorFactory). The InterceptorFactory can be created again by an 
intercept able Service (ServiceImplementationFactory). The interceptor 
itself can use any intercept able service and each of this services can 
use another intercept able service.

So if you by mistake add the interceptor also to the InterceptorFactory or 
the ServiceImplementationFactory you have a chicken-egg problem (which I 
strongly guess will result in an Exception). But worse if you add the 
interceptor to any of the direct or indirect services unconditional used 
during the interception call (i.e. LoggingService) than you have an 
endless loop, because the interceptor on the used service calls the 
service again and by this way itself.

What make it worse are modules. If you take care it is well possible that 
your defined interceptor works until another module changes - than your 
definition can be broken. IMO you would need full integration tests for 
such a feature.

As said probably I take the problem to serious, Spring (at least) had the 
same, but in Spring it is easier to manage because there is not so much 
indirection and you fully control all beans. Hivemind is just more 
powerful than Spring that's why I like Hivemind more.


On Thu, 5 Aug 2004 12:07:19 -0700 (PDT), <hi...@jakarta.apache.org> 
wrote:

> The following comment has been added to this issue:
>
>      Author: James Carman
>     Created: Thu, 5 Aug 2004 12:06 PM
>        Body:
> I don't know if I understand how this feature causes any dangers.  It's 
> true that an interceptor could be called multiple times on the same 
> thread during one service method invocation (a service you're calling 
> uses another service which also has the same interceptor applied).  I 
> guess a service interceptor COULD be written to have some 
> thread-specific state (using ThreadLocalStorage of course) and it might 
> not manage that properly.  However, that can arise if you do it by 
> copy/paste also, no?  I wouldn't say that this feature would CAUSE that 
> problem, though.
> ---------------------------------------------------------------------
> View this comment:
>   http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074
>
> ---------------------------------------------------------------------
> View the issue:
>   http://issues.apache.org/jira/browse/HIVEMIND-39
>
> Here is an overview of the issue:
> ---------------------------------------------------------------------
>         Key: HIVEMIND-39
>     Summary: The ability to specify multiple interfaces of a service
>        Type: Wish
>
>      Status: Open
>    Priority: Minor
>
>     Project: HiveMind
>  Components:
>              framework
>    Versions:
>              1.0
>
>    Assignee: Howard M. Lewis Ship
>    Reporter: Zhengmao Hu
>
>     Created: Thu, 5 Aug 2004 7:24 AM
>     Updated: Thu, 5 Aug 2004 12:06 PM
>
> Description:
> (Sorry, because sending email to 
> hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so 
> i post it here)
>
> Currently, one service can only have one interface specifiled.
>
> Inside ProxyBuilder.java, the proxy class built only implements this 
> "major" interface. This behavior is coded as such:
>
> public ProxyBuilder(String type, ServicePoint point)
> {
>    ...
>    _classFab.addInterface(_serviceInterface);
>    ...
> }
>
> public void addServiceMethods(String indirection)
> {
>    ...
>    Method[] methods = _serviceInterface.getMethods();
>    for (int i = 0; i < methods.length; i++) ...
>    ...
> }
>
>
> Because of this behavior, if there is a class:
>
> class ServiceABImpl implements ServiceA, ServiceB
>
> This class will be wrapped inside a proxy class, but the proxy class can 
> only implement one interface, that makes the usage of this class/service 
> inconvienent.
>
> So, there is a wish, wish that more than one interfaces can be specified 
> to one service.
>
>
> ---------------------------------------------------------------------
> 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
>



-- 
Christian Essl 

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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 12:06 PM
       Body:
I don't know if I understand how this feature causes any dangers.  It's true that an interceptor could be called multiple times on the same thread during one service method invocation (a service you're calling uses another service which also has the same interceptor applied).  I guess a service interceptor COULD be written to have some thread-specific state (using ThreadLocalStorage of course) and it might not manage that properly.  However, that can arise if you do it by copy/paste also, no?  I wouldn't say that this feature would CAUSE that problem, though.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37074

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 12:06 PM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 12:22 PM
       Body:
As far as the regular expression support goes, I don't know how fancy I'd get with that one.  I would probably only allow one wildcard character (I used '*' since that's the most common, I think) at the end of the service id.  That way, you could either match all services, all services within one module (or group of similarly-named modules), or one specific service given one "regular expression."  That way, you don't really have to use any regular expression parsing.  All you'd have to do is check to see that the service id starts with everything up to (but not including) the '*' character.  If you wanted to add it to multiple, totally unrelated services, you could always use a comma-separated list of service ids.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37075

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 12:22 PM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Zhengmao Hu
    Created: Thu, 5 Aug 2004 8:13 AM
       Body:
any comment?

in fact, i want a service to have a interface containing business logic methods, and another interface containing lifecycle management methods(such as start/restart/stop).

because i don't want the business logic interface extends lifecycle management interface, so there are two ways (as far as i know) to go:

1) implements business logic interface only, other methods will be called via reflection. (but some problems may occure, such as interceptors is useless to lifecycle management methods)

2) change HiveMind, let one service can implement more than one interfaces. (will require changes in more than one java file)
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37055

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 8:13 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: James Carman
    Created: Thu, 5 Aug 2004 10:54 AM
       Body:
Could we change the <implementation> element to take a comma-separated list of regular expressions for matching service-ids within the registry?  That might help this situation (and another one that we recently discussed involving contributing an interceptor to multiple services)...

<implementation service-id="ServiceA, ServiceB">
  <invoke-factory service-id="hivemind.BuilderFactory">
    <construct class="com.myco.ServiceABImpl" />
  </invoke-factory>
</implementation>

<implementation service-id="mymodule.*">
  <interceptor service-id="SecurityInterceptor" /> </implementation>

I think this could be done without breaking current module definition files, since nobody was using the regular expressions before anyway. 
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37064

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 10:54 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Zhengmao Hu
    Created: Thu, 5 Aug 2004 8:37 AM
       Body:
maybe let the proxy implement every interface that was implemented by the original class?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37056

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 8:37 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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


[jira] Commented: (HIVEMIND-39) The ability to specify multiple interfaces of a service

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Christian Essl
    Created: Thu, 5 Aug 2004 11:52 AM
       Body:
I think the comma-separated list of service-ids on implementation is a very good idea. I do not know how Hivemind handles the different meaning of a dot in a regex and in a service-id and because of JDK1.3 is there already a lib.

Having a form to specify an interceptor for many different services would certainly save a lot of cut/paste. I think it is very powerful but also quite dangerous. It's easy to end up with recursive calls.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-39?page=comments#action_37073

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-39
    Summary: The ability to specify multiple interfaces of a service
       Type: Wish

     Status: Open
   Priority: Minor

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Zhengmao Hu

    Created: Thu, 5 Aug 2004 7:24 AM
    Updated: Thu, 5 Aug 2004 11:52 AM

Description:
(Sorry, because sending email to hivemind-dev-subscribe@jakarta.apache.org can not make me subscribe, so i post it here)

Currently, one service can only have one interface specifiled.

Inside ProxyBuilder.java, the proxy class built only implements this "major" interface. This behavior is coded as such:
    
public ProxyBuilder(String type, ServicePoint point)
{
   ...
   _classFab.addInterface(_serviceInterface);
   ...
}

public void addServiceMethods(String indirection)
{
   ...
   Method[] methods = _serviceInterface.getMethods();
   for (int i = 0; i < methods.length; i++) ...
   ...
}


Because of this behavior, if there is a class:

class ServiceABImpl implements ServiceA, ServiceB

This class will be wrapped inside a proxy class, but the proxy class can only implement one interface, that makes the usage of this class/service inconvienent.

So, there is a wish, wish that more than one interfaces can be specified to one service.


---------------------------------------------------------------------
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