Kent Tong | 10 Sep 2006 16:07
Favicon

Contributing a patch

Hi,

I'd like to contribute a patch to address the following issues. Would
you please let me know if it is worth accepting? Then I can send you
the patch file.

1) Allow providing module descriptors using strings so that testing
can be done like:

	public void testCreateInstance() throws Exception
	{
		String module1 = "<?xml version=\"1.0\"?>"
				+ "<module id=\"com.myco.mypackage\" version=\"1.0.0\">"
				+ "  <service-point id=\"Adder\" 
interface=\"org.apache.hivemind.Adder\"/>"
				+ "</module>";
		String module2 = "<?xml version=\"1.0\"?>"
				+ "<module id=\"com.myco.mypackage.impl\" version=\"1.0.0\">"
				+ "  <implementation service-id=\"com.myco.mypackage.Adder\">"
				+ "  <create-instance class=\"org.apache.hivemind.AdderImpl\"/>"
				+ "  </implementation>" + "</module>";
		setupRegistry(new String[] { module1, module2 });
		Adder adder = (Adder) registry.getService("com.myco.mypackage.Adder",
				Adder.class);
		assertNotNull(adder);
		assertEquals(adder.add(4, 5), 9);
	}

2) Allow overriding service implementations using specified objects.
This is useful when performing integration tests involving hivemind
(Continue reading)

