I am showing how easy we can expose tomcat or any other server which is running on localhost (machine).
Most often developers want to show their application which is running on their laptop(localhost) to expose it outside (WWW) for demo purpose.
Here i am running my openbravo (J2eeWeb Application) running on my tomcat in port 80. I am going to expose my port 80 to www , so that my client would be able to access my application and do the testing of my development.
Steps i followed,
- Download and install Python 2.7
- Download pagekite.py to your Desktop
- Run the program!
- register your ip quickstart
How To Disable Startup Applications In Windows
Click the Start Menu Orb then in the search box Type msconfig and Press Enter or Click the msconfig.exe program link.
From within the System Configuration tool, Click Startup tab and then Uncheck the program boxes that you would like to prevent from starting when Windows starts. Click OK to save changes when you are done.
Now that you’ve saved changes Restart Windows and the selected programs should no longer automatically start up.
That’s all there is to it!
Source: How To Disable Startup Programs In Windows 7 and Vista
Java Persistence API
An entity class must follow these requirements.
The class must be annotated with the javax.persistence.Entity annotation.
The class must have a public or protected, no-argument constructor. The class may have other constructors.
The class must not be declared final. No methods or persistent instance variables must be declared final.
If an entity instance is passed by value as a detached object, such as through a session bean’s remote business interface, the class must implement the Serializable interface.
Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes.
Persistent instance variables must be declared private, protected, or package-private and can be accessed directly only by the entity class’s methods. Clients must access the entity’s state through accessor or business methods
Entities may use persistent fields, persistent properties, or a combination of both. If the mapping annotations are applied to the entity’s instance variables, the entity uses persistent fields. If the mapping annotations are applied to the entity’s getter methods for JavaBeans-style properties, the entity uses persistent properties.
If the entity class uses persistent fields, the Persistence runtime accesses entity-class instance variables directly. All fields not annotated javax.persistence.Transient or not marked as Java transient will be persisted to the data store.
Mapping annotations cannot be applied to fields or properties annotated @Transient or marked transient.
Using Collections in Entity Fields and Properties:
If a field or property of an entity consists of a collection of basic types or embeddable classes, use the javax.persistence.ElementCollection annotation on the field or property.
The two attributes of @ElementCollection are targetClass and fetch. The targetClass attribute specifies the class name of the basic or embeddable class and is optional if the field or property is defined using Java programming language generics. The optional fetch attribute is used to specify whether the collection should be retrieved lazily or eagerly, using the javax.persistence.FetchType constants of either LAZY or EAGER, respectively. By default, the collection will be fetched lazily.
When using Map elements or relationships, the following rules apply.
The Map key or value may be a basic Java programming language type, an embeddable class, or an entity.
When the Map value is an embeddable class or basic type, use the @ElementCollection annotation.
When the Map value is an entity, use the @OneToMany or @ManyToMany annotation.
Use the Map type on only one side of a bidirectional relations
Bean Validation constraints may be applied to persistent entity classes, embeddable classes, and mapped superclasses. By default, the Persistence provider will automatically perform validation on entities with persistent fields or properties annotated with Bean Validation constraints immediately after the PrePersist,PreUpdate, and PreRemove lifecycle events