我目前正在尝试将网络应用程序从 JOnAS 5.2.2 迁移到 JBoss 7.2.0 。
我在JBoss服务器下部署时遇到了一些麻烦,因为我的应用程序通常使用JOnAS提供的CAROL库。
通常,carol.properties
文件位于 JONAS_HOME / conf / 下。
我的应用程序是通过这个bean使用它:
<bean id="clientConnector"
class="com.szk.myapp.common.jonas.JonasMBeanServerConnectionFactoryBean">
<property name="jrmpUrl" value="$kpi{rmi.host}" />
<property name="jonasInstanceName" value="${jonas.server.name}" />
</bean>
但是对于JBoss,它不起作用:当然,它正在 null / conf /
路径下寻找 carol.properties 文件# Copyright (C) 2002-2007 ObjectWeb
#
# CAROL: Common Architecture for RMI ObjectWeb Layer
#
# This library is developed inside the ObjectWeb Consortium,
# http://www.ow2.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#
# --------------------------------------------------------------------------
# $Id: carol.properties 19269 2010-02-21 14:17:59Z manmand $
# --------------------------------------------------------------------------
# jonas rmi activation (iiop, irmi, jrmp, lmi)
carol.protocols=jrmp
# RMI IRMI URL
carol.irmi.url=rmi://localhost:1098
# RMI JRMP URL
carol.jrmp.url=rmi://localhost:1099
# RMI IIOP URL
carol.iiop.url=iiop://localhost:2001
# RMI LMI URL (no listening port)
carol.lmi.url=rmi://localhost:0
######################################################################
# Advanced Configuration for IRMI
######################################################################
# Exported objects will listen on this port for remote method
# invocations.
#A value of 0 will cause a random port to be selected.
# This is the default value.
# Warning : if the port is set (not 0) with the value 'n', be aware that
# the port 'n + 1' will be used by the JMX server.
# So, for the firewall configuration, you have to open the port numbers 'n'
# and 'n+1'.
carol.irmi.server.port=0
# Use only a single interface when creating the registry
# (specified in carol.irmi.url property)
# Use all interfaces available [default configuration = false]
carol.irmi.interfaces.bind.single=false
######################################################################
# Advanced Configuration for JRMP
######################################################################
# If true, local call with jrmp are optimized. If you get "ClassCastException
# with 2 beans in different jars, you should set it at "false".
carol.jvm.rmi.local.call=false
# If true a local Naming context is used (to be used only with a collocated registry)
carol.jvm.rmi.local.registry=true
# The value of this port is used to set the port of the objects listener.
# This allow to use this port for a firewall configuration.
# If registry and server are on same host, the two ports to open are the following and the registry port.
# 0 means random port [default configuration = 0]
carol.jrmp.server.port=0
# Use only a single interface when creating the registry
# (specified in carol.jrmp.url property)
# Use all interfaces available [default configuration = false]
carol.jrmp.interfaces.bind.single=false
######################################################################
# Advanced Configuration for IIOP
######################################################################
# The value of this port is used to set the port of the objects listener.
# This allow to use this port for a firewall configuration.
# If registry and server are on same host, the two ports to open are the following and the registry port.
# 0 means random port [default configuration = 0]
carol.iiop.server.port=0
# The value of this port is used to set the SSL port of the objects listener.
# Note that this port musn't not be set to 0 as it is used for CsiV2.
# but this port is used only if SSL mode is enable.
# So by default, there is no listener on this port
# [default configuration = not used]
carol.iiop.server.sslport=2003
# Delegate used by JOnAS for rmi-iiop protocol
carol.iiop.PortableRemoteObjectClass=org.ow2.jonas.registry.carol.delegate.JacORBPRODelegate
######################################################################
# Advanced JNDI Configuration
######################################################################
carol.jndi.java.naming.factory.url.pkgs=org.ow2.jonas.lib.naming
有没有人知道如何让它在JBoss下工作?
任何建议都非常受欢迎。
谢谢。