Vinicius Carvalho (JIRA | 11 Sep 2006 20:42
Picon
Picon
Favicon

[jira] Created: (HIVEMIND-183) Problems with LoggingInterceptor and OC4J 10.1.3

Problems with LoggingInterceptor and OC4J 10.1.3
------------------------------------------------

                 Key: HIVEMIND-183
                 URL: http://issues.apache.org/jira/browse/HIVEMIND-183
             Project: HiveMind
          Issue Type: Bug
          Components: framework
    Affects Versions: 1.1.1
         Environment: Oracle OC4J 10.1.3 (both standalone and AS versions)
            Reporter: Vinicius Carvalho

Seems to be a bug with OC4J and Hivemind. When creating the interceptor, it seems to have a conflict between
versions of the commons-logging. I'm sorry I can't provide more information. I've solved this issue
after a big help from Jesse Kuhnert. To solve it, I've provide an empty class:

public class OC4JHivemindLoggingInterceptor implements
		ServiceInterceptorFactory {

	public void createInterceptor(InterceptorStack stack, Module module, List list) {

	}

}

I just post it as a major priority, since it affects every possible user of tapestry that has OC4J as an app server.

Regards 

--

-- 
(Continue reading)

Knut Wannheden (JIRA | 12 Sep 2006 08:31
Picon
Picon
Favicon

[jira] Commented: (HIVEMIND-183) Problems with LoggingInterceptor and OC4J 10.1.3

    [ http://issues.apache.org/jira/browse/HIVEMIND-183?page=comments#action_12434073 ] 

Knut Wannheden commented on HIVEMIND-183:
-----------------------------------------

Vinicius,

How does this no-op service interceptor factory class solve the problem? Do you declare it in a
hivemodule.xml and apply it instead of the LoggingInterceptorFactory (I think that's the one you had
problems with)? Would be nice if we could nail this one down.

Did you check whether you have two commons-logging jars deployed or whether the same commons-logging jar
is loaded by multiple class loaders? I think that could be the source of your problem.

> Problems with LoggingInterceptor and OC4J 10.1.3
> ------------------------------------------------
>
>                 Key: HIVEMIND-183
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-183
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.1.1
>         Environment: Oracle OC4J 10.1.3 (both standalone and AS versions)
>            Reporter: Vinicius Carvalho
>
> Seems to be a bug with OC4J and Hivemind. When creating the interceptor, it seems to have a conflict between
versions of the commons-logging. I'm sorry I can't provide more information. I've solved this issue
after a big help from Jesse Kuhnert. To solve it, I've provide an empty class:
> public class OC4JHivemindLoggingInterceptor implements
(Continue reading)

Vinicius Carvalho (JIRA | 12 Sep 2006 16:21
Picon
Picon
Favicon

[jira] Commented: (HIVEMIND-183) Problems with LoggingInterceptor and OC4J 10.1.3

    [ http://issues.apache.org/jira/browse/HIVEMIND-183?page=comments#action_12434167 ] 

Vinicius Carvalho commented on HIVEMIND-183:
--------------------------------------------

Knut, 

Yes, in order to solve my issue, I've replaced the default LoggingInterceptorFactory declaring the dummy
class on my hivemodule.xml:
<implementation service-id="hivemind.LoggingInterceptor">
		<create-instance class="*.*.*.*.OC4JHivemindLoggingInterceptor"/>
	</implementation>
Hum, I haven't check that. But I'll this weekend, I'll try to gather more specific information. I'm pretty
sure its a classloader issue, Oracle's classloader is very very problematic.

Best regards

> Problems with LoggingInterceptor and OC4J 10.1.3
> ------------------------------------------------
>
>                 Key: HIVEMIND-183
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-183
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.1.1
>         Environment: Oracle OC4J 10.1.3 (both standalone and AS versions)
>            Reporter: Vinicius Carvalho
>
> Seems to be a bug with OC4J and Hivemind. When creating the interceptor, it seems to have a conflict between
(Continue reading)

Achim Hügen | 12 Sep 2006 20:31
Picon
Picon

Re: Contributing a patch

Please open three issues on jira and attach the
the patches. I can't promise you that number 1) and 2) will
make it in, but at least number 3) should make it.

Achim

Am Sun, 10 Sep 2006 16:07:51 +0200 schrieb Kent Tong <kent <at> cpttm.org.mo>:

> Hi,
>
> I'd like to contribute a patch to address the following issues. Would
> you please let me know if it is worth accepting? Then I can send you
> the patch file.
>
> 1) Allow providing module descriptors using strings so that testing
> can be done like:
>
> 	public void testCreateInstance() throws Exception
> 	{
> 		String module1 = "<?xml version=\"1.0\"?>"
> 				+ "<module id=\"com.myco.mypackage\" version=\"1.0.0\">"
> 				+ "  <service-point id=\"Adder\"  
> interface=\"org.apache.hivemind.Adder\"/>"
> 				+ "</module>";
> 		String module2 = "<?xml version=\"1.0\"?>"
> 				+ "<module id=\"com.myco.mypackage.impl\" version=\"1.0.0\">"
> 				+ "  <implementation service-id=\"com.myco.mypackage.Adder\">"
> 				+ "  <create-instance class=\"org.apache.hivemind.AdderImpl\"/>"
> 				+ "  </implementation>" + "</module>";
> 		setupRegistry(new String[] { module1, module2 });
(Continue reading)

Kent Tong (JIRA | 13 Sep 2006 17:32
Picon
Picon
Favicon

[jira] Created: (HIVEMIND-184) FileResource doesn't implement hashCode()

FileResource doesn't implement hashCode()
-----------------------------------------

                 Key: HIVEMIND-184
                 URL: http://issues.apache.org/jira/browse/HIVEMIND-184
             Project: HiveMind
          Issue Type: Bug
          Components: framework
    Affects Versions: 1.2
            Reporter: Kent Tong
            Priority: Minor
         Attachments: patch1

--

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

Kent Tong (JIRA | 13 Sep 2006 17:32
Picon
Picon
Favicon

[jira] Updated: (HIVEMIND-184) FileResource doesn't implement hashCode()

     [ http://issues.apache.org/jira/browse/HIVEMIND-184?page=all ]

Kent Tong updated HIVEMIND-184:
-------------------------------

    Attachment: patch1

A patch fixing this bug.

> FileResource doesn't implement hashCode()
> -----------------------------------------
>
>                 Key: HIVEMIND-184
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-184
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.2
>            Reporter: Kent Tong
>            Priority: Minor
>         Attachments: patch1
>
>

--

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
(Continue reading)

Kent Tong (JIRA | 13 Sep 2006 17:37
Picon
Picon
Favicon

[jira] Created: (HIVEMIND-185) Should allow providing module descriptors using strings for easier testing

Should allow providing module descriptors using strings for easier testing
--------------------------------------------------------------------------

                 Key: HIVEMIND-185
                 URL: http://issues.apache.org/jira/browse/HIVEMIND-185
             Project: HiveMind
          Issue Type: Improvement
          Components: framework
    Affects Versions: 1.2
            Reporter: Kent Tong

With the capacity to provide module descriptors as strings, it's a lot easier to write tests using plain
JUnit without extending HivemindTestCase:

public class TestRegistryBuilderUsingStrings extends TestCase
{
	...
	public void testCreateInstance() throws Exception
	{
		String module1 = "<?xml version=\"1.0\"?>"
				+ "<module id=\"com.myco.mypackage\" version=\"1.0.0\">"
				+ "  <service-point id=\"Adder\" 
interface=\"org.apache.hivemind.Adder\"/>"
				+ "</module>";
		String module2 = "<?xml version=\"1.0\"?>"
				+ "<module id=\"com.myco.mypackage.impl\" version=\"1.0.0\">"
				+ "  <implementation service-id=\"com.myco.mypackage.Adder\">"
				+ "  <create-instance class=\"org.apache.hivemind.AdderImpl\"/>"
				+ "  </implementation>" + "</module>";
		setupRegistry(new String[] { module1, module2 });
(Continue reading)

Kent Tong (JIRA | 13 Sep 2006 17:41
Picon
Picon
Favicon

[jira] Updated: (HIVEMIND-185) Should allow providing module descriptors using strings for easier testing

     [ http://issues.apache.org/jira/browse/HIVEMIND-185?page=all ]

Kent Tong updated HIVEMIND-185:
-------------------------------

    Attachment: patch2

A patch implementing this enhancement.

> Should allow providing module descriptors using strings for easier testing
> --------------------------------------------------------------------------
>
>                 Key: HIVEMIND-185
>                 URL: http://issues.apache.org/jira/browse/HIVEMIND-185
>             Project: HiveMind
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: 1.2
>            Reporter: Kent Tong
>         Attachments: patch2
>
>
> With the capacity to provide module descriptors as strings, it's a lot easier to write tests using plain
JUnit without extending HivemindTestCase:
> public class TestRegistryBuilderUsingStrings extends TestCase
> {
> 	...
> 	public void testCreateInstance() throws Exception
> 	{
> 		String module1 = "<?xml version=\"1.0\"?>"
(Continue reading)

Kent Tong (JIRA | 13 Sep 2006 17:43
Picon
Picon
Favicon

[jira] Created: (HIVEMIND-186) Allow overriding service implementations using specified objects

Allow overriding service implementations using specified objects
----------------------------------------------------------------

                 Key: HIVEMIND-186
                 URL: http://issues.apache.org/jira/browse/HIVEMIND-186
             Project: HiveMind
          Issue Type: New Feature
          Components: framework
    Affects Versions: 1.2
            Reporter: Kent Tong

This is useful when performing integration tests involving hivemind services. As one hivemind service
can bring in another. To stop it we can use override a certain "boundary" service implementations using
stub/mock objects. I need this capacity to test Tapestry pages (eg, provide a stub HttpServletRequest).

--

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Gmane