Consider these filenames: C:\temp\file.txt - This is a path, an absolute path, and a canonical path. .\file.txt - This is a path. It’s neither an absolute path nor a canonical path. C:\temp\myapp\bin..\..\file.txt - This is a path and an absolute path. It’s not a canonical path. A canonical path is always an absolute path. Converting from a path to a canonical path makes it absolute (usually tack on the current working directory so e.
0.0.0.0, in server context, means “all IP addresses on the local machine” (in fact probably, “all IPv4 addresses on the local machine”). So, if your webserver machine has two ip addresses, 192.168.1.1 and 10.1.2.1, and you allow a webserver daemon like apache to listen on 0.0.0.0, it will be reachable at both of those IPs. But only to what can contact those IPs and the web port(s). The only thing is that you cannot say “all addresses should have access” – that’s done in your firewall(s) and/or the server software and/or other security layers like tcpwrappers.
TRAINING counting elements When every value of the element in a numeric array is in range. We can get a counter array of which the index of every element is the value and the value is the counter. Prefix Sums Prefix sums array defines as: So prefix sums array is very useful to compute the sum of any array slice (contiguous segments of array). For example: sum(a2…a5) = p6 -
Concepts in WSDL definition <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://rand/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://rand/" name="RandServiceService"> <types> <xsd:schema> <xsd:import namespace="http://rand/" schemaLocation="http://localhost:8888/rs?xsd=1"></xsd:import> </xsd:schema> </types> <message name="next1"> <part name="parameters" element="tns:next1"></part> </message> <message name="next1Response"> <part name="parameters" element="tns:next1Response"></part> </message> <message name="nextN"> <part name="parameters" element="tns:nextN"></part> </message> <message name="nextNResponse"> <part name="parameters" element="tns:nextNResponse"></part> </message> <portType name="RandService"> <operation name="next1"> <input message="tns:next1"></input> <output message="tns:next1Response"></output> </operation> <operation name="nextN"> <input message="tns:nextN"></input> <output message="tns:nextNResponse"></output> </operation> </portType> <!-- implementation dependent definition --> <binding name="RandServicePortBinding" type="tns:RandService"> <soap:binding transport="http://schemas.
References: <Inside the Java Virtual Machine> <Java Performance - The Definitive Guide> GC overview Heap Layout Geneation spaces Nearly every JVM uses generational garbage collectors. They work by splitting the heap into different generations: Old generation (tenured generation) Young generation, which is further divided into sections: Eden and Survivor spaces. minor GC GC for the young generation is called minor GC. All GC algorithms have stop-the-world pauses during collection of the young generation.
references: <Inside the Java Virtual Machine> <Java Virtual Machine specification 7> run-time data areas pc registers Every JVM thread has its own pc(program counter) register. The pc register is one word in size, so it can hold both a native pointer and a returnAddress. If a thread is executing a native method, the value of the pc register is undefined. JVM stacks Every thread has a private JVM stacks.
Apache Axis2 How to build a service Axis2 supports 3 programming model Create a service from scratch Write a class whose methods use OMElement as arguments and/or return type create a services.xml package as a .aar file deploy POJO for rpc-style services Generate the service skeleton from WSDL 实现方式 创建方式 应用文档对象模型解析(消息
Core concepts Endpoint it refers to an address or a software entity that supports communication. Component _it _is confusing terminology; EndpointFactory would have been more appropriate because a Component is a factory for creating Endpoint instances. A component has a name, which is the prefix of the URI. CamelContext the Camel runtime system. You typically have one CamelContext object in an application. CamelTemplate It’s previously called CamelClient. It can send a Message or Exchange to an endpoint.
To find a job is a full time job – Dog Lead 狗说，羊村生活艰辛。 感谢某牛(bian)逼(tai)群主伟大光荣正确的羊村捕鱼舵手－鹅哥。感谢星爷赐题。 感谢某牛(b
Transaction provides data integrity in highly concurrent environments. It’s also called Unit of Work. For database systems, transaction is a must-have feature. But also some exceptions, like MySQL MyISAM engine. For messaging systems like JMS, transactions are not mandatory which has non-transacted acknowledgement modes. File system operations are usually non-managed, but if your business requirements demand transaction file operations, you might make use a tool such as XADisk. ACID Inherently a transaction is characterized by four properties (commonly referred as ACID) :
locking cache lifecycle callbacks Event & Listener
Web framework evolves Servlet Write all your processing logic and presentation logic in a servlet class. Generating HTML code from within Java code is really awesome! JSP with scriptlet style Rather than writing HTML in Java code, now write Java code in HTML code. This approach is really like PHP and ASP do. JSP with tags style To avoid writing Java code in HTML, introduce JSP tags as HTML-like facade for accessing underlying Java code.
In Java, there are multiple persistence APIs and all of them provides their own ways of transaction management. JDBC transaction: this is a resource-specific transaction, which is implemented by connection. JTA transaction: this is a transaction API for global transaction, it usually needs the support of application server. JPA transaction: JPA has its own transaction API by EntityManager. Hibernate transaction: Hibernate also provides its way to manage transaction by SessionFactory JDO: … Now Spring transaction management abstracts and unifies all these API.
Crosscutting concerns refers to logic in an application that cannot be decomposed from the rest of the application and may result in code duplication and tight coupling. Typical use cases: logging security transaction Concepts: Pointcut -> where to do: class filtering and method matching Advice -> when to do: before/after/returning/throws/… Aspect -> what to do, do what the application specified things. This is the only code application needs to define, others concepts are supported and configured by framework.
IoC/DI and beans IoC is also known as dependency injection (DI). A bean just need to define its dependencies through its constructor arguments, its factory method arguments or its properties setter. And then the container will inject these dependencies when initializing this bean. Traditionally, the bean itself control the initialization process or location of its dependencies by directly invoking its constructor of the class or some look-up mechanism such as Service Locator pattern(e.
Spring is a big beast. I have to sort out its design and modules. GroupId ArtifactId Description org.springframework spring-aop Proxy-based AOP support org.springframework spring-aspects AspectJ based aspects org.springframework spring-beans Beans support, including Groovy org.springframework spring-context Application context runtime, including scheduling and remoting abstractions org.springframework spring-context-support Support classes for integrating common third-party libraries into a Spring application context org.
what is subquery SubQuery in SQL is a query inside another query SELECT name FROM City WHERE pincode IN (SELECT pincode FROM pin WHERE zone='west') In this SQL, the part in the brackets is called inner query, while the part out of the brackets is called outer query. non-correlated subquery In non correlated subquery, inner query doesn’t depend on outer query and can run as stand alone query.
In this blog, we use two tables: TableA and TableB id name id name – —- – —– 1 Pirate 1 Rutabaga 2 Monkey 2 Pirate 3 Ninja 3 Darth Vader 4 Spaghetti 4 Ninja > inner or outer keyword can be omitted. inner join Inner join produces only the set of records that match in both Table A and Table B.
what messaging provides? loosely decoupled A component sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only which message format and which destination to use.