首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >ActiveMQ消息去排队但未被消耗

ActiveMQ消息去排队但未被消耗
EN

Stack Overflow用户
提问于 2016-02-09 19:51:13
回答 1查看 2.2K关注 0票数 2

我有一个JBoss web应用程序,该应用程序目前正在使用嵌入式HornetQ进行JMS。我们想切换到一个ActiveMQ HA集群,但是我遇到了一些奇怪的问题。我的一个队列(periodicDerivationQueue)没有像对HornetQ那样运行。AMQ控制台显示消息是排队的和退出队列的,但是它们并没有对我的使用者产生影响。起初,我认为消息是出于某种原因而排到DLQ中的,但情况似乎并非如此。据我所知,AMQ不会创建DLQ,除非它是必要的。当我看经纪人的时候,没有DLQ。我怎样才能知道我的信息要去哪里?

由于反射,我在堆栈的应用程序端调试也有困难。我想在AMQ方面设置一个断点,看看我的消息发生了什么,但我不知道该放在哪里。这里有什么想法吗?

这可能是序列化问题吗?我听说有时JMS代理之间序列化的差异会导致奇怪的行为。

我真的被困在这里了,任何帮助都将不胜感激。请参阅下面的配置信息。

野蝇8.2

AMQ 5.13

消费者(消息不在此制作)

代码语言:javascript
运行
AI代码解释
复制
public class PeriodicDerivationExecutionHandlerImpl implements PeriodicDerivationExecutionHandler {

protected DerivationService derivationService;
protected DerivationModelService derivationModelService;

protected Logger logger = LoggerFactory.getLogger(this.getClass());

@Override
public void executeDerivation(PeriodicDerivation params) throws Exception{

    JbpmHibernateUtil.openSession();
    Derivation derivation = null;
    try{            

        if (params.isGroup()){
            derivation = new GroupDerivation();

            GroupQueryParameters qp = new GroupQueryParameters();
            qp.setGroupName(params.getItemName());
            derivation.setDerivedItem(derivationModelService.getGroup(qp));

        }else{
            derivation = new DeterminantDerivation();

            DeterminantQueryParameters qp = new DeterminantQueryParameters();
            qp.setDeterminantName(params.getItemName());            
            derivation.setDerivedItem(derivationModelService.getDeterminant(qp));

        }

        logger.info("Executing periodic derivation [" + derivation + "]");

        derivation.setModelEffectiveDate(new DateTime());
        derivation.setPeriod(params.getPeriod());
        derivation.getProcessParameters().add(new DerivationProcessParameter(PeriodicDerivation.PERIODIC_PROCESS_VAR, true));
        derivation.setExecutionMode(DerivationExecutionMode.SYNCHRONOUS_LOCAL);
        derivationService.executeDerivation(derivation);

        JbpmHibernateUtil.closeSession(true);
    }catch(Exception e){
        logger.error("Periodic derivation execution failed for [" + derivation + "]",e);
        JbpmHibernateUtil.closeSession(false);
        throw new Exception("Periodic derivation execution failed for [" + derivation + "]",e);
    }
}

public DerivationService getDerivationService() {
    return derivationService;
}

public void setDerivationService(DerivationService derivationService) {
    this.derivationService = derivationService;
}

public DerivationModelService getDerivationModelService() {
    return derivationModelService;
}

public void setDerivationModelService(DerivationModelService derivationModelService) {
    this.derivationModelService = derivationModelService;
}

}

消费者XML配置

