activemq基础之:(三)active-admin命令行管理工具

activemq-admin命令:

1、start
Creates and starts a broker using a configuration file, or a broker URI.
使用配置文件或代理URI创建和启动代理。
例子:

activemq-admin start(启动localhost)

activemq-admin start xbean:file:E:/apache-activemq-5.7.0/aaa/conf/activemq.xml

2、create
Creates a runnable broker instance in the specified path
创建一个可以运行的代理实例,在指定的路径。
做用是创建后,可以起多个实例,每个实例有自己的Queues和Topics,但是实例共用kahadb数据库。
例子:

activemq-admin create E:\apache-activemq-5.7.0\aaa

3、stop
Stops a running broker specified by the broker name.
停止一个指定代理名称的代理。
broker name配置在activemq.xml中。
例子:

activemq-admin stop aaa

4、list
Lists all available brokers in the specified JMX context.
列出在JMX中所有可用的代理。
例子:

activemq-admin list
...
Connecting to pid: 7868
BrokerName = aaa

5、query
Display selected broker component’s attributes and statistics.
显示选定的代理组件的属性和统计信息。

6、browse
Display selected messages in a specified destination.

7、journal-audit
Allows you to view records stored in the persistent journal.

8、purge
Delete selected destination’s messages that matches the message selector

9、encrypt
Encrypts given text

10、decrypt
Decrypts given text

activemq基础之:(二)activemq目录结构和启动

一、activemq目录结构

apache-activemq-5.7.0
├─bin(启动脚本)
│  ├─win32
│  └─win64
├─conf(配置文件)
├─data(日志文件)
├─docs(说明文档)
├─example(例子:包括配置文件、代码)
│  ├─conf
│  ├─perfharness
│  ├─ruby
│  ├─src
│  └─transactions
│      └─src
├─lib(activemq用到的jar包)
│  ├─camel
│  ├─extra
│  ├─optional
│  └─web
└─webapps(管理台的应用)
    ├─admin
    │  ├─decorators
    │  ├─images
    │  ├─js
    │  │
    │  ├─META-INF
    │  ├─styles
    │  ├─test
    │  ├─WEB-INF
    │  │
    │  └─xml
    ├─demo
    │  ├─js
    │  ├─META-INF
    │  ├─portfolio
    │  ├─sandbox
    │  ├─test
    │  │
    │  ├─WEB-INF
    │  └─websocket
    ├─fileserver
    │  ├─META-INF
    │  └─WEB-INF
    │
    └─styles


继续阅读activemq基础之:(二)activemq目录结构和启动

activemq基础之:(一)什么是JMS

一、什么是JMS
JMS即Java消息服务(Java Message Service)应用程序接口,是一个Java平台中关于面向消息中间件(MOM)的API,用于在两个应用程序之间,或分布式系统中发送消息,进行异步通信。Java消息服务是一个与具体平台无关的API,绝大多数MOM提供商都对JMS提供支持(百度百科给出的概述)。我们可以简单的理解:两个应用程序之间需要进行通信,我们使用一个JMS服务,进行中间的转发,通过JMS的使用,我们可以解除两个程序之间的耦合。

二、JMS的优势  
Asynchronous(异步)
JMS is asynchronous by default. So to receive a message, the client is not required to send the request. The message will arrive automatically to the client as they become available.
(JMS原本就是一个异步的消息服务,客户端获取消息的时候,不需要主动发送请求,消息会自动发送给可用的客户端。)

Reliable(可靠)
JMS provides the facility of assurance that the message will delivered once and only once. You know that duplicate messages create problems. JMS helps you avoiding such problems.
(JMS保证消息只会递送一次。大家都遇到过重复创建消息问题,而JMS能帮你避免该问题。)
继续阅读activemq基础之:(一)什么是JMS

身体发出的信号

有时候工作压力大、疲劳或熬夜后,身体会有一些症状提醒你要注意休息了。
1}掉头发
2)发痘痘
3)口腔发溃疡
4)脖子淋巴会肿
5)身上发出红色血点
6)头晕
7)感觉心脏跳的很快
8)手指甲有黑线
9)手指甲开裂

有以上症状说明身体不适了,关键要保证睡眠时间!!

Linux进程后台运行方法

当用户注销(logout)或者网络断开时,登录的终端会收到HUP(hangup)信号从而关闭其所有子进程。我们可以使用3个命令来实现进程后台运行。

1、nohup
nohup的用途就是让提交的命令忽略hangup信号。

举例:

nohup ./startup.sh &

后台运行tomcat

2、setsid
setsid的作用是让运行的进程不属于接受HUP信号的终端的子进程。

举例:
比如bash登录上来ppid是10627

UID        PID  PPID  C STIME TTY          TIME CMD
root       521     1  0 May21 ?        00:00:01 /usr/sbin/sshd
root     10625   521  0 00:56 ?        00:00:00 sshd: root@pts/0 
root     10627 10625  0 00:56 pts/0    00:00:00 -bash


这时ping一个网址

ping www.google.com

在另一个窗口查看

ps -ef | grep ping

