Skip to main content

Home/ Java Development/ Group items tagged Required

Rss Feed Group items tagged

Paul Sydney Orozco

How to Use @Required Annotation in Spring - 0 views

  •  
    An Example explaining on how @Required annotation from Spring Framework works. Provides sample on how to use @Required and expected exception if beans are not properly configured like BeanInitializationException or Property is required for bean.
Hendy Irawan

XStream - a simple library to serialize objects to XML and back again. - 0 views

  •  
    XStream is a simple library to serialize objects to XML and back again. Features Ease of use. A high level facade is supplied that simplifies common use cases. No mappings required. Most objects can be serialized without need for specifying mappings. Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. Requires no modifications to objects. Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor. Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports circular references. Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). Customizable conversion strategies. Strategies can be registered allowing customization of how particular types are represented as XML. Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem. Alternative output format. The modular design allows other output formats. XStream ships currently with JSON support and morphing.
Hendy Irawan

AtomServer 2.3.4 - - 0 views

  •  
    "AtomServer is a generic data store implemented as a RESTful web service. It is designed as a GData-style Atom Store. It is based on the following concepts and protocols; REST. REST is a design pattern. It's not a technology like SOAP or HTTP. REST is a proven design pattern for building loosely-coupled, highly-scalable applications. There are important benefits to sticking to the REST design pattern; Simple. REST is incredibly simple to define. There are just a handful of principles and well defined semantics associated with it. Scalable. REST leads to a very scalable solution by promoting a stateless protocol and allowing state to be distributed across the web. Layered. REST allows any number of intermediaries, such as proxies, gateways, and firewalls. Ultimately REST is just a web site, albeit one that adheres to a design pattern, so one can easily layer aspects such as Security, Compression, etc. on an as needed basis. Atom. Fundamentally, Atom is an XML vocabulary for describing lists of timestamped entries. These entries can be anything, although because Atom was originally conceived to replace RSS, Atom lists are Feeds, and the items in the lists are Entries. Atom is a RESTful protocol. AtomServer stands on the shoulders of giants. It is built on top of several open source projects - most notably, Apache Abdera (a Java-based Atom Publishing framework) and Spring. AtomServer is an Atom Store. Thus, it requires a relational database to run. AtomServer currently supports; PostgresSQL, SQLServer, and HSQLDB. Using HSQLDB, AtomServer requires zero configuration and can run out-of-the-box. While this configuration is suitable for many applications, those that see significant load will likely require a database with better transactional semantics, such as PostgreSQL. AtomServer is easy to use. It deploys as a simple WAR file into any Servlet container. Or alternately, can be used out-of-the-box as a standalone server, running with
Hendy Irawan

AutoPatch - 0 views

  •  
    With AutoPatch, an agile development process that requires a database change looks like this: Developer alters the model, which requires a change to the database Developer possibly consults a DBA, and develops a SQL patch against their personal database that implements the alteration Developer commits the patch to source control at the same time as they commit their dependent code Other developers' and environments' databases are automatically updated by AutoPatch the next time the new source is run This represents streamlined environment maintenance, allowing developers to cheaply have their own databases and all databases to stay in synch with massively lower costs and no environment skew. That's what AutoPatch does. Clusters with one database? Multiple schemas? Logical migrations, instead of just DDL changes? Need to do something special/custom? Need to distribute your changes commercially? All without paying anything? No problem.
Hendy Irawan

Equinox Aspects - 0 views

  •  
    Aspect-oriented computing is continuing to increase in popularity. The modularity inherent in OSGi and Eclipse offers unique opportunities for managing and applying aspects by supplying them in bundles and directing their application to particular sets of bundles. This incubator work area is dedicated to delivering an integration of aspects and OSGi. The goal is to allow developers to use the Equinox together with AspectJ by combining the benefits of both worlds. Using a load-time weaving extension you are able to add AspectJ aspects to your bundle-based system just by putting them into general OSGi bundles. It does not matter if the pointcuts you defined inside the aspects contain join points that are defined by classes within the same bundle or any other bundle in your installation. The load-time weaving extension will take care that your aspects are woven with the appropriate classes at load-time. To illustrate this lets assume the following situation: You would like to write an aspect that traces something within the JDT plug-ins of Eclipse. Without some kind of load-time aspect weaving you would somehow need to recompile those JDT plug-ins using AJDT (for example) together with your aspect. By using the load-time aspect weaving extension all you need is to implement your aspect and add that bundle to your system. The load-time aspect weaving extension takes care of weaving your aspect with the JDT code as it is loaded. And it doesn't matter if a new JDT is installed by the user later on. The next time your application is started the load-time aspect weaving will take care of weaving your aspect into these bundles as well, if necessary. With this technology is becomes possible to modularize crosscutting concerns across different plug-ins while keeping the idea of separate compilation for bundles. Goals Provide Runtime Modularity and Versioning for Crosscutting Concerns: Aspects are used to implement crosscutting concerns. However such concerns usually compr
