You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by echolu <cj...@163.com> on 2006/06/09 05:08:13 UTC

How to confige JMS in the component deployed in the lwcontainer?

Hi gnodet:
Could you do your favors for me ?
How to confige JMS in the component deployed in the lwcontainer?
Just like the example in the directory SM_PATH/example/basic.
If I want to deploy this example as a lw-component, how could i use the JCA
and JMS?
Thanks!

--
View this message in context: http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4786593
Sent from the ServiceMix - User forum at Nabble.com.


Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by Guillaume Nodet <gn...@gmail.com>.
The new binaries are available at
http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/incubating-apache-servicemix/3.0-SNAPSHOT/

In the case of the JMS connection factory, it would easier to just create a
new bean,
but the WSNotification component already internally look up a jms connection
factory
in JNDI at "java:comp/env/jms/wsnotificationCF" (this can be changed).

Btw, if you need to retrieve any object from JNDI, just try something like
   <bean class="*org.springframework.jndi.JndiObjectFactoryBean*">
     <property name="jndiName" value="java:comp/env/jms/wsnotificationCF"/>
   </bean>

You should use that to retrieve a bean from an SU on the lwcontainer (for
example the BootstrapContext
or ConnectionManager for jca).

Cheers,
Guillaume Nodet

On 6/16/06, echolu <cj...@163.com> wrote:
>
>
> It is changed a lot of the configuration files.
> I want to download  the lasted version  binary SM from
>
> http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/incubating-servicemix/3.0-SNAPSHOT/
> but it seems the site could not word any more. Maybe change the location.
>
> You have configured the connectionFactory like that:
> <entry key="java:comp/env/jms/wsnotificationCF">
>           <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>             <property name="brokerURL" value="tcp://localhost:61616" />
>           </bean>
> </entry>
>
> So, If I wanna use the ws-notification in the lwcontainer,may i configure
> the connection like following:
> <sm:activationSpec>
>         <sm:component>
>           <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent
> ">
>      <property name="connectionFactory"
> ref-key="java:comp/env/jms/wsnotificationCF" />           </bean>
>         </sm:component>
>    </sm:activationSpec>
>
> I wanna know whethere reference the JNDI entity  in the servicemix.xml or
> not?
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4895480
> Sent from the ServiceMix - User forum at Nabble.com.
>
>

Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by echolu <cj...@163.com>.
It is changed a lot of the configuration files.
I want to download  the lasted version  binary SM from 
http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/incubating-servicemix/3.0-SNAPSHOT/
but it seems the site could not word any more. Maybe change the location.

You have configured the connectionFactory like that:
<entry key="java:comp/env/jms/wsnotificationCF">
          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <property name="brokerURL" value="tcp://localhost:61616" />
          </bean>
 </entry>

So, If I wanna use the ws-notification in the lwcontainer,may i configure
the connection like following:
<sm:activationSpec>
      	<sm:component>
      	  <bean class="org.apache.servicemix.wsn.spring.WSNSpringComponent">
     <property name="connectionFactory"
ref-key="java:comp/env/jms/wsnotificationCF" />   	  </bean>
        </sm:component>
   </sm:activationSpec>

I wanna know whethere reference the JNDI entity  in the servicemix.xml or
not?


--
View this message in context: http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4895480
Sent from the ServiceMix - User forum at Nabble.com.


Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by Guillaume Nodet <gn...@gmail.com>.
The configuration file works with the latest source, because
I added some security settings that are quite new.

You can either:
   * wait for the new snapshot distribution at
http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/incubating-apache-servicemix/3.0-SNAPSHOT/
   * rebuild the whole source tree
   * remove the offending beans from the spring xml files

Cheers,
Guillaume Nodet

On 6/16/06, Eric Anderson <er...@ultracode.com> wrote:
>
> I grabbed these XML files, put them in the conf directory, and when I
> fired up SM I got
>
> java.lang.ClassNotFoundException: authenticationService
>
> In security.xml I see
>   <sm:authenticationService id="authenticationService" />
>
> ..I assume this is the root of the problem.  What am I doing wrong here?
>
> ---
> On the chance that my SM 3.0 snapshot was too old to work, I tried to
> grab the latest from SVN with
> svn co http://svn.apache.org/repos/asf/incubator/servicemix/trunk/ ,
>
> but found that it died horribly on building, even with the builds of
> the tests turned off.  I see a lot that looks like:
>
> maven -Dmaven.test.skip=true
> ...
> Attempting to download servicemix-jbi-3.0-SNAPSHOT.jar.
> Error retrieving artifact from [
>
> http://repo.livetribe.org/maven1/org.apache.servicemix/jars/servicemix-jbi-3.0-SNAPSHOT.jar
> ]:
> java.io.IOException: Unknown error downloading; status code was: 302
> Attempting to download servicemix-services-3.0-SNAPSHOT.jar.
> Error retrieving artifact from [
>
> http://repo.livetribe.org/maven1/org.apache.servicemix/jars/servicemix-services-3.0-SNAPSHOT.jar
> ]:
> java.io.IOException: Unknown error downloading; status code was: 302
> ...
>     [javac] Compiling 17 source files to
> /home/eric/servicemix/tmp/trunk/servicemix-soap/target/classes
>
> /home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:48:
> package org.apache.ws.security does not exist
> import org.apache.ws.security.WSSecurityException;
>                               ^
>
> /home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:49:
> package org.apache.ws.security.components.crypto does not exist
> import org.apache.ws.security.components.crypto.Crypto;
>                                                 ^
>
> /home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:50:
> package org.apache.ws.security.components.crypto does not exist
> import org.apache.ws.security.components.crypto.X509NameTokenizer;
>                                                 ^
> &etc.
>
> Do I have the wrong source?  I thought that there might be a snapshot
> .tar.gz out there somewhere, but I was unable to locate one and thus
> went the svn route.  Is the svn tree expected to build at all times?  Is
> there actually an up-to-the-minute snapshot archive (.tar.gz) somewhere?
>
> Thanks,
> Eric
>
>
> Guillaume Nodet wrote:
> > I have just checked in some modifications to the main servicemix
> > configuration files
> > so that it should be easier to do that.
> > See
> >
> http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/
> >
> > and mainly the tx.xml and jndi.xml.
> > You should be able to do the same in your configuration and just
> retrieve
> > the needed objects from jndi.
> >
> > Cheers,
> > Guillaume Nodet
> >
> > On 6/10/06, echolu <cj...@163.com> wrote:
> >>
> >>
> >> Could you show me an example?
> >>
> >> Just a simple one.
> >>
> >> Thanks!
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4805108
> >>
> >> Sent from the ServiceMix - User forum at Nabble.com.
> >>
> >>
> >
>
>

Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by Eric Anderson <er...@ultracode.com>.
I grabbed these XML files, put them in the conf directory, and when I 
fired up SM I got