UID        PID  PPID  C STIME TTY          TIME CMD
root     10664 10627  0 00:57 pts/0    00:00:00 ping www.google.com


用setsid后PPID变为1(init进程ID),不会接受HUP信号

setsid ping www.google.com
ps -ef | grep ping

UID        PID  PPID  C STIME TTY          TIME CMD
root     10668     1  0 00:58 ?        00:00:00 ping www.google.com


3、screen
screen可以在后台创建会话,从而让进程在后台运行。

screen常用命令:
screen:开一个窗口
screen -r:恢复进入窗口
screen -r -D:强行进入窗口
在screen窗口内:Ctrl + A D 窗口后台运行
screen -ls:查看全部session列表
screen -d -r:连接一个screen进程,如果该进程是attached,就先踢掉远端用户再连接。
screen -D -r:连接一个screen进程,如果该进程是attached,就先踢掉远端用户并让他logout再连接

weblogic目录结构

1、admin server
admin server就是console控制台,起了admin server就能打开控制台

2、manage server
manage server是被管理服务器,可在控制台上添加(服务器-新建)

3、domain
admin server、manage server要在domain下面

domain - admin server
                  ├── manage server1
                  └── manage server2

4、domain目录结构
weblogic安装目录/bea/Oracle/Middleware/user_projects下的:

domain - ips_domain
                ├── bin (domain的启动脚本)
                ├── config (配置文件)
                ├── security
                ├── servers (domain下的服务器)
                ├── autodeploy
                ├── console-ext
                ├── init-info
                ├── lib (the domain library directory and is usually located at $DOMAIN_DIR/lib)
                ├── pending
                └── tmp

servers下层目录:

domain - ips_domain - servers - pbcs
                                 ├── cache
                                 ├── data
                                 ├── logs (服务器的连接日志)
                                 ├── security (boot.properties)
                                 ├── stage (应用缓存*)
                                 └── tmp

5、weblogic安装目录结构

/bea/Oracle/Middleware
                 ├── coherence_3.5
                 ├── domain-registry.xml (记录domain的条目)
                 ├── logs
                 ├── modules (weblogic运行时需要的jar文件)
                 ├── registry.dat
                 ├── registry.xml (描述产品信息)
                 ├── user_projects (域存放的位置)
                 ├── utils (用户可以存放的第三方工具包)
                 └── wlserver_10.3 (weblogic的主目录)

6、weblogic清缓存
删除domain/servers/(server名)/stage/应用名称里的所有东西

7、stage、nostage发布方式
stage模式:weblogic会将web应用复制到servers下的stage目录,然后运行stage目录里的项目缓存
nostage模式:直接运行web应用安装目录下的项目

8、weblogic状态
就绪 -> starting(启动) -> start running(启动运行中) -> runing(完成-活动)
到就绪状态,容器就ok了,后面是服务器应用的问题

oracle 创建索引 create index online

普通创建索引的命令create index会先锁表,然后再创建索引,如果表中数据量很大,会造成阻塞DML语句。

加了online后,可以以非独占的方式创建和删除索引。

但是加online字段有一些限制:
ONLINE
Specify ONLINE to indicate that DML operations on the table will be allowed during creation of the index.

Restrictions on Online Index Building
Parallel DML is not supported during online index building. If you specify ONLINE and then issue parallel DML statements, Oracle returns an error.
You cannot specify ONLINE for a bitmap index or a cluster index.
You cannot specify ONLINE for a conventional index on a UROWID column.
For a unique index on an index-organized table, the number of index key columns plus the number of primary key columns in the index-organized table cannot exceed 32.

参考资料:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_5012.htm

朋友圈

微信状态:
1、朋友仅展示最近半年的朋友圈
设置 – 隐私内选择的

2、朋友圈是一条线和一点
被删除了,或被屏蔽了朋友圈(发消息没有提示被对方拒收,也没有提示发送好友验证)

3、好友-详细资料没有相册这一栏
对方关闭了朋友圈功能

[转]戒指国际佩戴含义说法

按西方的传统习惯来说,左手显示的是上帝赐给你的运气,因此,在西方国家,戒指通常戴在左手上。不佩戴戒指表示单身。西方早期医学认为,左手无名指在双手十指中与心脏的距离最近,所以将代表婚姻的戒指戴在左手无名指上,珠宝进而体现出爱情的神圣地位,并流传至今。
  简单记忆法,其实很好记的,四个字,清热解毒。
  食指、中指、无名指、小手指依次为青(年)、热(恋)、结(婚)、独(身)。
  关于左手
  1、食指--未婚、想结婚 ; 
  2、中指--已经在恋爱中 ; 
  3、无名指--已经订婚或结婚;
  4、小手指--单身贵族(少数地区亦代表同性恋者)。
  关于右手  
  只有无名指戴戒指有特殊含义,是表示具有修女的心性。
  关于大拇指
  西方的审美观念上,戒指戴在大拇指上是十分奇怪的,不仅不美观,且影响手部运动,所以西方人很少将戒指佩戴在大拇指上。

食指 :清,请追求我
中指 :热,热恋中
无名指:解,结婚了
小指 :毒,独身主义
从上往下,清热解毒

软件及互联网爱好者