<!– example –> <xs:simpleType> <xs:restriction base=”xs:string”> <xs:enumeration value=”Audi”/> <xs:enumeration value=”Golf”/> <xs:enumeration value=”BMW”/> </xs:restriction> </xs:simpleType> <!– example –> <xs:complexType name=”personinfo”> <xs:sequence> <xs:element name=”firstname” type=”xs:string”/> <xs:element name=”lastname” type=”xs:string”/> </xs:sequence> </xs:complexType> <xs:complexType name=”fullpersoninfo”> <xs:complexContent> <xs:extension base=”personinfo”> <xs:sequence> <xs:element name=”address” type=”xs:string”/> <xs:element name=”city” type=”xs:string”/> […]
Spring Data REST
The core functionality of Spring Data REST is to export resources for Spring Data repositories. Spring Data REST exposes sub-resources of every item resource for each of the associations the item resource has. By default, Spring Data REST uses HAL […]
Spring HATEOAS
HATEOAS means Hypermedia As The Engine Of Application State ResourceSupport – support class for building DTOs with links ControllerLinkBuilder – allows to create links by pointing to controller classes (Spring MVC controllers or JAX-RS resource classes) With ControllerLinkBuilder you depend […]
Java Memory Model
Volatile doesn’t mean what you think, either
Apache CXF 3.0.3
Scenario 1 All jax-rs annotation are applied on interface. No jax-rs annotation are applied on class. @POST @Consumes({ APPLICATION_XML }) method1(InputStream istream) @POST @Consumes({ APPLICATION_FORM_URLENCODED }) method2a(@FormParam(“”) final Pojo2 p2) -> won’t detect it as a resource method @POST @Consumes({ […]
IBM WebSphere 6.1 on Ubuntu
Install 1. install java 1.5 from oracle 2. start WAS install: cd /********/Downloads/was.cd.6100.trial.base.linux.ia32/WAS/ /********/apps/opt/java/jdk1.5.0_22/bin/java -jar setup.jar 3. WAS install window should start … Configuration export JAVA_HOME=/********/apps/opt/java/jdk1.5.0_22 export PATH=”/********/apps/opt/java/jdk1.5.0_22/bin:$PATH” cd /********/apps/opt/WebSphere/AppServer/bin mv /********/apps/opt/WebSphere/AppServer/java/bin/java /********/apps/opt/WebSphere/AppServer/java/bin/java1 ln -s $JAVA_HOME/bin/java /********/apps/opt/WebSphere/AppServer/java/bin/java ./manageprofiles.sh help -> […]
JAX-RS with Jersey
Terms resource method designator – annotation such as @GET, @PUT, @POST, @DELETE sub-resource methods – methods annotated with @Path and also with resource method designators such as @GET or @POST sub-resource locators – methods annotated with @Path but not with […]
@MapKey vs @MapKeyColumn
// @MapKey refers the field/property (unique one) in the Entity witch is the value of a Map field/property // @MapKeyColumn refers the column in an @ElementCollection @Entity public class Person6 { @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true, […]
ESB
ESB – match and route (filter node for IBM) – convert (protocols) – format data – orchestration (e.g. from some web services, dbs, files, etc collect partial data and create a new web services) – event delivering ESB = Enterprise […]
Ubuntu 16.04 XRDP (remote desktop)
installation Consider ubuntu xrdp error problem connecting 5910 solution: tightvncserver MUST be installed before xrdp!!! sudo apt-get install xubuntu-desktop sudo apt-get install tightvncserver sudo apt-get install xrdp sudo usermod -aG xrdp adr configure XRDP (option 1) cat ~/.xsession echo ‘xfce4-session’ […]
Handling video in Linux
video exif tool sudo apt-get install libimage-exiftool-perl display video’s rotation exif exiftool -Rotation 20151024_132350.mp4 rotate the exif metadata only ffmpeg -i 20151024_132350.mp4 -metadata:s:v rotate=”0″ -vf “hflip,vflip” -c:v libx264 -crf 23 -acodec copy 20151024_132350b.mp4 resize to 720p ffmpeg -i IMG_0001.MOV -vf […]
VMWare
ERROR1 VMWare says something like “vmware kernel module updater …” and requires pressing Install button then nothing happens. ERROR2 After some Ubuntu updates the vmware network adapters are gone. SOLUTION sudo vmware-modconfig –console –install-all
fan speed control/monitor
Install the lm-sensors Install lm-sensors and fancontrol Install fancontrol packages. # Configure lm-sensors; respond with yes for everything below (will modify /etc/modules): sudo sensors-detect # Monitoring programs won’t work until the needed modules are # loaded. You may want to […]
/var/mail && thunderbird
See http://askubuntu.com/questions/1916/how-can-i-access-system-mail-in-var-mail-via-thunderbird. Create the account Thunderbird -> Edit -> Account settings -> Account Action -> Add Another Account -> Unix Mailspool (Movemail) Your Name: adr (mailspool) Email Address: adr@localhost Browse your mails Open Thunderbird then press Get Messages button; you […]
nagios3
# change user & password in passwd-file specified by /etc/nagios3/apache2.conf # change nagiosadmin to the user chosen sed -i s/”nagiosadmin”/”adr”/ /etc/nagios3/cgi.cfg # Edit the disk.cfg file located in /etc/nagios-plugins/config and add the arguments # -A -i ‘.gvfs’ # at the […]