代码语言:javascript
运行
AI代码解释
复制
<int:gateway id="periodicDerivationExecutionGateway"
        service-interface="com.etse.jbpm.scheduler.PeriodicDerivationExecutionHandler">
        <int:method name="executeDerivation" request-channel="periodicDerivationChannel" />
    </int:gateway>

    <bean id="periodicDerivationExecutor"
        class="com.etse.jbpm.scheduler.PeriodicDerivationExecutionHandlerImpl">
        <property name="derivationService" ref="derivationService" />
        <property name="derivationModelService" ref="derivationModelService" />
    </bean>

    <int:service-activator input-channel="periodicDerivationChannel"
        ref="periodicDerivationExecutor" method="executeDerivation" />

    <int-jms:channel id="periodicDerivationChannel"
        queue-name="${jms.destination.name.periodicderivation}" concurrency="${integration.listener.threads.maximum}"
        task-executor="periodicDerivationTaskExecutor" />

ActiveMQ Standalone.xml (Jboss)

代码语言:javascript
运行
AI代码解释
复制
<subsystem xmlns="urn:jboss:domain:resource-adapters:2.0">
        <resource-adapters>
            <resource-adapter id="activemq-rar.rar">
                <archive>
                    activemq-rar.rar
                </archive>
                <transaction-support>XATransaction</transaction-support>
                <config-property name="ServerUrl">
                    tcp://127.0.0.1:61616?jms.rmIdFromConnectionId=true
                </config-property>
                <config-property name="UserName">
                    admin
                </config-property>
                <config-property name="Password">
                    admin
                </config-property>
                <connection-definitions>

                    <connection-definition 
                       class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" 
                       jndi-name="java:/ConnectionFactory"  
           enabled="true" 
           pool-name="ConnectionFactory"> 
                        <xa-pool>
                            <min-pool-size>1</min-pool-size>
                            <max-pool-size>20</max-pool-size>
                            <prefill>false</prefill>
                            <is-same-rm-override>false</is-same-rm-override>
                        </xa-pool>
                        <recovery>
                            <recover-credential>
                                <user-name>admin</user-name>
                                <password>admin</password>
                            </recover-credential>
                            <recover-plugin class-name="org.jboss.jca.core.recovery.ConfigurableRecoveryPlugin">
                                <config-property name="EnableIsValid">
                                    false
                                </config-property>
                                <config-property name="IsValidOverride">
                                    true
                                </config-property>
                                <config-property name="EnableClose">
                                    true
                                </config-property>
                            </recover-plugin>
                        </recovery>
                    </connection-definition>

                </connection-definitions>

Queues/Topics

