Skip to main content

Home/ Java Development/ Group items tagged server

Rss Feed Group items tagged

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 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

Virgo - Home - 0 views

  •  
    The Virgo Web Server from EclipseRT is a completely module-based Java application server that is designed to run enterprise Java applications and Spring-powered applications with a high degree of flexibility and reliability. It offers a simple yet comprehensive platform to develop, deploy, and service enterprise Java applications. The Virgo kernel supports the core concepts of Virgo and is not biased towards the web server, thus enabling other types of server to be created. The kernel can also be used stand-alone as a rich OSGi application platform. A server runtime can easily be constructed by deploying suitable bundles on top of the kernel.
Richard Boss

Steps to Configure Wowza and Create an Application - 0 views

  •  
    Read this post to know how to install and configure Wowza media server. And let's see basic steps to create an application on Wowza server.
Hendy Irawan

Running GlassFish V3 with Apache httpd | Java.net - 0 views

  •  
    " GlassFish V3 has improved the way to front GlassFish with Apache HTTP Server. Unlike the V2 way where users had to copy tomcat-ajp.jar and commons-*.jar, you can just enable mod_jk in V3 using the network-listener's attribute "jk-enabled" without copying any additional jars into its lib directory. You can also create jk-connectors under different virtual-servers (not just default virtual-server "server" in V2) using the network-listener's "jk-enabled" attribute. "
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

Jisql - a Java based interactive SQL application - 0 views

  •  
    Jisql is a Java based utility to provide a command line interactive session with a SQL server. This application is conceptually modeled on the Sybase 'isql' program with, obviously, strong similarities to Microsoft SQL/Server isql and osql (as Microsoft got SQL Server from Sybase). The program can act in a similar way to Oracle's sqlplus and PostgreSQL's psql.
allen peter

Steps to create a servlet example in tomcat server - 0 views

  •  
    We give you the best way that How to Make a Java Servlet Using Tomcat.And This Topic also explains you that how to set up and use a Tomcat hosting server with great examples.
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
henry klingberg

Redirect After Post - 0 views

  • input data, which can change state of server application
  • reloading result page using Refresh/Reload
  • Instead of returning a result page immediately in response to POST request, server responds with redirect to result page. Browser loads the result page as if it were an separate resource
  • ...2 more annotations...
  • When a user tries to refresh the result page, browser resends an "empty" GET request to the server. This request does not contain any input data and does not change server status
  • The vehicle which makes transition from POST to GET possible is redirection.
Hendy Irawan

Atmosphere - Java.net - 0 views

  •  
    Atmosphere is a POJO based framework using Inversion of Control (IoC) to bring push/Comet and Websocket to the masses! Finally a framework which can run on any Java based Web Server, including Tomcat, Jetty, GlassFish, Weblogic, Grizzly, JBossWeb and JBoss, Resin, etc. without having to learn how Comet or WebSocket support has been differently implemented by all those Containers. The Atmosphere Framework has both client (JQuery PlugIn) and server components. Servlet 3.0 is supported along with framework like Jersey (natively), GWT (natively), Wicket, Guice, Spring etc. and programming language like JRuby, Gr oovy and Scala. We also support massive scalability with our Cluster plugin architecture (JGroups, JMS/ActiveMQ, Redis, XMPP,i etc.)
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).
Subhash Chandran

Andrew Cowie - Sun's secret web server - 0 views

  •  
    JDK 6 has a hidden web server!
Vitaliy Berdinskikh

Java Secure FTPd Server - 1 views

  •  
    FTP Server written in pure Java. Supports AUTH SSL (Explicit SSL), it is firewall friendly (handles the CCC command), has virtual home directories with individual read/write access, anoymous support and many more
Hendy Irawan

Geotoolkit.org - Home - 0 views

shared by Hendy Irawan on 18 Nov 12 - No Cached
  •  
    "Geotoolkit.org (abridged Geotk) is a free software, Java language library for developing geospatial applications. The library can be used for desktop or server applications. Geotk is the reference implementation of GeoAPI 3.0 interfaces."
