How to integrate Solr and Jboss

本文转自 http://www.mail-archive.com/solr-user@lucene.apache.org/msg05645.html

 

Hi,

The method works, but has the drawback that you need to configure your solr
home inside the war of the web application.
What we did is the following:

Add this to the jboss-service.xml

<mbean code="org.jboss.naming.JNDIBindingServiceMgr"
         name="jboss.tests:service=JNDIBindingServiceMgr">
      <attribute name="BindingsConfig" serialDataType="jbxb">
         <jndi:bindings
            xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
;
            xmlns:jndi="urn:jboss:jndi-binding-service:1.0"
            
xs:schemaLocation="urn:jboss:jndi-binding-service:1.0resource:jndi-binding-service_1_0.xsd"
            >
            <jndi:binding name="solr/home">
                <jndi:value type="java.lang.String
">C:\Temp\solr</jndi:value>
            </jndi:binding>
         </jndi:bindings>
      </attribute>
   </mbean>

Where I have c:\Temp\solr, you need to put your solr location.

Then inside the solr.war you edit the web.xml and add the following just
before the </web-app> tag :

<resource-env-ref>
        <resource-env-ref-name>solr/home</resource-env-ref-name>
        <resource-env-ref-type>java.lang.String</resource-env-ref-type>
    </resource-env-ref>


Then you add a jboss-web.xml file inside the WEB-INF folder inside the
solr.war
The file must contain :

<jboss-web>
        <context-root>solr</context-root>
        <resource-env-ref>
             <resource-env-ref-name>solr/home</resource-env-ref-name>
            <jndi-name>/solr/home</jndi-name>
        </resource-env-ref>
</jboss-web>


Using this method, u can configure the solr home inside the application
server and there is no need to edit the solr.war when you want to change the
solr home.

And yes, you then copy the solr.war file inside the deploy folder of your
jboss instance.

I hope this helps,

Thierry

On 26/08/07, Jae Joo <[EMAIL PROTECTED]> wrote:
>
> sort of, but need more details.
> How about solr.war file? do I have to copy it into jboss deploy directory?
> Otherwise, how I let jboss kow where Solr is?
> Any idea how to handle *.jar files for Solr?
>
> Thanks,
>
> Jae
>
> On 8/26/07, Grant Ingersoll <[EMAIL PROTECTED]> wrote:
> >
> > Is this what you are looking for: http://wiki.apache.org/solr/SolrJBoss

> >
> > On Aug 25, 2007, at 10:18 AM, Jae Joo wrote:
> >
> > > Hi,
> > >
> > > I have Solr 1.2 and JBoss Application Server 4.2.1 installed in
> > > Windows
> > > machine and would like to find how to integrate it together.
> > >
> > > can anyone help me?
> > >
> > > Thanks,
> > >
> > > Jae Joo
> >
> > --------------------------
> > Grant Ingersoll
> > http://lucene.grantingersoll.com

> >
> > Lucene Helpful Hints:
> > http://wiki.apache.org/lucene-java/BasicsOfPerformance

> > http://wiki.apache.org/lucene-java/LuceneFAQ

> >
> >
> >
>
E2E(端到端)测试是一种软件测试方法,用于模拟实际用户工作流程,以确保系统在各个层面的交互和功能都能正常运行。在Microsar中,集成E2E测试需要以下步骤: 1. 定义测试场景:根据系统的需求和功能,定义需要测试的场景,包括用户交互、系统响应和数据传输等方面。 2. 编写测试用例:根据定义的测试场景,编写相应的测试用例,包括输入数据、预期输出和测试步骤等内容。 3. 配置测试环境:搭建适合进行E2E测试的环境,包括硬件设施、网络连接和数据模拟等。 4. 开发测试脚本:根据定义的测试用例,使用适合的测试工具或编程语言,开发E2E测试脚本,以模拟实际用户操作并验证系统功能。 5. 运行测试:在搭建好的测试环境中,运行开发好的测试脚本,观察系统的响应和输出结果,以验证系统在端到端的交互和功能是否正常。 6. 分析测试结果:根据测试运行的结果,分析系统在不同场景下的表现,发现并解决潜在的问题和缺陷。 7. 集成到开发流程:将E2E测试集成到Microsar的开发流程中,例如自动化测试框架或持续集成工具中,以确保每次代码修改都能够通过端到端的测试验证。 通过以上步骤,可以有效地将E2E测试集成到Microsar中,提高系统的质量和稳定性,确保系统在不同层面的交互和功能都能够正常运行。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值