代码语言:javascript
运行
AI代码解释
复制
<admin-objects>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" 
                                jndi-name="java:jboss/exported/jms/queue/bpm/deferredBpmCommandQueue" 
                                use-java-context="true" 
                                pool-name="deferredBpmCommandQueue">
                        <config-property name="PhysicalName">
                            deferredBpmCommandQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" 
                                jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionRequestQueue" 
                                use-java-context="true" 
                                pool-name="ActiveMQQueue.asyncActionRequestQueue">
                        <config-property name="PhysicalName">
                            asyncActionRequestQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" 
                                jndi-name="java:jboss/exported/jms/queue/bpm/DLQ" 
                                use-java-context="true" 
                                pool-name="DLQ">
                        <config-property name="PhysicalName">
                            DLQ
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/cacheUpdateReplicationQueue" use-java-context="true" pool-name="ActiveMQQueue.cacheUpdateReplicationQueue">
                        <config-property name="PhysicalName">
                            cacheUpdateReplicationQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/periodicDerivationQueue" use-java-context="true" pool-name="ActiveMQQueue.periodicDerivationQueue">
                        <config-property name="PhysicalName">
                            periodicDerivationQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/asyncServiceSignalQueue" use-java-context="true" pool-name="ActiveMQQueue.asyncServiceSignalQueue">
                        <config-property name="PhysicalName">
                            asyncServiceSignalQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/processEventTopic" use-java-context="true" pool-name="ActiveMQTopic.processEventTopic">
                        <config-property name="PhysicalName">
                            processEventTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionReplyQueue" use-java-context="true" pool-name="ActiveMQQueue.asyncActionReplyQueue">
                        <config-property name="PhysicalName">
                            asyncActionReplyQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/ExpiryQueue" use-java-context="true" pool-name="ActiveMQQueue.ExpiryQueue">
                        <config-property name="PhysicalName">
                            ExpiryQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionServiceStatusRequestTopic" use-java-context="true" pool-name="ActiveMQTopic.asyncActionServiceStatusRequestTopic">
                        <config-property name="PhysicalName">
                            asyncActionServiceStatusRequestTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionAffinityRequestTopic" use-java-context="true" pool-name="ActiveMQTopic.asyncActionAffinityRequestTopic">
                        <config-property name="PhysicalName">
                            asyncActionAffinityRequestTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/jbpmJobQueue" use-java-context="true" pool-name="ActiveMQQueue.jbpmJobQueue">
                        <config-property name="PhysicalName">
                            jbpmJobQueue
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionAffinityReplyTopic" use-java-context="true" pool-name="ActiveMQTopic.asyncActionAffinityReplyTopic">
                        <config-property name="PhysicalName">
                            asyncActionAffinityReplyTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/cacheUpdateReplicationEventTopic" use-java-context="true" pool-name="ActiveMQTopic.cacheUpdateReplicationEventTopic">
                        <config-property name="PhysicalName">
                            cacheUpdateReplicationEventTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionServiceStatusTopic" use-java-context="true" pool-name="ActiveMQTopic.asyncActionServiceStatusTopic">
                        <config-property name="PhysicalName">
                            asyncActionServiceStatusTopic
                        </config-property>
                    </admin-object>
                    <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/jms/queue/bpm/asyncActionServiceLogRecordQueue" use-java-context="true" pool-name="ActiveMQQueue.asyncActionServiceLogRecordQueue">
                        <config-property name="PhysicalName">
                            asyncActionServiceLogRecordQueue
                        </config-property>
                    </admin-object>
                </admin-objects>

Broker配置

代码语言:javascript
运行
AI代码解释
复制
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>file:${activemq.conf}/credentials.properties</value>
    </property>
</bean>


<bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
      lazy-init="false" scope="singleton"
      init-method="start" destroy-method="stop">
</bean>

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker1" dataDirectory="${activemq.data}" persistent="true"> 

    <destinationPolicy>
        <policyMap>
          <policyEntries>
            <policyEntry topic=">" >

              <pendingMessageLimitStrategy>
                <constantPendingMessageLimitStrategy limit="1000"/>
              </pendingMessageLimitStrategy>
            </policyEntry>
          </policyEntries>
        </policyMap>
    </destinationPolicy>


    <managementContext>
        <managementContext createConnector="false"/>
    </managementContext>


    <persistenceAdapter>
      <kahaDB directory="${activemq.data}/kahadb"/> 
    </persistenceAdapter>

      <systemUsage>
        <systemUsage>
            <memoryUsage>
                <memoryUsage percentOfJvmHeap="70" />
            </memoryUsage>
            <storeUsage>
                <storeUsage limit="100 gb"/>
            </storeUsage>
            <tempUsage>
                <tempUsage limit="50 gb"/>
            </tempUsage>
        </systemUsage>
    </systemUsage>


    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    </transportConnectors>

    <shutdownHooks>
        <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
    </shutdownHooks>

</broker>
<import resource="jetty.xml"/>

HornetQ Standalone.xml (Jboss)