Hendy Irawan

Commons Exec - Apache Commons Exec - 0 views

  •  
    "Executing external processes from Java is a well-known problem area. It is inheriently platform dependent and requires the developer to know and test for platform specific behaviors, for example using cmd.exe on Windows or limited buffer sizes causing deadlocks. The JRE support for this is very limited, albeit better with the new Java SE 1.5 ProcessBuilder class. Reliably executing external processes can also require knowledge of the environment variables before or after the command is executed. In J2SE 1.1-1.4 there is not support for this, since the method, System.getenv(), for retriving environment variables is deprecated. There are currently several different libraries that for their own purposes have implemented frameworks around Runtime.exec() to handle the various issues outlined above. The proposed project should aim at coordinating and learning from these initatives to create and maintain a simple, reusable and well-tested package. Since some of the more problematic platforms are not readily available, it is my hope that the broad Apache community can be a great help."
DJHell .

SmartSprites: CSS Sprite Generator Done Right - 0 views

  •  
    SmartSprites will let you easily introduce and maintain CSS sprites in your designs. SmartSprites parses special directives you can insert into your original CSS to mark individual images to be turned into sprites. It then builds sprite images from the collected images and automatically inserts the required CSS properties into your style sheet, so that the sprites are used instead of the individual images. SmartSprites parses special directives you can insert into your original CSS to mark individual images to be turned into sprites. It then builds sprite images from the collected images and automatically inserts the required CSS properties to your style sheet, so that the sprites are used instead of the individual images. In other words, no tedious copying & pasting to your CSS when adding, removing or changing sprited images. Just work with your CSS and original images as usual and have SmartSprites automatically transform them to the sprite-powered version when necessary.
Hendy Irawan

Apache Felix - Apache Felix iPOJO - 0 views

  •  
    iPOJO is a service component runtime aiming to simplify OSGi application development. It natively supports ALL the dynamism of OSGi. Based on the concept of POJO, application logic is developed easily. Non-functional properties are just injected in the component at runtime. iPOJO strength points are : components are developed as POJO, nothing else is required ! the component model is extensible, so feel free to adapt it to your needs the standard component model manages service providing and service dependencies, and so can require any other OSGi services iPOJO manages the component instance lifecycle and the environment dynamics as it has never been possible iPOJO provides a powerful composition system to create highly dynamic applications iPOJO supports annotations, XML or Java-based API to define the component
Hendy Irawan

Formatter (Java 2 Platform SE 5.0) - java platform format string syntax - 0 views

  •  
    " Format String Syntax Every method which produces formatted output requires a format string and an argument list. The format string is a String which may contain fixed text and one or more embedded format specifiers."
Paul Sydney Orozco

Tutorial On Spring with Hibernate and Java Persistence API - 0 views

  •  
    Sample of using Hibernate Annotations by reducing XML configuration files thus making it simpler to define required metadata directly into our Java code. When using annotations, we no longer need the additional mapping file (*.hbm.xml). The metadata for the ORM is specified in the individual classes.
anonymous

