service

Liferay开发学习Part6:Service Builder

ぐ巨炮叔叔 提交于 2020-03-16 17:59:12
某厂面试归来,发现自己落伍了!>>> 一.什么是Service Builder? Service Builder是liferay IDE提供的一种代码生成方案,开发人员只需编辑一个数据库实体的描述文件(XML),即可根据XML文件生成Spring层代码、Hibernate层代码、SQL、SQL索引创建文件、Spring和Hibernate的配置文件等,可以提高开发效率 二.使用Service Builder 1.service.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd"> <service-builder package-path="com.sample.portlet.liferay"> <author>laiwanshan</author> <namespace>Liferay</namespace> <entity name="Book" local-service="true" remote-service="true"> <!-- PK fields --

oracle 监听动态和静态的配置

旧城冷巷雨未停 提交于 2020-03-15 19:04:59
[oracle@oracledb1 admin]$ vi listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb1)(PORT = 1521)) ) ) SID_LIST_LISTENER2 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORADB1) (SID_NAME = ORADB1) ) ) LISTENER2 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb1)(PORT = 1522)) ) )

衣服的入库出库

旧巷老猫 提交于 2020-03-11 10:59:41
package com.ztesoft.zsmartcity.spcp.biz.eventc.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.StringUtil; import com.ztesoft.zsmartcity.spcp.biz.admin.entity.SysRole; import com.ztesoft.zsmartcity.spcp.biz.admin.entity.SysUser; import com.ztesoft.zsmartcity.spcp.biz.admin.service.SysRoleService; import com.ztesoft.zsmartcity.spcp.biz.admin.service.SysUserService; import com.ztesoft.zsmartcity.spcp.biz.admin.util.CurrentUserUtil; import com.ztesoft.zsmartcity.spcp.biz.admin.util.DateUtil; import com.ztesoft.zsmartcity.spcp

Mac - Showing my service in printers list

柔情痞子 提交于 2020-03-06 05:02:49
问题 I created a Mac app/service that will be shown in menu bar (and not in dock) that will take care of printing through my cloud server. What I'm looking is to show this as part of printer list. For example, when a user wants to print a word doc from MSWord, click on Command+P which shows the printer UI where user can select the printer. Now I want to show my app/service as part of the printers list so that the doc can be printed directly using my cloud server. Is it possible to do such thing.

How to fix Symfony v2.8 “Creating/Configuring Services in the Container” 'autoloader expected class …' error

戏子无情 提交于 2020-03-05 06:08:07
问题 For quite a while I've been trying to understand how to add my own library of functions that I want to use in my Web-App's different controller/bundles, but I just found that I needed to 'house' these functions a Symfony Service Container. Unlike other computer languages, Services, are not a background process! To get a better handle on this, I tried out the example in the Symfony v2.8 guide section on Creating/Configuring Services in the Container. I created the following file in the

Spring控制多张表的提交事务操作

痞子三分冷 提交于 2020-03-03 05:35:19
一.Spring配置文件如下: <bean id="test" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@192.168.1.192:1521:test" /> <property name="username" value="test" /> <property name="password" value="test" /> <property name="initialSize" value="5" /> <property name="maxActive" value="10" /> </bean> <!--transactionManager --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="test" /> </bean> <bean id=

DWR基本配置

跟風遠走 提交于 2020-03-02 14:46:10
DWR——Direct Web Remoter Servlet 供给那些想要以一种简单的方式使用Ajax 和XMLHttpRequest 的开发者。它具有一套 JavaScript 功能集,它们把从HTML 页面调用应用服务器上的 Java 对象的方法简化了。它操控不同类型的参数,并同时保持了HTML 代码的可读性。 DWR 不是对一个设计的插入,也不强迫对象使用任何种类的继承结构。它和 servlet 框架内的应用配合的很好。 配置步骤: 1. 拷贝dwr.jar 到WEB-INF/ lib 下 下载地址:http://getahead.ltd.uk/dwr/ 2. 在web.xml 中增加dwr 配置, 在 WEB-INF 目录中建立一个dwr.xml [xhtml] view plain copy print ? <servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <!-- 设置为调试模式 --> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <

Android Service详解

你。 提交于 2020-03-01 17:42:20
一、Service的种类 1、 本地服务 , Local Service 用于应用程序内部。在Service可以调用Context.startService()启动,调用Context.stopService()结束。在内部可以调用Service.stopSelf() 或 Service.stopSelfResult()来自己停止。无论调用了多少次startService(),都只需调用一次stopService()来停止。 2、 远程服务 , Remote Service 用于android系统内部的应用程序之间。可以定义接口并把接口暴露出来,以便其他应用进行操作。客户端建立到服务对象的连接,并通过那个连接来调用服务。调用Context.bindService()方法建立连接,并启动,以调用 Context.unbindService()关闭连接。多个客户端可以绑定至同一个服务。如果服务此时还没有加载,bindService()会先加载它。 提供给可被其他应用复用,比如定义一个天气预报服务,提供与其他应用调用即可。 二、生命周期 1). 被启动的服务的生命周期:如果一个Service被某个Activity 调用 Context.startService方法启动,那么不管是否有Activity使用bindService绑定或unbindService解除绑定到该Service

Service的简单介绍

这一生的挚爱 提交于 2020-03-01 16:49:01
1、为什么不使用后台线程而使用Service? 1)、Service可以放在独立的进程中,所以更安全; 2)、使用Service可以依赖现有的binder机制,不需要在应用层面上处理线程同步的繁杂工作; 3)、系统可以重新启动异常死去的Service。 2、 Service 与 Activity 的相同点与不同点: 不同点:Activity是与用户交互的组件,即可以看到UI界面,而Service是在后台运行、无需界面; 相同点:使用Activity 时我们需要在配置文件中声明<activity>标签,同样的使用Service 也需要在配置文件中声明<service> 标签。 都具有一定的生命周期。 启动service有两种方法: 1)、 Context. startService() 调用者与服务之间没有关联,即使调用者退出,服务仍可运行 Started Service的生命周期: onCreate():创建服务 onStartCommand():服务开始运行(在2.0以前版本中,使用onStart()回调方法) onDestroy() :服务被停止 【详细说明:】 在程序中调用: context.startService() 会触发执行Service生命周期中的onCreate()、onStartCommand()回调方法, 此时服务就开始正式运行;如果Service还没有运行

Java开源Web Service(转)

∥☆過路亽.° 提交于 2020-03-01 08:08:11
Axis Apache Axis 是Apache WebService项目中的子项目,其最初起源于IBM的"SOAP4J",应该属于最早的一批用于构造基于SOAP应用的Framework。 目前Apache Axis已经发展到了第三代,其核心是一个SOAP处理器,用于开发包括客户端,服务器端,SOAP Gateway等各种应用。事实上Apache Axis在了1.0版后,其发行版本还包括了完整的J2EE服务器插件, WSDL支持和生成,TCP/IP监视器等组件,从这个意义上来说Apahce Axis已不仅仅是个SOAP框架了,它包含了除了UDDI外对整个Web Service协议栈(Protocol Stack)的支持。 更多Axis信息 UDDI4J uddi4j是一个JAVA类库,提供了一个API来与web服务UDDI注册中心相结合。UDDI4J得到了 HP, IBM和SAP的 支持。UDDI是统一描述、发现和集成(Universal Description, Discovery, and Integration的缩写。 更多UDDI4J信息 WSIL4J WSIL4J是Java类库,简化了对Web服务注册中心、描述和检查文档的处理。 更多WSIL4J信息 WSIF WSIF 是apache的web服务项目的一个子项目,目前版本是2.0