代码语言:javascript
运行
AI代码解释
复制
<subsystem xmlns="urn:jboss:domain:messaging:2.0">
        <hornetq-server>
            <persistence-enabled>false</persistence-enabled>
            <jmx-management-enabled>true</jmx-management-enabled>
            <shared-store>true</shared-store>
            <journal-type>ASYNCIO</journal-type>
            <journal-file-size>102400</journal-file-size>
            <journal-min-files>2</journal-min-files>

            <connectors>
                <netty-connector name="netty" socket-binding="messaging"/>
                <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
                    <param key="batch-delay" value="50"/>
                </netty-connector>
                <in-vm-connector name="in-vm" server-id="0"/>
            </connectors>

            <acceptors>
                <netty-acceptor name="netty" socket-binding="messaging"/>
                <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                    <param key="batch-delay" value="50"/>
                    <param key="direct-deliver" value="false"/>
                </netty-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0"/>
            </acceptors>

            <security-settings>
                <security-setting match="#">
                    <permission type="send" roles="guest"/>
                    <permission type="consume" roles="guest"/>
                    <permission type="createNonDurableQueue" roles="guest"/>
                    <permission type="deleteNonDurableQueue" roles="guest"/>
                </security-setting>
            </security-settings>

            <address-settings>
                <address-setting match="#">
                    <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                    <expiry-address>jms.queue.ExpiryQueue</expiry-address>
                    <redelivery-delay>0</redelivery-delay>
                    <max-size-bytes>104857600</max-size-bytes>
                    <page-size-bytes>10485760</page-size-bytes>
                    <page-max-cache-size>10</page-max-cache-size>
                    <address-full-policy>PAGE</address-full-policy>
                    <message-counter-history-day-limit>10</message-counter-history-day-limit>
                </address-setting>
            </address-settings>

            <jms-connection-factories>
                <connection-factory name="InVmConnectionFactory">
                    <connectors>
                        <connector-ref connector-name="in-vm"/>
                    </connectors>
                    <entries>
                        <entry name="java:/ConnectionFactory"/>
                    </entries>
                </connection-factory>
                <connection-factory name="RemoteConnectionFactory">
                    <connectors>
                        <connector-ref connector-name="netty"/>
                    </connectors>
                    <entries>
                        <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                    </entries>
                    <client-failure-check-period>30000</client-failure-check-period>
                    <connection-ttl>300000</connection-ttl>
                    <retry-interval>2000</retry-interval>
                    <retry-interval-multiplier>1</retry-interval-multiplier>
                    <max-retry-interval>2000</max-retry-interval>
                    <reconnect-attempts>100</reconnect-attempts>
                </connection-factory>
            </jms-connection-factories>

Queues/Topics

代码语言:javascript
运行
AI代码解释
复制
<jms-destinations>
                <jms-queue name="asyncActionRequestQueue">
                    <entry name="queue/bpm/asyncActionRequestQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/asyncActionRequestQueue"/>
                </jms-queue>
                <jms-queue name="asyncActionReplyQueue">
                    <entry name="queue/bpm/asyncActionReplyQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/asyncActionReplyQueue"/>
                </jms-queue>
                <jms-queue name="asyncServiceSignalQueue">
                    <entry name="queue/bpm/asyncServiceSignalQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/asyncServiceSignalQueue"/>
                </jms-queue>
                <jms-queue name="asyncActionServiceLogRecordQueue">
                    <entry name="queue/bpm/asyncActionServiceLogRecordQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/asyncActionServiceLogRecordQueue"/>
                </jms-queue>
                <jms-queue name="deferredBpmCommandQueue">
                    <entry name="queue/bpm/deferredBpmCommandQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/deferredBpmCommandQueue"/>
                </jms-queue>
                <jms-queue name="jbpmJobQueue">
                    <entry name="queue/bpm/jbpmJobQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/jbpmJobQueue"/>
                </jms-queue>
                <jms-queue name="DLQ">
                    <entry name="queue/DLQ"/>
                    <entry name="java:jboss/exported/jms/queue/DLQ"/>
                </jms-queue>
                <jms-queue name="ExpiryQueue">
                    <entry name="queue/ExpiryQueue"/>
                    <entry name="java:jboss/exported/jms/queue/ExpiryQueue"/>
                </jms-queue>
                <jms-queue name="periodicDerivationQueue">
                    <entry name="queue/bpm/periodicDerivationQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/periodicDerivationQueue"/>
                </jms-queue>
                <jms-queue name="cacheUpdateReplicationQueue">
                    <entry name="queue/bpm/cacheUpdateReplicationQueue"/>
                    <entry name="java:jboss/exported/jms/queue/bpm/cacheUpdateReplicationQueue"/>
                </jms-queue>
                <jms-topic name="asyncActionServiceStatusTopic">
                    <entry name="topic/bpm/asyncActionServiceStatusTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/asyncActionServiceStatusTopic"/>
                </jms-topic>
                <jms-topic name="asyncActionServiceStatusRequestTopic">
                    <entry name="topic/bpm/asyncActionServiceStatusRequestTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/asyncActionServiceStatusRequestTopic"/>
                </jms-topic>
                <jms-topic name="asyncActionAffinityRequestTopic">
                    <entry name="topic/bpm/asyncActionAffinityRequestTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/asyncActionAffinityRequestTopic"/>
                </jms-topic>
                <jms-topic name="asyncActionAffinityReplyTopic">
                    <entry name="topic/bpm/asyncActionAffinityReplyTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/asyncActionAffinityReplyTopic"/>
                </jms-topic>
                <jms-topic name="processEventTopic">
                    <entry name="topic/bpm/processEventTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/processEventTopic"/>
                </jms-topic>
                <jms-topic name="cacheUpdateReplicationEventTopic">
                    <entry name="topic/bpm/cacheUpdateReplicationEventTopic"/>
                    <entry name="java:jboss/exported/jms/topic/bpm/cacheUpdateReplicationEventTopic"/>
                </jms-topic>
            </jms-destinations>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-12 12:04:55

