Mule ESB 3.6起動
Mule 3.7での同エントリを書きました。
Mule ESB 3.6をしばらく触ってみようと思います。 環境はOSX 10.10.4です。
Mule ESB 3.6ダウンロード
今回はMule Community Editionでできることを調査しようと思います。 でもマニュアルにあるMule CEのダウンロードのリンクから移動しても、このEnterprise版のダウンロードページに飛ばされてしまいます。要確認だけど、取りあえず、こちらに含まれるStandaloneだけを使います。
Muleの起動
mmc-distribution-mule-console-bundle-3.6.1.zip
を解凍します。
MMCなども入っていますが、Runtimeモジュールのbinフォルダに移動します。
$ cd mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/bin
起動コマンドを実行します。
$ ./mule
起動ログ
いろんなソフトウェアをやっているとログは読み物だなと、思います。 ログを根気よく読むとソフトウェアが何をやっているのかが分かる。
$ ./mule MULE_HOME is set to /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1 Running in console (foreground) mode by default, use Ctrl-C to exit... MULE_HOME is set to /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 Running Mule Enterprise Edition... --> Wrapper Started as Console Java Service Wrapper Standard Edition 32-bit 3.5.19 Copyright (C) 1999-2013 Tanuki Software, Ltd. All Rights Reserved. http://wrapper.tanukisoftware.com Licensed to mulesoft.com for Mule ESB Enterprise Edition Launching a JVM... Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 Valid license key --> Evaluation = true, Expiration Date = Mon Aug 03 00:00:00 JST 2015, Contact Name = MuleSource Support, Contact Email Address = support@mulesource.com, Contact Telephone = support@mulesource.com, Contact Company = MuleSource, Contact Country = US, Entitlements = Starting the Mule Container... WrapperManager: Initializing... INFO 2015-07-04 06:56:00,050 [WrapperListener_start_runner] org.mule.module.launcher.MuleContainer: ********************************************************************** * Mule ESB and Integration Platform * * Version: 3.6.1 Build: 0758df2b * * MuleSoft, Inc. * * For more information go to * * http://www.mulesoft.com/mule-esb-enterprise * * * * Server started: 15/07/04 6:56 * * JDK: 1.7.0_71 (mixed mode) * * OS: Mac OS X (10.10.4, x86_64) * * Host: Ryohei-no-MacBook-Pro.local (192.168.11.5) * ********************************************************************** INFO 2015-07-04 06:56:00,089 [WrapperListener_start_runner] org.mule.module.launcher.coreextension.DefaultMuleCoreExtensionManager: Initializing core extensions INFO 2015-07-04 06:56:00,125 [WrapperListener_start_runner] com.mulesoft.mule.cluster.hazelcast.config.ClusterTicketFileLoader: /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/.mule/mule-cluster.properties (No such file or directory) WARN 2015-07-04 06:56:00,131 [WrapperListener_start_runner] com.mulesoft.mule.cluster.boot.ClusterCoreExtension: No cluster ID was specified -- High Availability will be disabled: INFO 2015-07-04 06:56:00,250 [WrapperListener_start_runner] com.mulesoft.mule.plugin.manager.MulePluginManager: Registering plugin: mule-plugin-debugger-3.6.0-RC1 INFO 2015-07-04 06:56:00,274 [WrapperListener_start_runner] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Mule Agent Core Extension'. Object is: AgentCoreExtension INFO 2015-07-04 06:56:00,453 [WrapperListener_start_runner] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker WARN 2015-07-04 06:56:00,721 [WrapperListener_start_runner] org.mule.module.ognl.expression.OgnlExpressionEvaluator: OGNL module is deprecated and will be removed in Mule 4.0. Use MEL expressions instead. INFO 2015-07-04 06:56:01,261 [WrapperListener_start_runner] org.mule.config.processors.DecoratingAnnotatedServiceProcessor: org.mule.config.AnnotationsParserFactory implementation not found in registry, annotations not enabled INFO 2015-07-04 06:56:01,863 [WrapperListener_start_runner] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-tx-log/tx1.log and /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-tx-log/tx2.log INFO 2015-07-04 06:56:01,883 [WrapperListener_start_runner] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-xa-tx-log/tx1.log and /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-xa-tx-log/tx2.log INFO 2015-07-04 06:56:01,885 [WrapperListener_start_runner] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-tx-log/tx1.log and /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-tx-log/tx2.log INFO 2015-07-04 06:56:01,886 [WrapperListener_start_runner] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-xa-tx-log/tx1.log and /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/./.mule/.agent/queue-xa-tx-log/tx2.log INFO 2015-07-04 06:56:01,945 [WrapperListener_start_runner] org.mule.lifecycle.AbstractLifecycleManager: Initialising model: _muleSystemModel INFO 2015-07-04 06:56:02,113 [WrapperListener_start_runner] org.mule.module.launcher.coreextension.DefaultMuleCoreExtensionManager: Starting core extensions INFO 2015-07-04 06:56:02,113 [WrapperListener_start_runner] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Mule Agent Core Extension'. Object is: AgentCoreExtension INFO 2015-07-04 06:56:02,114 [WrapperListener_start_runner] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager INFO 2015-07-04 06:56:02,114 [WrapperListener_start_runner] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager INFO 2015-07-04 06:56:02,128 [WrapperListener_start_runner] org.mule.modules.oauth2.provider.agents.DefaultSplashScreenAgent: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + DevKit Extensions (0) used in this application + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-07-04 06:56:02,129 [WrapperListener_start_runner] org.mule.lifecycle.AbstractLifecycleManager: Starting model: _muleSystemModel INFO 2015-07-04 06:56:02,137 [WrapperListener_start_runner] org.mule.module.management.agent.WrapperManagerAgent: Mule is embedded in a container already launched by a wrapper.Duplicates will not be registered. Use the org.tanukisoftware.wrapper:type=WrapperManager MBean instead for control. INFO 2015-07-04 06:56:02,153 [WrapperListener_start_runner] org.mule.DefaultMuleContext: ********************************************************************** * Application: .agent * * OS encoding: /, Mule encoding: UTF-8 * * * * Agents Running: * * DevKit Extension Information * * Batch module default engine * * Clustering Agent * * JMX Agent * ********************************************************************** INFO 2015-07-04 06:56:02,158 [WrapperListener_start_runner] org.eclipse.jetty.server.Server: jetty-9.0.7.v20131107 INFO 2015-07-04 06:56:02,371 [WrapperListener_start_runner] /mmc-support: Initializing Spring root WebApplicationContext INFO 2015-07-04 06:56:02,371 [WrapperListener_start_runner] org.springframework.web.context.ContextLoader: Root WebApplicationContext: initialization started INFO 2015-07-04 06:56:02,515 [WrapperListener_start_runner] org.springframework.web.context.support.XmlWebApplicationContext: Refreshing Root WebApplicationContext: startup date [Sat Jul 04 06:56:02 JST 2015]; root of context hierarchy INFO 2015-07-04 06:56:03,163 [WrapperListener_start_runner] org.springframework.web.context.support.ServletContextAttributeExporter: Exported ServletContext attribute with name 'discoveryEngine' INFO 2015-07-04 06:56:03,472 [WrapperListener_start_runner] org.quartz.core.SchedulerSignalerImpl: Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl INFO 2015-07-04 06:56:03,473 [WrapperListener_start_runner] org.quartz.core.QuartzScheduler: Quartz Scheduler v.1.8.5 created. INFO 2015-07-04 06:56:03,475 [WrapperListener_start_runner] org.quartz.simpl.RAMJobStore: RAMJobStore initialized. INFO 2015-07-04 06:56:03,476 [WrapperListener_start_runner] org.quartz.core.QuartzScheduler: Scheduler meta-data: Quartz Scheduler (v1.8.5) 'scheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads. Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered. INFO 2015-07-04 06:56:03,477 [WrapperListener_start_runner] org.quartz.impl.StdSchedulerFactory: Quartz scheduler 'scheduler' initialized from an externally provided properties instance. INFO 2015-07-04 06:56:03,477 [WrapperListener_start_runner] org.quartz.impl.StdSchedulerFactory: Quartz scheduler version: 1.8.5 INFO 2015-07-04 06:56:03,479 [WrapperListener_start_runner] org.quartz.core.QuartzScheduler: JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@5e8db999 INFO 2015-07-04 06:56:03,555 [WrapperListener_start_runner] org.springframework.context.support.DefaultLifecycleProcessor: Starting beans in phase 2147483647 INFO 2015-07-04 06:56:03,555 [WrapperListener_start_runner] org.springframework.scheduling.quartz.SchedulerFactoryBean: Starting Quartz Scheduler now INFO 2015-07-04 06:56:03,556 [WrapperListener_start_runner] org.quartz.core.QuartzScheduler: Scheduler scheduler_$_NON_CLUSTERED started. INFO 2015-07-04 06:56:03,569 [WrapperListener_start_runner] org.springframework.web.context.ContextLoader: Root WebApplicationContext: initialization completed in 1197 ms INFO 2015-07-04 06:56:03,651 [WrapperListener_start_runner] /mmc-support: Initializing Spring FrameworkServlet 'api' INFO 2015-07-04 06:56:03,651 [WrapperListener_start_runner] org.springframework.web.servlet.DispatcherServlet: FrameworkServlet 'api': initialization started INFO 2015-07-04 06:56:03,657 [WrapperListener_start_runner] org.springframework.web.context.support.XmlWebApplicationContext: Refreshing WebApplicationContext for namespace 'api-servlet': startup date [Sat Jul 04 06:56:03 JST 2015]; parent: Root WebApplicationContext INFO 2015-07-04 06:56:03,900 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/muleContextService] onto handler '/v3/muleContextService' INFO 2015-07-04 06:56:03,901 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/muleConfigurationService] onto handler '/v3/muleConfigurationService' INFO 2015-07-04 06:56:03,901 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/wrapperManagerService] onto handler '/v3/wrapperManagerService' INFO 2015-07-04 06:56:03,901 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/auditService] onto handler '/v3/auditService' INFO 2015-07-04 06:56:03,901 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/flowService] onto handler '/v3/flowService' INFO 2015-07-04 06:56:03,902 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3_1/clusterNodeService] onto handler '/v3_1/clusterNodeService' INFO 2015-07-04 06:56:03,902 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/trackingService] onto handler '/v3/trackingService' INFO 2015-07-04 06:56:03,902 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/systemFileService] onto handler '/v1/systemFileService' INFO 2015-07-04 06:56:03,902 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/muleFileService] onto handler '/v1/muleFileService' INFO 2015-07-04 06:56:03,902 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/threadsService] onto handler '/v1/threadsService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/memoryService] onto handler '/v1/memoryService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/statusService] onto handler '/v3/statusService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/jmxService] onto handler '/v1/jmxService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/poolService] onto handler '/v3/poolService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/statisticsService] onto handler '/v1/statisticsService' INFO 2015-07-04 06:56:03,903 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/statisticsService] onto handler '/v3/statisticsService' INFO 2015-07-04 06:56:03,904 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/systemService] onto handler '/v3/systemService' INFO 2015-07-04 06:56:03,904 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/alertService] onto handler '/v1/alertService' INFO 2015-07-04 06:56:03,904 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v1/slaService] onto handler '/v1/slaService' INFO 2015-07-04 06:56:03,904 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/applicationService] onto handler '/v3/applicationService' INFO 2015-07-04 06:56:03,904 [WrapperListener_start_runner] org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping: Mapped URL path [/v3/applicationLogService] onto handler '/v3/applicationLogService' INFO 2015-07-04 06:56:04,122 [WrapperListener_start_runner] org.springframework.web.servlet.DispatcherServlet: FrameworkServlet 'api': initialization completed in 471 ms INFO 2015-07-04 06:56:04,127 [WrapperListener_start_runner] /mmc-support: AgentServlet: Starting MMC Agent. INFO 2015-07-04 06:56:04,129 [WrapperListener_start_runner] /mmc-support: AgentServlet: Initialized com.mulesoft.mmc.agent.web.AgentServlet@f51d94d with ID c71a8cd9-dc7e-4750-bc51-d1faf204ceea INFO 2015-07-04 06:56:10,825 [WrapperListener_start_runner] org.eclipse.jetty.server.handler.ContextHandler: Started o.e.j.w.WebAppContext@2046bc37{/mmc-support,jar:file:/Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/lib/mule/mmc-agent-impl-3.6.1.jar!/mmc-support-app,AVAILABLE} INFO 2015-07-04 06:56:10,839 [WrapperListener_start_runner] org.eclipse.jetty.server.ServerConnector: Started ServerConnector@b094e09{HTTP/1.1}{0.0.0.0:7777} INFO 2015-07-04 06:56:10,862 [WrapperListener_start_runner] org.eclipse.jetty.server.ServerConnector: Stopped ServerConnector@b094e09{HTTP/1.1}{0.0.0.0:7777} INFO 2015-07-04 06:56:10,966 [WrapperListener_start_runner] org.eclipse.jetty.server.ServerConnector: Started ServerConnector@44e995bf{SSL-HTTP/1.1}{0.0.0.0:7777} INFO 2015-07-04 06:56:10,967 [WrapperListener_start_runner] com.mulesoft.mmc.agent.AgentCoreExtension: Mule Agent Core Extension listening on (0.0.0.0:7777) INFO 2015-07-04 06:56:10,972 [WrapperListener_start_runner] org.mule.module.launcher.DefaultArchiveDeployer: ================== New Exploded Artifact: default INFO 2015-07-04 06:56:10,980 [WrapperListener_start_runner] org.mule.module.launcher.MuleSharedDomainClassLoader: Using domain dir /Users/rsogo/work/mmc-distribution-mule-console-bundle-3.6.1/mule-enterprise-3.6.1/domains/default for domain default INFO 2015-07-04 06:56:11,077 [WrapperListener_start_runner] org.mule.module.launcher.MuleDeploymentService: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Started domain 'default' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-07-04 06:56:11,079 [WrapperListener_start_runner] org.mule.module.launcher.DefaultArchiveDeployer: ================== New Exploded Artifact: default INFO 2015-07-04 06:56:11,101 [WrapperListener_start_runner] org.mule.module.launcher.application.DefaultMuleApplication: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + New app 'default' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-07-04 06:56:12,140 [WrapperListener_start_runner] org.mule.module.launcher.MuleDeploymentService: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Started app 'default' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-07-04 06:56:12,192 [WrapperListener_start_runner] org.mule.module.launcher.DeploymentDirectoryWatcher: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Mule is up and kicking (every 5000ms) + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-07-04 06:56:12,207 [WrapperListener_start_runner] org.mule.module.launcher.StartupSummaryDeploymentListener: ********************************************************************** * - - + DOMAIN + - - * - - + STATUS + - - * ********************************************************************** * default * DEPLOYED * ********************************************************************** ******************************************************************************************************* * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - * ******************************************************************************************************* * default * default * DEPLOYED * *******************************************************************************************************
Mule ESB 3.7 Database Connectorの情報
マニュアルに寄ると、もともと有ったJDBC connectorは、Mule 3.5からDatabase connectorに置き換えられました。
Note: The Database connector replaces the JDBC connector. As of Mule 3.5.0, the JDBC connector is deprecated.
しかも、Database connectorはMule Community Editionでも使えます。これは嬉しい。
The Database connector is available with both Mule Community and Mule Enterprise runtimes.
使える操作はマニュアルから引用すると下記の通り。
- Select
- Insert
- Update
- Delete
- Stored Procedure
- Bulk Execute
- DDL operations such as CREATE, ALTER, etc.
参照情報
マニュアル
Database Connector Reference - Current Mule Documentation
2つのサンプルが紹介されています。
Database Connector Examples - Current Mule Documentation
1つはHTTP Connectorでリクエストを受け付け、Databaseにクエリーを発行し、JSONで返します。でもこの形は推奨していないみたい。なんでだろう。負荷?
This example is meant to illustrate the concept of a simple SELECT operation, but we do not recommend exposing database functionality directly as an API.
2つめはDatabaseからFileへの連携。
サンプルファイルの有りか
MuleのサンプルはGithubにあるのね。
https://t.co/kXt9E0W1SM
— ryohei sogo (@rsogo) July 4, 2015
MuleのDatabase Connectorのサンプルはこれ。
https://t.co/nTy7pgb4xO
— ryohei sogo (@rsogo) July 4, 2015