1. Eclipse + Java SE 6 快速建立web service

    from https://www6.software.ibm.com/developerworks/cn/education/webservices/ws-eclipse-javase1/section2.html 1. new Java Project    make sure JRE is JAVA SE 6 2. create POJO package com.myfirst.wsServer; import Javax.jws.WebService; @WebService public class SayHello { private static final String SALUTATION = "Hello"; public String getGreeting( String name ) { return SALUTATION + " " + name; } } 3. 用 wsgen 生成中间文件    wsgen -cp ./bin -keep -s ./src -d ./bin com.myfirst.wsServer.SayHello 4. web service publish package com.myfirst.wsServer; import Javax.xml.ws.Endpoint; public class RunService { /** @param args */ public static void main(String[] args) { System.out.println("SayHello Web Service started."); Endpoint.publish("http://localhost:8080/wsServerExample", new SayHello()); } } 5. run as java applicaiton 启动服务 6. 通过 http://localhost:8080/wsServerExample?wsdl 查看wsdl文件内容 7. Eclipse 提供了 Run > Launch the Web Services Explorer 来测试web service. 根据WSDL文件就可以了。

    2017/02/12 iteye

  2. 应用集成

    JAX-RPC    AXIS 1实现了这种RPC的方式,基于SOAP,WSDL. AXIS 1是web service的一种实现方式?    AXIS 2采用了JAX-WS 2. websphere SOA的三个概念有: WPS(Websphere Process Server,这个我开始老是搞错,以为是portal server); ESB; WSRR(Websphere Service Registry Repository) WID(WebSphere Integration Developer)用来开发SCA,ESB的平台。因为SOA的这些东东RAD(Rational Applicaiton Developer)是搞不定的。 同样这些SOA的组件需要在WebSphere Process Server下跑。WAS下是跑不动的。不过止今还没见过WPS,WID这些神兵利器。也就玩玩WAS,RAD了,还是在公司。:<

    2017/02/12 iteye

  3. Hibernate Cache

    get/load区别 如果记录存在,get返回对象(或代理对象);否则返回null。 如果记录存在,load返回对象;否则返回 NotObjectFoundException 2.hibernate Cache 2.1 一级缓存,在当前session内 2.2 Query Cache Cache queries and results. 方法: 1. 在hiberante Configuration 文件中: true 2. 查询时 Query query = session.createQuery("from Person p where p.id=1"); query.setCacheable(true); 2.3 二级缓存, 跨session . 如EHCache 3. load 与 CreateQuery 在处理Cache的区别 首先,load时在一个session中,一级缓存总是有效的。比如下面的只issue sql操作一次   Session session = getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); Person person1 = (Person) session.load(Person.class, 1L); System.out.println(person1.getFirstName()); Person person2 = (Person) session.load(Person.class, 1L); System.out.println(person2.getFirstName()); tx.commit(); session.close(); 其次,如果用CreateQuery有点不同,比若下面的需要issue sql操作两次 Session session = getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); Query query = session.createQuery("from Person p where p.id=1"); Iterator it = query.list().iterator(); while (it.hasNext ()){ Person p = (Person) it.next(); System.out.println(p.getFirstName()); } query = session.createQuery("from Person p where p.id=1"); it = query.list().iterator(); while (it.hasNext ()){ Person p = (Person) it.next(); System.out.println(p.getFirstName()); } tx.commit(); session.close(); 原因是session cache时是根据key(load方法中传入的ID)来缓存的。解决的方法是: 1. 用load,如上面的代码 2. 用查询缓存,如上面的介绍 Session session = getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); Query query = session.createQuery("from Person p where p.id=1"); query.setCacheable(true); Iterator it = query.list().iterator(); while (it.hasNext ()){ Person p = (Person) it.next(); System.out.println(p.getFirstName()); } query = session.createQuery("from Person p where p.id=1"); query.setCacheable(true); it = query.list().iterator(); while (it.hasNext ()){ Person p = (Person) it.next(); System.out.println(p.getFirstName()); } tx.commit(); session.close();

    2017/02/12 iteye

  4. linux命令

    dirname 与 pwd pwd返回的是执行时当前路径 dirname 后面跟一个script文件参数,返回的是执行的script文件所在的路径 差别在于有时在一个目录路径下执行另一个路径下的script,这时这两个路径不同  

    2017/02/12 iteye

  5. Precurement Management

    Precurement Management(采购) 1. Plan Purchases and Acquisitions process Input: Work Breakdown Structure WBS Dictionary Project Scope Statement Project Management Plan Enterprise Environmental Factors Organizational Process Assets Tools: Make or buy analysis Expert Judgment Contract types Output: Procurement Management Plan Contract Statement of Work Make or Buy Decisions Requested Changes 2. Plan Contracting process Input: Procurement Management Plan Contract Statement of Work Make or Buy Decisions Organizational Process Assets Tools: Standard Forms(RFP,Request for Proposals) Expert Judgement Output: Procurement Documents Evaluation Criteria Contract Statement of Work Updates 3. Request Seller Responses process Input: Procurement Documents Procurement Management Plan Organizational Process Assets Tools: Bidder Conferences Advertising Develop Qualified Sellers List Output: Procurement Document Package Qualified Sellers List Proposals 4. Select Sellers process Input: Procurement Document Package Qualified Sellers List Evaluation Criteria Proposals Organizational Process Assets Procurement Management Plan Tools: Weighting System Screening System Independent Estimates Seller Rating System Expert Judgment Contract Negotiation Proposal Evaluation Techniques Output: Selected Sellers Contract Contract Management Plan Resource Availability Requested Changes Procurement Management Plan Updates 5. Contract Administration Process Input: Approved Change Requests Work Performance Information Performance Reports Contract Management Plan ContractSelected Sellers Tools: Payment System Records Management System Information Technology Claims Administration Performance Reporting Buyer-Conducted Performance Review Inspections and Audits Contract Change Control System Output: Contract documentation Requested changes Updates to Organizational process assets Recommended corrective actions Project management plan 6. Contract Closure Input:Contract Management Plan Procurement Management Plan Contract Documentation Contract Closure Procedure Tools: Procurement audits Records Management system Outputs: Closed Contracts Organizational Process Assets

    2017/02/12 iteye

  6. Risk Management

    Risk Management 1. Risk Management Planning Input: Organizational Process Assets Enterprise Enviromental Factors Project Management Plan Project Scope Statement Tools:Planning Meetings and Analysis Output: Risk Management Plan(who, how, how often), in Risk Management Plan, come up with RBS(Risk Breakdown Structure), then Avoided/Mitigated/Transferred/Accepted the risk 2. Risk Identification Input: Risk Management Plan Project Management Plan Project Scope Statement Organizational Process Assets Enterprise Environmental Factors Tools: Information Gathering Techniques(Gathering information from people and making sure it's right)which includes: Brainstorming, Interviews, The Delphi technique,get opinions and ideas from experts anonymously SWOT analysis(strengths,weaknesses,opportunities,and threats) Root cause identification Documentation reviews Assumptions analysis Checklist analysis Diagramming techniques Output: Risk Register 3. Qualitative Risk Analysis(ranking risk based on probability and impact) Input: Organizational Process Assets Risk Register Risk Management Plan Project Scope Statement Tools: Risk data quality assessment Risk categorization Risk urgency assessment Risk probability and impact assessment Probability and impact matrix Output: updated risk register(add columns Category,Priority,Urgency) 4. Quantitative Risk Analysis(ranking risk based on probability and impact) Input: Organizational Process Assets Risk Register(after qualitative analysis) Project Management Plan Risk Management Plan Project Scope Statement Tools: EMV(Expected Monetary Value) Decision Tree Analysis Output: updated Risk Register 5. Risk Response planning Input: Risk Register Risk Management Plan Tools: strategies for handling negative risk,avoid&mitigate&transfer&acceptstrategies for handling positive risk,Exploit&share&enhance&accept Output: add risk response to the register(risk owner,response) project management plan update scontract updates 6. Risk Monitoring and Conrol process Input: Risk Register Project Management Plan Approved Change Requests Work Performance Information Performance Reports Tools: Risk reassessment Variance and trend analysis Reserve analysis Risk audits Technical performance measurement Status meetings Output: Risk Register Updates Project Management Plan Updates Requested Changes Organizational Process Assets Recommended Corrective Actions Recommended Preventative Actions

    2017/02/12 iteye

  7. Communication Management

    Communications Management 1. Communications Requirements Analysis input:Enterprise Environmental Factors Organizational Process Assets Project Scope Statement Project Management Plan output: Communication Plan(who should communicate with whom and how often) 2. Information Distribution input:Communication Plan Tools: Communication skills Formal Written Informal Written Formal Verbal Informal Verbal Effective Communication Nonverbal communication Paralingual communication(tone and pitch) Feedback Information gathering and retrieval systems Information distribution methods Lessons learned Output: Organizational Process Asset updates Requested changes 3. Performance Reporting process Input: Work Performance Information Deliverables Performance Measurements Forecasted Completion Quality Control Measurements Approved Changes Requests Project Management Plan Tools: Information Presentation Tools Performance Information Gathering and Compilation Status Review Meetings Time Reporting System Cost Reporting System Output: Performance report Forecasts Lessons Learned Changes 4. Manage Stakeholders(resolve issues) every team member is also a stakeholder. Input: Communications Management Plan Organizational Process Assets Tools: Communications Methods Face-to-face communication Holding kickoff meetings Issue Logs Output: Resolved Issues Approved Change Requests Approved Corrective Actions Organizational Process Asset Updates Project Management Plan Updates

    2017/02/12 iteye

  8. Human Resource Management

    Human Resource Planning input: Enterprise Environmental Factors: company's culture and structure,common languages,technical disciplines Organizational Process Assets: templates and lessons learned from past projects Project Management Plan: resource requirements for each activity tools: Organization Charts(reporting relationships) output: Staffing Management Plan(Timetable,Resource Histogram): who will be on your project, when they'll do the work and for how long, the reward system to keep the team motivated Roles and Responsibilities(RACI matrix): title, authority, responsible for specific deliverables Project Organization Charts: reporting structure 2. Acquire Project Team input: Staffing Management Plan Project Management Plan Project Organization Charts Roles and Responsibilities Enterprise Environmental Factors Organizational Process Assets tools: Negotiation Pre-Assignment Virtual Teams Acquisition Output: Staffing Assignments Resource Availability Update the Staffing Management Plan 3. Develop Project Team(evaluate performance and set up motivational factors) input:Staffing Management PlanResource AvailabilityStaffing Assignments Tools:Recognition and RewardsTrainingGround rulesTeam-building activitiesCo-location output:Team Performance Assessment 4. Manage Project Team(solve conflicts) input: Work Performance InformationPerformance ReportsStaffing Management PlanProject Organization Charts Roles and Responsibilities Enterprise Environmental FactorsOrganizational Process AssetsProject Management Plan tools:Conflict ManagementPerformance AppraisalsIssue logs output: Requested Changes Recommended corrective actions Recommended preventive actions Updates to the organizational process assets Updates to the project management plan

    2017/02/12 iteye