ObjectMessage序列化安全性是问题所在。

ObjectMessage对象依赖于Java序列化的封送/解封送对象有效负载。此过程通常被认为是不安全的,因为恶意有效载荷可以利用主机系统。这就是为什么从5.12.2和5.13.0版本开始,ActiveMQ强制用户显式地使用ObjectMessages交换白名单包。

几天前我看到了这个,并增加了一个白名单,但它没有解决这个问题。我还试着与AMQ5.11.3竞争,但没有奏效。显然,他们也在5.11.3中增加了安全功能。无论如何,我将这个(-Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*")添加到客户端和AMQ参数中,现在一切都正常工作。

请记住,我使用的命令行选项是我在代理中显式打开的安全漏洞,它允许恶意用户在我的系统上执行代码。使用该标志的正确方法是显式列出允许反序列化的类,或者最多使用包通配符来避免显式列出受信任父包中的单个类和子包。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35306494

复制
相关文章
web.xml is missing and <failOnMissingWebXml> is set to true
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决! 当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下: <build> <plugins> <plugin> <groupId
似水的流年
2018/01/18
5940
web.xml is missing and <failOnMissingWebXml> is set to true
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!
似水的流年
2018/01/12
6620
web.xml is missing and <failOnMissingWebXml> is set to true
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub
ydymz
2018/09/10
5120
web.xml is missing and is set to true
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!
似水的流年
2019/12/10
4240
web.xml is missing and <failOnMissingWebXml> is set to true[解决]
今天创建一个maven项目 出现如下错误: web.xml is missing and is set to true 在项目视图下 右键 单击项目名  选择 “Deployment Descriptor”  选择 : Generate Deployment Descriptor Stub 产生 WEB-INF 文件夹和 web.xml 文件  即可解决问题
明明如月学长
2021/08/27
1890
创建 WebRTC 会话
一WebRTC 是一套基于 Web 的实时通信解决方案,通过浏览器内置的 API 来支持音视频通道的搭建。
派大星在吗
2021/12/05
5.6K0
Hibernate之集合映射的使用(Set集合映射,list集合映射,Map集合映射)
别先生
2018/01/02
2.8K0
Hibernate之集合映射的使用(Set集合映射,list集合映射,Map集合映射)
hibernate自动建表
表结构和数据总是在程序执行的时候无端的修改,折腾了好长时间,查了很长时间hibernate的数据库映射文件和接口程序,始终没有发现有什么错误,到最后才发现了它!
似水的流年
2019/12/05
1.7K0
hibernate笔记(一)
原始的jdbc操作, Connection/Statement/ResultSet
HUC思梦
2020/09/03
8280
hibernate进阶操作
配置hibernate.cfg.xml配置文件 1.连接数据库 2.数据库方言 3.控制台是否显示sql语句 4.给控制台sql语句添加格式
微醺
2019/01/17
5570
异常dockgeddon导致 cpu 100%
3,查看容器监控确定是哪个容器产生了问题(因为我这个机器上就运行了 docker)
张琳兮
2021/04/26
9410
异常dockgeddon导致 cpu 100%
Hibernate的基本配置
文章目录 1. Hibernate的基本配置 1.1. 核心配置文件(hibernate.cfg.xml) 1.1.1. 必须的配置(配置数据库信息) 1.1.2. 可选的配置 1.1.3. 实例 1.2. 映射关系文件 1.2.1. 作用 1.2.2. 缺点 1.2.3. 创建 1.2.4. 属性 1.2.5. 实例 1.2.6. 注意 1.3. SQL方言 1.3.1. 常用的方言(Mysql,Oracle) 1.4. 主键生成方式 1.4.1. 如何使用 1.4.2. 分类 1.4.3. 常见的分
爱撒谎的男孩
2019/12/31
9310
简述hibernate配置文件的作用[java加载xml配置文件]
1主配置文件Hibernate.cfg.xml主配置文件中主要配置:数据库连接信息、其他参数、映射信息!常用配置查看源码:hibernate-distribution-3.6.0.Final
Java架构师必看
2022/03/12
1K0
求并集----set_union
并集 注意: 有序序列,顺序一致 返回值为接收并集数据的迭代器的最后一个元素迭代器地址 #include<iostream> using namespace std; #include<vecto
大忽悠爱学习
2021/03/02
2210
求并集----set_union
[PHP] 配置vscode的语法检测消除提示Cannot validate since no PHP executable is set
默认下载完vscode什么都不做,会提示一下信息 Cannot validate since no PHP executable is set. Use the setting 'php.validate.executablePath' to configure the PHP executable.
唯一Chat
2019/10/15
1.2K0
[PHP] 配置vscode的语法检测消除提示Cannot validate since no PHP executable is set
Hibernate之关联关系映射(一对一主键映射和一对一外键映射)
本文讲述了如何使用Hibernate进行一对一关联映射,通过实例介绍了User和IdCart两个实体类,以及如何在Hibernate中配置一对一关联映射。
别先生
2018/01/02
1.3K0
hostmonitor对异常用户会话的监控
1.trade@front,创建/home/trade/monitor目录 2.上传脚本至/home/trade/shell下,
小尘哥
2018/12/25
6320
DNS转发导致CDN调度异常
当我们需要访问www.baidu.com这个站点时,我们就会在浏览器地址栏中输入http://www.baidu.com这样一个url。实际上我们想要浏览的网页内容都存放在互联网的某台服务器上,而 DNS 的任务就是找到我们想要访问的这台服务器的 IP 地址,然后向它请求内容。 DNS 地址解析是在 HTTP 连接建立之前的一个过程。 本地 DNS 服务器得到浏览器的域名解析请求后,会采用递归查询方式或者迭代查询方式向 DNS 系统中的其他远程域名服务器提出查询要求。
mengmye
2021/07/06
6.8K1
点击加载更多

相似问题

missing column fail .filter?

119

如何阻止机器人发布并导致异常

22

使用validate阻止更新

10

IceFaces会话到期导致异常

14

Flask-Sqlalchemy Missing BEGIN似乎导致会话不同步

10
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文