Getting Started with RequestFactory - Google Web Toolkit - Google Code - 0 views

  • Entity Proxies
    • anonymous
       
      Proxy type (on the Client) vs Entity type (on the server)
  • proxy types
  • entity types
  • ...147 more annotations...
  • methods that return service stubs
  • one RequestFactory interface for your application
  • employeeRequest();
  • @Service(Employee.class)
  • extends RequestContext
  • extends RequestFactory
  • service stub
  • RequestFactory service stubs
  • must extend RequestContext
  • The methods in a service stub do not return entities directly
  • return subclasses of com.google.gwt.requestfactory.shared.Request.
  • This allows the methods on the interface to be invoked asynchronously with
  • Request.fire()
  • fire(    new Receiver()
  • onSuccess
  • callers pass an AsyncCallback that implements onSuccess()
  • takes a Receiver which must implement onSuccess()
  • Receiver is an abstract class having a default implementation of onFailure()
  • you can extend Receiver and override onFailure()
  • onViolation()
  • any constraint violations on the server
  • The Request type returned from each method
  • parameterized with the return type of the service method.
  • Methods that have no return value should return type Request<Void>
  • BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void
  • subclass of EntityProxy
  • List<T> or Set<T>
  • primitive types are not supported
  • methods that operate on an entity itself
  • like persist() and remove()
  • return objects of type InstanceRequest rather than Reques
  • Server Implementations
  • methods defined in an
  • entity's service interface
  • implemented in the class named
  • @Service annotation
  • in these examples, is the entity class
  • service implementations do not directly implement the RequestContext interface
  • server-side implementations use the domain entity types
  • @Entity
  • EntityManager
  • createQuery
  • getResultList();
  • entityManager()
  • createEntityManager()
  • em.persist(this);
  • em.remove(attached
  • em.close();
  • defined in the service's
  • RequestContext interface
  • even though the implementation does not formally implement the interface in Java
  • name and argument list for each method
  • same on client and server
  • Client side methods
  • return Request<T>
  • only T on the server
  • EntityProxy types become the domain entity type on the server
  • Methods that return a Request object in the client interface are implemented as static methods on the entity
  • Methods that operate on a single instance of an entity, like persist() and remove(),
  • eturn an
  • InstanceRequest
  • in the client interface
  • Instance methods do not pass the instance directly, but rather via the
  • using()
  • instance methods must be implemented as non-static methods in the entity type
  • Four special methods are required on all entities
  • as they are used by the RequestFactory servlet:
  • constructor
  • findEntity
  • An entity's getId()
  • is typically auto-generated by the persistence engine (JDO, JPA, Objectify, etc.)
  • "find by ID" method has a special naming convention
  • find()
  • "find" plus the type's simple name
  • On the server
  • getVersion() method is used by RequestFactory to infer if an entity has changed
  • backing store (JDO, JPA, etc.) is responsible for updating the version each time the object is persisted,
  • RequestFactoryServlet sends an UPDATE
  • if an entity changes as
  • Second, the client maintains a version cache of recently seen entities
  • Whenever it sees an entity whose version has changed, it fires
  • UPDATE events on the event bus
  • so that listeners can update the view
  • GWT.create
  • and initialize it with your application's EventBus
  • GWT.create
  • requestFactory.initialize
  • create a new entity on the client
  • EmployeeRequest request
  • EmployeeProxy newEmployee
  • All client-side code should use the EmployeeProxy
  • not the Employee entity itself
  • unlike GWT-RPC, where the same concrete type is used on both client and server
  • RequestFactory
  • designed to be used with an ORM layer like JDO or JPA
  • on the server
  • to build data-oriented (CRUD) apps with an ORM-like interface
  • on the client
  • easy to implement a data access layer
  • structure your server-side code in a data-centric way
  • GWT-RPC, which is service-oriented
  • On the client side, RequestFactory keeps track of objects that have been modified and sends only changes
  • lightweight network payloads
  • solid foundation for automatic batching and caching of requests in the future
  • RequestFactoryServlet
  • RequestFactory uses its own servlet
  • own protocol
  • not designed for general purpose services like GWT-RPC
  • implements its
  • It is designed specifically for implementing a persistence layer on both client and server.
  • In persistence frameworks like JDO and JPA, entities are annotated with
  • client-side representation of an entity
  • known as a
  • DTO (Data Transfer Object)
  • hook used to indicate that an object can be managed by RequestFactory
  • RequestFactory
  • EntityProxy interface
  • automatically populates bean-style properties between entities on the server and the corresponding EntityProxy on the client,
  • send only changes ("deltas") to the server
  • extends EntityProxy
  • interface
  • @ProxyFor
  • reference the server-side entity being represented
  • It is not necessary to represent every property and method from the server-side entity in the EntityProxy
  • EntityProxyId returned by this method is used throughout RequestFactory-related classes
  • while getId() is shown in this example, most client code will want to refer to
  • EntityProxy.stableId() i
  • to represent any type
  • is not required to expose an ID and version
  • often used to represent embedded object types within entities
  • @Embedded
  • Address
  • Address type
  • POJO with no persistence annotations
  • Address is represented as a ValueProxy
  • extends ValueProxy
  • interface
  • extends EntityProxy
  • interface
  • AddressProxy
  • AddressProxy
  • ValueProxy can be used to pass any type to and from the server
  • RequestFactory
  • interface between your client and server code
  • RequestContext interface
  • The server-side service
  • must implement each method
Hendy Irawan

Apache CXF -- Index - 0 views

  •  
    Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI. CXF includes a broad feature set, but it is primarily focused on the following areas: Web Services Standards Support: CXF supports a variety of web service standards including SOAP, the WS-I Basic Profile, WSDL, WS-Addressing, WS-Policy, WS-ReliableMessaging, WS-Security, WS-SecurityPolicy, WS-SecureConverstation, and WS-Trust (partial). Frontends: CXF supports a variety of "frontend" programming models. CXF implements the JAX-WS APIs (TCK compliant). CXF JAX-WS support includes some extensions to the standard that make it significantly easier to use, compared to the reference implementation: It will automatically generate code for request and response bean classes, and does not require a WSDL for simple cases. It also includes a "simple frontend" which allows creation of clients and endpoints without annotations. CXF supports both contract first development with WSDL and code first development starting from Java. For REST, CXF also supports a JAX-RS (TCK compliant) frontend. Ease of use: CXF is designed to be intuitive and easy to use. There are simple APIs to quickly build code-first services, Maven plug-ins to make tooling integration easy, JAX-WS API support, Spring 2.x XML support to make configuration a snap, and much more. Binary and Legacy Protocol Support: CXF has been designed to provide a pluggable architecture that supports not only XML but also non-XML type bindings, such as JSON and CORBA, in combination with any type of transport. To get started using CXF, check out the downloads, the user's guide, or the mailing lists to get more information!
Hendy Irawan

Apache Commons Daemon : Java based daemons or services - 0 views

  •  
    "Since 1994, the Java programming language evolved and became a valid tool to develop reliable and performant server applications as opposed to just applets and client applications. The major disadvantage of the Java platform is that still today the only portable way to start a Java application relies on a single point of entry: the public static void main(String[]) method. Having a single-point of entry is a valid solution for client applications, where interactively a user can command to the application to quit (which can terminate the Virtual Machine process at calling the System.exit(int) method), but in those cases where the application is not interactive (server applications) there is currently no portable way to notify the Virtual Machine of its imminent shutdown. A server application written in Java might have to perform several tasks before being able to shutdown the Virtual Machine process. For example in the case of a Servlet container, before the VM process is shut down, sessions might need to be serialized to disk, and web applications need to be destroyed. One common solution to this problem is to create (for example) a ServerSocket and wait for a particular message to be issued. When the message is received, all operations required to shut down the server applications are performed and at the end the System.exit method is called to terminate the Virtual Machine process. This method however, has several disadvantages and risks: In case of a system-wide shutdown, the Virtual Machine process may be shut down directly by the operating system without notifying the running server application. If an attacker finds out the shutdown message to send to the server and discovers a way to send this message, he can easily interrupt the server's operation, bypassing all the security restrictions implemented in the operating system. Most multi-user operating systems already have a way in which server applications are started and stopped. Under Unix based
Hendy Irawan

Chapter 6. HTTP Caching - 0 views

  •  
    HttpClient Cache provides an HTTP/1.1-compliant caching layer to be used with HttpClient--the Java equivalent of a browser cache. The implementation follows the Decorator design pattern, where the CachingHttpClient class is a drop-in replacement for a DefaultHttpClient; requests that can be satisfied entirely from the cache will not result in actual origin requests. Stale cache entries are automatically validated with the origin where possible, using conditional GETs and the If-Modified-Since and/or If-None-Match request headers. HTTP/1.1 caching in general is designed to be semantically transparent; that is, a cache should not change the meaning of the request-response exchange between client and server. As such, it should be safe to drop a CachingHttpClient into an existing compliant client-server relationship. Although the caching module is part of the client from an HTTP protocol point of view, the implementation aims to be compatible with the requirements placed on a transparent caching proxy. Finally, CachingHttpClient includes support the Cache-Control extensions specified by RFC 5861 (stale-if-error and stale-while-revalidate).
Hendy Irawan

Scout/Overview - Eclipsepedia - 0 views

  •  
    The goal of the Eclipse Scout project is making it easy to build distributed enterprise applications based on the Eclipse platform. It consists of a runtime framework providing transparent service communication between the client and backend part and is shipped with a rich set of common user interface components. The user interface is not built for a particular rendering technology but it encapsulates the core functionality into a headless model. GUI factories are available for rendering the client model into a particular target UI platform. SWT and Swing are supported out of the box and an AJAX GUI factory could be easily added. Developing Scout applications is supported by the Scout SDK, a plug-in set built on top of Eclipse PDE and Eclipse JDT. The Scout SDK works directly on the bare Java resources and assists the development task by providing an augmented view on the underlying Java code. Additionally, it comes with a rich set of wizards and operations for modifying the Scout application project just by editing the underlying Java code. There is no meta-data required. Hence a developer can switch between editing resources using Eclipse's standard editors and leveraging the features of Scout SDK at any point in time. Eclipse Scout can be used to create multi-tier client/server applications, standalone client applications or OSGi-based server applications. Basically, there are three main advantages when choosing Scout as your framework for building such applications. First, the Scout runtime is service oriented by design. Almost every functionality is provided as an OSGi service. Every OSGi bundle may make use of them. Second, Scout provides a rich set of UI elements being uncoupled from a particular GUI technology. And third, building distributed client/server applications is as easy as if both parts would run within the same local JVM.
Hendy Irawan

Adding ICEfaces to Your Application - ICEfaces - ICEfaces.org Community Wiki - 0 views

  •  
    If you're just starting to build a JSF 2 application, or you've already started building one and you'd like to add ICEfaces, it's simple to do: Add and tags JSF 2 includes head and body components that can be added to the page by using the and tags. ICEfaces 2 makes use of these components to automatically add certain scripts and other elements to the page, so the and tags are required on any pages of your application that use ICEfaces 2.
Hendy Irawan

Discussion on eclipse-repository packaging type clean-up - Tycho - Confluence - 0 views

  •  
    The packaging type eclipse-repository was originally introduced for building products that can be updated with p2 (cf. TYCHO-188). This requires the following build results: a p2 repository which contains the product IU, and a zip file with the installed product. (Although this is technically no longer needed since the Update Manager was replaced by p2, zip files are still the primary way to distribute Eclipse/RCP installations.) For ease of implementation, this was done in the same packaging type eclipse-repository. In the meantime, eclipse-repository has gained in capabilities (in particular through TYCHO-491), making it difficult for users to choose the right packaging types. This page lays out the mid-term plan of how we want to build products, update site categories, and p2 repositories in Tycho. It also contains a few details how the transition todays (0.11.0) packaging types (eclipse-repository, eclipse-application, eclipse-update-site) to the new types eclipse-repository and eclipse-product.
Hendy Irawan

twitter/finagle @ GitHub - 0 views

  •  
    "Finagle is a library for building asynchronous RPC servers and clients in Java, Scala, or any JVM language. Overview Built atop Netty, Finagle provides a rich set of tools that are protocol independent. Finagle is flexible enough to support a variety of RPC styles, including request-response, streaming, and pipelining (e.g., HTTP pipelining and Redis pipelining). It also makes it easy to work with stateful RPC styles (e.g., those requiring authentication and those that support transactions)."
Merit Campus

Method Overloading Vs Method Overriding | Online Java Tutorial - 0 views

  •  
    Java Topic / Java tutorial The method overloading and method overriding are two different ways of achieving polymorphism. Both of them are very useful concepts required to solve the programming problems.
peter thomas

Java, J2EE Application Development Company, Custom Java Web Application Services - 0 views

  •  
    Beganto Inc, a leading Java Development company, provides extensive software development services using Java/J2EE/J2ME technology that delivers robust, scalable, and cost-effective software solutions within your budget. We ensure high quality application and shortened development cycles by employing the best-in-class Java/J2EE/J2ME Application Development framework in our development work as per the project requirements.
1 - 20 of 23 Next ›
Showing 20 items per page