Software IT-Consulting und Coaching

Carsten Luxig

Beliebt

Distribute CDI Events between different EARs

A typical JEE application consists of or is devided in different EARs or WARs to seperate concerns or to be encoupled during updates. Usually two EARs, even within the same VM, communicate via REST, JMS or (hopefully not :)) via remote EJB. Since CDI steped into our enterprise world, developers started loving it. Nearly everything can be extended, produced […]

Find duplicated items in 2 Collections with Lambda expressions

Imagine a case, where items of two Collections need to be filtered out, which are contained in both. But not the item itself should be compared, but only a property within the item. Of course, we are not able to overwrite equals and hashCode, because we have to deal with domain objects. class Item { […]

Activate RequestContext within (managed) executor

The specification of JEE defines, that only the ApplicationScope and DependentScope have to be activated within an executed thread (managed or non-managed). Hence, by executing asynchronous processes by ExecutorService.submit(process), an error is thrown because RequestContext is inactive, if RequestScoped beans are injected, used or produced anywhere during invocation. Now it could be the case, that you have a CDI-producer […]

Letzte Beiträge

CSS flex: stretch items in one-column mode

If you build a display: flex layout, to fit items in a responsive two-column layout (flex: 0 0 50%), you will probably recognize a stretching-issue on an odd number of items. One cannot use flex: 1 50%, because this always stretches the last item over 2 columns, whereas the one-column mode looks well. How to […]

RxJs Observable acting as BehaviorSubject

The goal is to load data initially from a Promise (or somewhere else) into an Observable. Late subscribers shall get at least the latest published or even the initial value.

Running Gitea behind Plesk Onyx

Just install Gitea as proposed in documentation https://docs.gitea.io/en-us/install-from-binary/ I changed the execution port to 3001, because of an existing, running NodeJS application on port 3000. Now move to Hosting settings of plesk. I first tried to serve the contents with Nginx. But the location / is already defined by plesk internally. Even if I managed […]

Resolved: Git line-endings

Usually, most cross-platform or cross-IDE projects have issues with line-endings. If some of the project’s contributor or developer does not set the property core.autocrlf=true (Windows) or core.autocrlf=input (Linux) the repository gets disrupted. Especially the Eclipse EGit integration uses core.autocrlf=false by default, which causes issues very fast during merging processes. To solve this problem and to […]

Activate RequestContext within (managed) executor

The specification of JEE defines, that only the ApplicationScope and DependentScope have to be activated within an executed thread (managed or non-managed). Hence, by executing asynchronous processes by ExecutorService.submit(process), an error is thrown because RequestContext is inactive, if RequestScoped beans are injected, used or produced anywhere during invocation. Now it could be the case, that you have a CDI-producer […]

Find duplicated items in 2 Collections with Lambda expressions

Imagine a case, where items of two Collections need to be filtered out, which are contained in both. But not the item itself should be compared, but only a property within the item. Of course, we are not able to overwrite equals and hashCode, because we have to deal with domain objects. class Item { […]

Distribute CDI Events between different EARs

A typical JEE application consists of or is devided in different EARs or WARs to seperate concerns or to be encoupled during updates. Usually two EARs, even within the same VM, communicate via REST, JMS or (hopefully not :)) via remote EJB. Since CDI steped into our enterprise world, developers started loving it. Nearly everything can be extended, produced […]