java.lang.ClassNotFoundException: authenticationService

In security.xml I see
  <sm:authenticationService id="authenticationService" />

..I assume this is the root of the problem.  What am I doing wrong here?

---
On the chance that my SM 3.0 snapshot was too old to work, I tried to 
grab the latest from SVN with
svn co http://svn.apache.org/repos/asf/incubator/servicemix/trunk/ ,

 but found that it died horribly on building, even with the builds of 
the tests turned off.  I see a lot that looks like:

maven -Dmaven.test.skip=true
...
Attempting to download servicemix-jbi-3.0-SNAPSHOT.jar.
Error retrieving artifact from [ 
http://repo.livetribe.org/maven1/org.apache.servicemix/jars/servicemix-jbi-3.0-SNAPSHOT.jar]: 
java.io.IOException: Unknown error downloading; status code was: 302
Attempting to download servicemix-services-3.0-SNAPSHOT.jar.
Error retrieving artifact from [ 
http://repo.livetribe.org/maven1/org.apache.servicemix/jars/servicemix-services-3.0-SNAPSHOT.jar]: 
java.io.IOException: Unknown error downloading; status code was: 302
...
    [javac] Compiling 17 source files to 
/home/eric/servicemix/tmp/trunk/servicemix-soap/target/classes
/home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:48: 
package org.apache.ws.security does not exist
import org.apache.ws.security.WSSecurityException;
                              ^
/home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:49: 
package org.apache.ws.security.components.crypto does not exist
import org.apache.ws.security.components.crypto.Crypto;
                                                ^
/home/eric/servicemix/tmp/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/handlers/security/BaseCrypto.java:50: 
package org.apache.ws.security.components.crypto does not exist
import org.apache.ws.security.components.crypto.X509NameTokenizer;
                                                ^
&etc.

Do I have the wrong source?  I thought that there might be a snapshot 
.tar.gz out there somewhere, but I was unable to locate one and thus 
went the svn route.  Is the svn tree expected to build at all times?  Is 
there actually an up-to-the-minute snapshot archive (.tar.gz) somewhere?

Thanks,
Eric


Guillaume Nodet wrote:
> I have just checked in some modifications to the main servicemix
> configuration files
> so that it should be easier to do that.
> See
> http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/ 
>
> and mainly the tx.xml and jndi.xml.
> You should be able to do the same in your configuration and just retrieve
> the needed objects from jndi.
>
> Cheers,
> Guillaume Nodet
>
> On 6/10/06, echolu <cj...@163.com> wrote:
>>
>>
>> Could you show me an example?
>>
>> Just a simple one.
>>
>> Thanks!
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4805108 
>>
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
>


Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by Guillaume Nodet <gn...@gmail.com>.
I have just checked in some modifications to the main servicemix
configuration files
so that it should be easier to do that.
See
http://svn.apache.org/viewvc/incubator/servicemix/trunk/incubating-apache-servicemix/src/main/release/conf/
and mainly the tx.xml and jndi.xml.
You should be able to do the same in your configuration and just retrieve
the needed objects from jndi.

Cheers,
Guillaume Nodet

On 6/10/06, echolu <cj...@163.com> wrote:
>
>
> Could you show me an example?
>
> Just a simple one.
>
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4805108
> Sent from the ServiceMix - User forum at Nabble.com.
>
>

Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by echolu <cj...@163.com>.
Could you show me an example?

Just a simple one.

Thanks!
--
View this message in context: http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4805108
Sent from the ServiceMix - User forum at Nabble.com.


Re: How to confige JMS in the component deployed in the lwcontainer?

Posted by Guillaume Nodet <gn...@gmail.com>.
I think the main problem will be to retrieve the TransactionContextManager
needed by jencks.
My best bet would be to define the BootstrapContext in the main
servicemix.xml configuration file,
export it in the jndi tree, and access it from JNDI in your SU
servicemix.xml using spring JNDI proxies.
You should then be able to wire everything else without any problems.

Please report back any success or failures.  Good luck !

Cheers,
Guillaume Nodet

On 6/9/06, echolu <cj...@163.com> wrote:
>
>
> Hi gnodet:
> Could you do your favors for me ?
> How to confige JMS in the component deployed in the lwcontainer?
> Just like the example in the directory SM_PATH/example/basic.
> If I want to deploy this example as a lw-component, how could i use the
> JCA
> and JMS?
> Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/How-to-confige-JMS-in-the-component-deployed-in-the-lwcontainer--t1759606.html#a4786593
> Sent from the ServiceMix - User forum at Nabble.com.
>
>