You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Forrest Xia (JIRA)" <ji...@apache.org> on 2009/12/30 10:13:35 UTC

[jira] Created: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
--------------------------------------------------------------------------------------

                 Key: ARIES-98
                 URL: https://issues.apache.org/jira/browse/ARIES-98
             Project: Aries
          Issue Type: Bug
          Components: Blueprint
    Affects Versions: Incubation
         Environment: Linux i386
Sun jdk1.5.0_16
            Reporter: Forrest Xia


When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.

<?xml version="1.0" encoding="UTF-8"?>	
<blueprint default-activation="eager" default-availability="optional"
	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
	<description>Apache Aries Blueprint Complex Sample - Client</description>
	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
		<argument>
			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
				<argument>
					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
						<argument>
							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
								<argument>
									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
										<argument>
											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
												<argument value="This is Bean6!"/>
											</bean>
										</argument>
									</bean>
								</argument>
							</bean>
						</argument>
					</bean>
				</argument>
			</bean>
		</argument>
	</bean>

</blueprint>


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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797058#action_12797058 ] 

Rex Wang commented on ARIES-98:
-------------------------------

Hi, Jarek

I get a tricky issue when try your solution. That is, we can not circular define the composite type, for example:
if I want to define such generic value type: 
CompositeType METADATA_TYPE,
I need:
BEAN_METADATA_TYPE firstly,
which need:
ARGUMENT_TYPE,
which will need:
METADATA_TYPE.

That won't get the expect result in runtime.




> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796276#action_12796276 ] 

Jarek Gawor commented on ARIES-98:
----------------------------------

I agree with Alasdair. This is not a blueprint problem and instead seems like a mbean issue. From what I understand, the core of the problem is that we can't (or we don't know) how to define a field in an openmbean as of type any (that is, as 'Object value' for example). That's why the current jmx blueprint implementation serializes the blueprint bean argument and property values as Byte[]. If we can find a way to define a field of type any in openmbean then this entire problem disappears. If not, there are other ways we can try to avoid the Byte[] serialization. For example, we could define a new CompositeType that has a separate field for each possible value metadata type in blueprint. And only one of those fields could ever be set on the ComposisteData of that new CompositeType type. It's not very nice solution but I think it would work in most cases and it would avoid the expensive serialization/deserialization.


> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796065#action_12796065 ] 

Rex Wang commented on ARIES-98:
-------------------------------

That is because of a drawback of Java 5. In Java 5's OpenType, the ArrayType can only made up by wrapped Bytes. So to be compatible with Java 5, we have to sacrifice the performance. That is why you see such a great many Byte objects for values.
However, in practice, I believe we won't write such multiple-nesting beans.

-Rex

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872904#action_12872904 ] 

Rex Wang commented on ARIES-98:
-------------------------------

Hi, 

