Could you please raise a JIRA issue ?
Btw, servicemix 3.1 will feature a JBI compliant SE for groovy scripting.
(doc still to be written).

On 12/18/06, Andrea Zoppello <[EMAIL PROTECTED]> wrote:
Hi all,

I've done some test with Groovy Component and i've noticed that when i
tried to use it
using the "script" attribute instead of the "scritText" attribute as follow

   <sm:activationSpec componentName="*myGenericGroovymioGroovy*"
service="*foo:myGenericGroovymioGroovy*"
destinationService="*foo:myScreenOutputmioGroovy*">
- <#>         <sm:component>
- <#>                 <bean
class="*org.apache.servicemix.components.groovy.GroovyComponent*">
                          <property name="*script*"
value="*c:/tmp/sm/groovy/testsmx.groovy*" />
                </bean>
      </sm:component>
</sm:activationSpec>

it doesn't work....

Looking at the source of the component in the ScriptComponent.java file
the problems seems to be in the start() method in the lines:
.....
 if (compiledScript == null) {
            checkScriptTextAvailable();
        }
        if (compiledScript == null) {
            if (engine instanceof Compilable) {
                Compilable compilable = (Compilable) engine;
                compileScript(compilable);
            }
        }
....

I've replaced this code with this and it works:

.....
if ((compiledScript == null) && (script != null)) {
            if (engine instanceof Compilable) {
                Compilable compilable = (Compilable) engine;
                compileScript(compilable);
            }
        }
        if (compiledScript == null) {
            checkScriptTextAvailable();
        }
.....

Thanks
Andrea Zoppello
Engineering Ing. Informatica




--
Cheers,
Guillaume Nodet

Reply via email to