Developers Club geek daily blog

Hibernate. Basic principles of work with sessions and transactions

1 year, 4 months ago
In my first article on Habré I would like to share some reasons and notes on work with Hibernate, the concerning sessions and transactions. I stopped on some nuances which arise at the beginning of mastering of this subject. I am recognized, the Junior-programmer so far, worked with Hibernate not constantly therefore, as always, errors if you will notice it are possible, I will be grateful for corrections.

The Hibernate library is the most popular ORM билиотекой and implementation of Java Persistence API. It is often used as ORM provider in normal Java applications, containers of servlets, in particular, in JBoss application server (and his descendant by WildFly).

Let's begin, perhaps.

Read more »


How to implement SOAP-service for work with tables of Google through SQL

1 year, 4 months ago
There was a task — during preparation of a demo of one of solutions it was necessary to show that client information can be saved anywhere — in a simple case, for example, in tables of Google, in more difficult (after semi-annual "implementation" and the multimillion budget) in the client's CRM. In WSO2 ESB used by us there is a connector to tables of Google — but to implement required functionality on it it was not really simple task — and then I chucked in it.

But recently, dealing with new features of WSO2 Data Services Server found out that in it it is possible to implement easily SOAP service for work with tables of Google (which can be picked up then anywhere). And work with data in the table is carried out through usual by all SQL.
How to make it, and I want to tell under a cat.

Read more »


Spring 4 MVC, Hibernate: association many to many

1 year, 4 months ago
This post shows the attitude many - to - much in Hibernate, on the example of connection of tables in a web application of Spring 4 MVC. We will discuss management of the relation many - to - much in representations and in bek-end'a. We will execute operations of creation, updating, removal and request via the web interface.

This application is used by the interface org.springframework.core.convert.converter.Converter, which helps us with the ID display' objects in these subjects in the database.


Read more »


Installation of a plug-in onlyoffice-alfresco (a control leaf — a crib)

1 year, 4 months ago
On November 10, 2015 the plug-in became available to editing documents in Alfresco Share by means of the OnlyOffice online editors. The code of a plug-in is distributed under the license GPL.

Read more »


Critical vulnerability in a number of Java Application Server

1 year, 4 months ago

Yesterday in the blog Apache FSF interesting record appeared. It was vulnerable practically all softwares which uses serialization and deserialising of data together with apache commons collections and some other libraries.
Vulnerability was described on November 6, and today Oracle let out the first patches to WebLogic.

Briefly


Type: Remote code execution
Danger: high
Vulnerable software: Oracle WebLogic, IBM WebSphere, JBoss, Jenkins, OpenNMS and another software with commons collections in classpath.
Description: Vulnerability allows the malefactor to create such packet of the serialized data which when unpacking will force the vulnerable server to perform any code.

Read more »


Highload Dev Conf' passed 2015 on October 17 in Minsk

1 year, 4 months ago
On October 17 there took place the annual brutal Highload Dev Conf conference.
More than 300 severe developers to whom the high-loaded projects and BigData are interesting became participants.

image

Read more »


That new and interesting in IntelliJ IDEA 15

1 year, 4 months ago
Last week JetBrains declared an output of IntelliJ IDEA 15. As always, IDE is available in two editions: commercial Ultimate and free Community Edition. It is possible to download the new version on the official site of JetBrains. This post in brief that in it new and interesting.

image

Kotlin
The main news is that along with release of IntelliJ IDEA 15 there was also Kotlin Beta — the programming language, almost ready to JVM release, developed in JetBrains subsoil. In IntelliJ IDEA 15 support of Kotlin is available "from a box".

Debugger
Popularity of Java 8 continues to gain steam, and JetBrains continues to do a debugger more convenient for work with a lambda expressions. When adding the break point of IDE allows to select specific expression now. It is possible to pass in specific lambda expression now and by means of Step Into and Run to Cursor.

Also the Force Return tool was added to a debugger. It allows to interrupt execution of the current method and to return the selected value. It can be convenient if you want to change logic of execution of the program without change of a code and without restart.

Read more »


Web two - nolnye labels for Java

1 year, 4 months ago
When I needed to implement labels for Java "as in web two-zero", the gugleniye did not help to find any library containing in similar type of a collection.

Decided to make.

So, we should keep objects in a collection of this type (we will call it, say, LabelsMultiMap). Both objects, and labels can be any type. The quantity of labels is on top not limited, as well as amount of objects. More than 1 object can be described by the same set of labels. One label can occur at one object only 1 time.

Example of valid labels:
Labels Objects
green, wooden, alive tree
green, wooden, lifeless bench
green, alive, croak frog

The collection has to allow:

  1. put () — to place in it objects with the list of the attached tags
  2. () — to return to getValues the objects which are contained in a collection
  3. findValues () — to perform object search which labels contain a required set of labels
  4. findValuesOnlyIn () — to perform search only of those objects which all labels enter a required set of labels

Read more »


How to manage almost without any exception, having replaced them with notifications

1 year, 4 months ago
Hello, Habr.

Sometimes articles which want to be translated just for a name come across. It is even more interesting when such article can be useful to different languages specialists, but contains examples on Java. Very soon we hope to share with you our latest idea concerning the edition of the big book about Java for now we suggest to study Martin Fowler's publication of December, 2014 which still was not translated into Russian. Transfer is made with small reductions.

Read more »


Creation of a plug-in for Intellij IDEA. Notes and small councils

1 year, 4 months ago
Half a year ago or about that I lit up ideas to write the plug-in for Intellij IDEA. According to an idea, he had to consider, what is the time the developer spent for the project (everything, in a day, for a session) and to display result on the chart. Any magic, but such function fine would help me to calculate operating time.


Read more »