I am working on the RFC of blueprint mbeans for OSGi Alliance. Before the writing starts, I think this issue should be resolved. After a long time thoughts on this problem, I am afraid the only choice is to change the current design of the metadata mbean:-(

That is as follows:
    public CompositeData[] getComponentMetadata(long containerServiceId, String componentId) {

The api getComponentMetadata will return an array of composite datas, in which the first element is the component's composite data and the others are the inner values or targets' composite datas.
The component's composite data won't have an value item whose type is BYTE array. Instead, it will be an integer that indicates the index in the returned CompositeData array. 

I have implemented the design in the patches...

Any comments is appreciated! 

-Rex


> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>         Attachments: api.patch, core.patch
>
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796484#action_12796484 ] 

Rex Wang commented on ARIES-98:
-------------------------------

Yes, that is a limitation of the MBean, and not a problem of Blueprint, so I agree with Alasdair that we should not doc this as a best practice, although the muti-inline managers seems really not a good style.
The essential issue is what said by Jarek. That is, in openmbean's CompositeType, we can not define an item that represents a value with an uncertain type. So we have to uniform it as a Byte[]. Actually when firstly implement this way, we try it in Java 6, which support the primitive ArrayType. But Java 5 don't. Hence we move it to Byte[]. I am also not comfortable with this work around.
I think Jarek's solution is better on performance. I would like to have a try and then provide a patch. So until we get an acceptable solution on this problem I'd like to keep this JIRA as open. Could anybody assign this to me?

Thanks :-)

-Rex

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Forrest Xia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796165#action_12796165 ] 

Forrest Xia commented on ARIES-98:
----------------------------------

One thing I found about using inlined managers is that it will have to introduce OSGi APIs into the blueprint application code. For example, using an inlined service manager, the bean property or argument shall be a ServiceRegistration object. In OSGi env, it's not a problem. But if you want your code independent on OSGi, it's better to use reference managers.



> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Forrest Xia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796089#action_12796089 ] 

Forrest Xia commented on ARIES-98:
----------------------------------

Yes, I agreed that we can change the nesting style to reference style, that works with the MBean. But the blueprint spec/XML gives user the flexibility of writing either inlined managers or reference managers. 

Maybe we could point out a best practice in blueprint tutorial(or whatever doc about blueprint) about writing a blueprint applications: Don't use inlined managers too much, and use "ref" attribute or element if possible.

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Updated: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rex Wang updated ARIES-98:
--------------------------

    Attachment:     (was: api.patch)

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>         Attachments: api.patch, core.patch
>
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Updated: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rex Wang updated ARIES-98:
--------------------------

    Attachment: api.patch
                core.patch

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>         Attachments: api.patch, core.patch
>
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Alasdair Nottingham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796152#action_12796152 ] 

Alasdair Nottingham commented on ARIES-98:
------------------------------------------

I do not agree with documenting the use of reference managers as a best practice just based on this. It seems like either a limitation in the MBean and I would feel uncomfortable with documenting a work around as a best practice. For instance if I never use the MBean why would I follow this "best practice", what value would it give me.

I agree with Rex that examples like this are unlikely to be common, so I would prefer to wait until we have more experience in using blueprint before advocating one style over the other.

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Commented: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797247#action_12797247 ] 

Jarek Gawor commented on ARIES-98:
----------------------------------

Rex,

Hmm, I see. Well, another possible solution I can think of would be to return some kind of id for the bean property/argument value. The user would then use that id to lookup the actual contents of the value. That of course, would require introducing another method to lookup the value contents. 
Maybe we should discuss this problem at the dev list and hopefully somebody will have a better idea how to deal with this.


> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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


[jira] Updated: (ARIES-98) Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions

Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rex Wang updated ARIES-98:
--------------------------

    Attachment: api.patch

> Blueprint MetadataMBean cannot handle multiple-nesting blueprint component definitions
> --------------------------------------------------------------------------------------
>
>                 Key: ARIES-98
>                 URL: https://issues.apache.org/jira/browse/ARIES-98
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: Incubation
>         Environment: Linux i386
> Sun jdk1.5.0_16
>            Reporter: Forrest Xia
>         Attachments: api.patch, core.patch
>
>
> When a blueprint config has multiple-nesting components definition, for example as follows, then the BlueprintMetadataMBean will return a huge java.lang.Byte[], in my case, it's more than 5 millions, thus cause JMX client application(e.g JConsole) hangs.
> <?xml version="1.0" encoding="UTF-8"?>	
> <blueprint default-activation="eager" default-availability="optional"
> 	default-timeout="300000" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
> 	<description>Apache Aries Blueprint Complex Sample - Client</description>
> 	<bean id="bean1" class="org.apache.aries.blueprint.sample.complex.client.temp.Bean1" init-method="startUp">
> 		<argument>
> 			<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean2" init-method="startUp">
> 				<argument>
> 					<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean3" init-method="startUp">
> 						<argument>
> 							<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean4" init-method="startUp">
> 								<argument>
> 									<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean5" init-method="startUp">
> 										<argument>
> 											<bean class="org.apache.aries.blueprint.sample.complex.client.temp.Bean6" init-method="startUp">
> 												<argument value="This is Bean6!"/>
> 											</bean>
> 										</argument>
> 									</bean>
> 								</argument>
> 							</bean>
> 						</argument>
> 					</bean>
> 				</argument>
> 			</bean>
> 		</argument>
> 	</bean>
> </blueprint>

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