Quantcast
Channel: Magnus K Karlsson
Browsing all 526 articles
Browse latest View live

How to Set Default JVM on Ubuntu

If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window

View Article


Simple Login Module in JBoss EAP 6 for Testing

IntroductionWhen testing locally or in integration tests, it is convenient to use a simple login module. Source code.ConfigurationTest Web AppWEB-INF/web.xmlWEB-INF/jboss-web.xml

View Article


Mapping OneToMany with JPA 2.0

IntroductionMapping one-to-many relationship with JPA 2.0, can be done in 2 ways:@OneToMany, with optional @JoinColumn@OneToMany with @JoinTableHere I will look closer on option one, which is most...

View Article

Composite Primary Key with Generated and Unique Value with JPA 2.0

IntroductionSometime you need several column for you primary keys. The background for that can very. There are two solution for that in JPA:@IdClass as inline columns@EmbeddedId with extract column in...

View Article

UTF-8 Charset as Constant in Java 7

Since Java 7 UTF-8 as a constant has been introduced with java.nio.charset.StandardCharsetsExample

View Article


How do you import static in Eclipse?

When you press Ctrl+Shift+O new imports are added and organized. But that will not work for static imports.But if you place the cursor on the static import method and press Ctrl+Shift+M, then it will...

View Article

Minimalistic POM for Java EE 7

One of the greatest news about Java EE 7 is, there is a usable dependency in maven central.And here is a minimalistic POM for your Java EE 7 projects. I also added log4j, junit and mockito which are...

View Article

Image may be NSFW.
Clik here to view.

Remote Debugging in JBoss EAP 5

To enable remote debugging in JBoss EAP 5, uncomment the below in run.confjboss-eap-5.2.0/jboss-as/bin/run.confNow deploy your application and open Eclipse:Add breakpoint in your code.Add Debug...

View Article


Remote Debugging in JBoss EAP 6

To enable remote debugging in JBoss EAP 6, set DEBUG_MODE to true in standalone.shjboss-eap-6.4.0/bin/standalone.shThen follow mine Eclipse settings in my previous blog for JBoss EAP...

View Article


Choosing the Default Java on Ubuntu

View Article

How To Install VisualVM (jvisualvm) on Ubuntu

Default JDK on Ubuntu is OpenJDK. Because of legal restriction OpenJDK does not come with VisualVM, so you need to install it separately.

View Article

Image may be NSFW.
Clik here to view.

How to connect to JBoss EAP 6 using VisualVM

For this to work you need to have an account on access.redhat.com to be able to download the required jvisualvm.sh or .jvisualvm.bat script. See https://access.redhat.com/solutions/151343.After...

View Article

Scheduling/Time Service in Java EE 6

In Java EE 6 is scheduling feature already built in.Example from The Java EE 6 Tutorial (http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html).Also good reading from Arun Gupta -...

View Article


Finally Standardized JNDI Naming in Java EE 6

Previous Java EE 6 each EE container had its own JNDI naming standard. This means when deploying an EJB in a Java EE 5 container, they were all accessed with different JNDI names.Now this is history...

View Article

Now Standard Embedded EJB Container in Java EE 6

With Java EE 6 there is a standardized Java EE embedded container javax.ejb.embedded.EJBContainer for example unit testing.See https://docs.oracle.com/javaee/6/tutorial/doc/gkcrr.html.

View Article


PicketBox Deprecated in JBoss EAP 7

JBoss EAP 7 is only release as a beta, but already now can a few changes been seen. For example is PicketBox deprecated and replaced with Elytron.More news:PicketLink and Keycloak projects are...

View Article

HornetQ is Deprecated in JBoss EAP 7

In every major upgrade of JBoss there is a new messaging broker.HornetQ in JBoss EAP 6 JBoss Messaging in JBoss EAP 5 JBossMQ in JBoss EAP 4  And now in JBoss EAP 7 it is A-MQ which comes from Apache...

View Article


How to Install Jad (Java decompiler) in Eclipse

Download jadclipse from https://sourceforge.net/projects/jadclipse/.Put the JadClipse JAR file into the plugins folder of your Eclipse installation.Restart Eclipse (eclipse -clean).Download Jad from...

View Article

Containers for Java Microservices

In the recent years there has been a lot of talks about microservices. There is not a clear definitions of what a microservice is and maybe more important how to build one.But there are some clear...

View Article

Asynchronous Support in Java EE 6

IntroductionJava EE 6 comes with two ready to use asynchronous technique:EJBServletEJBExampleOracle Java EE 6 Tutorial: Asynchronous Method InvocationOracle Java EE 6 Tutorial: Using Alternatives in...

View Article
Browsing all 526 articles
Browse latest View live