Hendy Irawan

Marc Logemann Blog: Ext GWT or SmartGWT or Vaadin - 0 views

  •  
    From a technical standpoint Ext GWT and SmartGWT are quite equal apart from the fact that Smart has more to offer on the server side. Vaadin with its complete different apprach (not from the programming style but from runtime behavior) needs to be compared in a different fashion. Things like GUI responsiveness and overall performance must be carefully checked. But on the pro side you have a very small js client with vaadin which results in fast startup in the browser. On the other hand, our product is a business product and we are planing to rewrite the AdminConsole. This is something that will be used in intranets in 95% of the time. It doesnt make much of a differnece if you load 100k or 1Mb from inside the LAN.
Baron M

GAME OVER - Java Server Faces | ComeSolveGo - 0 views

  • Almost everything is wrong with the framework
  • Little control over generated HTML
  • While you need basic functionalities, everything is fine. When you need to modify the component (which is configurable, right?) you are facing the problems
  • ...8 more annotations...
  • EXTREMELY idiotic thing - because JSF has their famous lifecycle with lots of magic phases, some backing bean getters are called multiple times!
  • Back button problem.
  • Unreadable URLs. JSF always does the POST.
  • JSF is submitting a form on itself so it could call a backing bean method to handle an event. Of course, if you have a request, there is unnecessary repeated initialization, getter calls, postconstruct etc
  • Reusability? Good joke…
  • JSF - you are FIRED!
  • IDE support
  • Development of custom component? No way, extremely complicated. Extensible? In the movie, maybe…
  •  
    I think many people have the same feeling (of course including me)
Hendy Irawan

Spring Security - 0 views

  •  
    Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications Spring Security is one of the most mature and widely used Spring projects. Founded in 2003 and actively maintained by SpringSource since, today it is used to secure numerous demanding environments including government agencies, military applications and central banks. It is released under an Apache 2.0 license so you can confidently use it in your projects. Spring Security is also easy to learn, deploy and manage. Our dedicated security namespace provides directives for most common operations, allowing complete application security in just a few lines of XML. We also offer complete tooling integration in SpringSource Tool Suite, plus our Spring Roo rapid application development framework. The Spring Community Forum and SpringSource offer a variety of free and paid support services. Spring Security is also integrated with many other Spring technologies, including Spring Web Flow, Spring Web Services, SpringSource Enterprise, SpringSource Application Management Suite and SpringSource tc Server.
Hendy Irawan

Home - Codehaus - 0 views

  •  
    Janino is a super-small, super-fast Java™ compiler. Not only can it compile a set of source files to a set of class files like the JAVAC tool, but also can it compile a Java™ expression, block, class body or source file in memory, load the bytecode and execute it directly in the same JVM. Janino is not intended to be a development tool, but an embedded compiler for run-time compilation purposes, e.g. expression evaluators or "server pages" engines like JSP. JANINO is integrated with Apache Commons JCI ("Java Compiler Interface") and JBoss Rules / Drools. JANINO can also be used for static code analysis or code manipulation. JANINO can be configured to use the javax.tools.JavaCompiler API (available since JDK 1.6), which removes the Java 5-related limitations.
DJHell .

Apache MyFaces Trinidad - Mobile Application Development - 0 views

  •  
    When developing a mobile application, you need not focus on the limitations or capabilities of different browsers, as Trinidad enables you to develop applications that function properly on different browser types. The Trinidad renderer ensures that the target browser can consume contents correctly. It handles the variations in both browser implementations of HTML, JavaScript, CSS, DOM, XMLHttpRequest and system performance. For example, if a browser does not support XMLHttpRequest and is incapable of posting a partial page request to a server, support for AJAX enables the application to revert automatically to a full page submit so that the same page functions whether the browser supports XMLHttpRequest or not. Furthermore, if the target browser does no support JavaScript Trinidad will automatically render contents that work on HTML by removing all dependencies on JavaScript.
1 - 20 of 37 Next ›
Showing 20 items per page