[ http://jira.jboss.com/jira/browse/JBREM-51?page=comments#action_12315227 
]
     
Tom  Elrod commented on JBREM-51:
---------------------------------

One of the problems with using a data type for a custom Marshaller/UnMarshaller 
is having to explicitly code the addition of these within the MarshalFactory on 
both the client and the server.  So another approach that is a little more 
flexible is to specify the fully qualified class name for both the Marshaller 
and UnMarshaller on the locator url.  For example:

socket://myhost:5400/?datatype=invocation&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller

This will prompt remoting to try to load and instantiate the Marshaller and 
UnMarshaller classes.  If both are found and loaded, they will automatically be 
added to the MarshalFactory by data type, so will remain in memory.  Now the 
only requirement is that the custom Marshaller and UnMarshaller classes be 
available on both the client and server's classpath.  

Another requirement of the actual Marshaller and UnMarshaller classes is that 
they have a void constructor.  Otherwise loading of these will fail.

This configuration can also be applied using the service xml.  If using 
declaration of invoker using the InvokerLocator attribute, can simply add the 
datatype, marshaller, and unmarshaller parameters to the defined InvokerLocator 
attribute value.  For example:

<attribute 
name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:8084/?datatype=invocation&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]]></attribute>

If ware using config element to declare the invoker, will need to add an 
attribute for each and include the isParam attribute set to true.  For example:

           <invoker transport="socket">
              <attribute name="dataType" isParam="true">invocation</attribute>
              <attribute name="marshaller" 
isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
              <attribute name="unmarshaller" 
isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
           </invoker>



> defining marshaller on remoting client
> --------------------------------------
>
>          Key: JBREM-51
>          URL: http://jira.jboss.com/jira/browse/JBREM-51
>      Project: JBoss Remoting
>         Type: Reactor Event
>   Components: marshall
>     Versions: 1.0.1 beta
>     Reporter: Tom  Elrod
>     Assignee: Tom  Elrod
>      Fix For: 1.0.1 final

>
>
> Need to be able to somehow declare and load marshallers dynamically on 
> remoting client based on just locator url.
> See forum http://www.jboss.org/index.html?module=bb&op=viewtopic&t=59358 for 
> details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to