Questions tagged [java-ee]

Java Enterprise Edition (JavaEE) is a platform for enterprise computing for Java.

Filter by
Sorted by
Tagged with
-1
votes
1answer
63 views

How to modify and compile ONLY few java files among many thousands and deploy? [closed]

This is basically a code development question that deals with frequent changes to one or more java files among many thousands. A few years ago, as a software intern, I was given a large java / jsp ...
2
votes
7answers
286 views

Dealing with large code base quickly in agile

At my current company, the project I work on is coded in Java, at least for the systems / backend part. Whenever I get assigned a task dealing with the Java code, it take me hours or even days to ...
0
votes
1answer
44 views

Passing and using properties through annotations in Java

I have a Java EE Application in which I have an Interceptor class like this @Interceptor @Logged public class LogInterceptor { @AroundInvoke public Object logMethod(InvocationContext context) ...
0
votes
0answers
18 views

Updating an entity and many relationships: database vs application layer

We are working on a transformation project It has records in table entityA and entityB, which has a relation entityAB. We need to delete records in table entityA and recreate them with some other ...
1
vote
3answers
292 views

How to reduce dependency on IOC Framework (Frameworks in general)

I was watching a presentation by Uncle Bob. In the end of that presentation (last 10 min), He argued that we should abstract everything (Even frameworks) from our business logic. JAVA EE does a great ...
0
votes
1answer
85 views

How to document changes to a project

A company I work with uses a "skeleton" project as base scaffolding for each project they have. I work on several edits to the skeleton. Some of them are few lines on huge source files. What's a good ...
-2
votes
1answer
635 views

How @RolesAllowed annotation is workin in Java [closed]

I know that @RolesAllowd annotation can be used to provide role-based access control to REST endpoints and I am currently using that with RestEASY. I need to know how it is working behind the scenes....
-1
votes
1answer
62 views

What is the benefit of the specification approach in JavaEE?

What is the benefit of having multiple implementations just for doing one thing? Are there any other languages that use this concept?
-2
votes
1answer
190 views

Why EJB service Injection requires the specific subclass to be created?

Most Java EE guidelines suggest that we should define Abstract EJB services (APIs) and then define concrete implementations in order to conform with OO design principles. But at the injection point, ...
1
vote
1answer
63 views

Architecture approach for developing a XML generator application

I am working to on an application which generates XML based on user input. Currently the application is in Design phase. And I am really confused on how to progress on this. Well the Idea is that: ...
1
vote
1answer
207 views

logger initialization in JEE based web application

While working on a web (JEE based) application I saw some different ways people have instantiated loggers in different classes. First way is classic way like, private static final Logger logger = ...
0
votes
1answer
324 views

X.509 authentication for microservices with JavaEE [closed]

I am trying to design an app that is based on microservice architecture. Backend is written in JavaEE (micro profile, not Spring Boot), while for front-end I would use Angular5. Now I am wondering ...
1
vote
1answer
58 views

should I use server cluster when my application does not work with session

I read about payara(glassfish) server cluster and find out that clustering with payara only replicate session in multiple servers. but I use jwt for my project so I don't use session at all. I ...
1
vote
0answers
56 views

Is it okay to have an asymmetric relationship between entities in a JavaEE data model?

I'm having difficulties assessing a design decision regarding entity relations in a JavaEE persistence data model. Let's say I want to design a simple data model that's supposed to represent a ...
0
votes
2answers
92 views

Team collaboration with Maven - Java EE

For team of 6, We have spring MVC project being developed with Angular as Frontend and Spring framework as back end. From Java project build & version control aspect, Is it recommended, to not ...
4
votes
0answers
1k views

Understanding the data flow in Spring REST layered architecture

I am new to Spring as well as layered architecture. So am a bit confused as how data flows among the different layers. What so far I have understood is: Layers: Controller (which accepts requests) ...
1
vote
0answers
197 views

Caluclate needed heap size needed for serialization

In my current Java EE project I've got a quite common task: Load objects from database using Hibernate, transfer them in another object structure (based on a XSD) and serialize it using JAXB. To ...
0
votes
2answers
471 views

Correct way to separate JPA with Service layer

I have two tables: area ( id int PK autoincrement code varchar ) products ( id int PK autoincrement name varchar area_id int PK to AREA ... ) The classes are persisted using eclipselink ...
1
vote
0answers
110 views

Classiest file system locations for my Linux app to write its files?

I have an application I am writing on Linux. It is a Java webapp intended to be run on Tomcat. When it initializes, my application will copy some standalone java utility programs to the host ...
0
votes
0answers
125 views

Why was the Java EE specification created?

I am trying to understand the goals of Java EE specification. I suppose Sun could just build a software package offering all those functionalities? Kind of like Spring. Instead they thought it was ...
-1
votes
2answers
923 views

Java EE Web Application directory layout

Introduction I am working on a Java EE Web Application that is a basic CRUD app. It is built with Servlet and JSP technologies, without any Frameworks. I am doing it to make my hands dirty in plain ...
2
votes
1answer
605 views

How would you create a custom CDI @ProcessScope?

I am coding a Java EE application that provides REST services via JAX-RS resource classes, the application makes extensive use of CDI. My resource classes are @RequestScoped, the application returns ...
5
votes
3answers
842 views

Does the use of frameworks make it unnecessary to learn design patterns?

I don't want to say that is not necessary knowing design patterns. I just want to tell you my experience. I've used Spring frameworks for four years and another frameworks (JSF, Mybatis, Hibernate, ...
-4
votes
2answers
3k views

What is best one between JSF and angular for java hibernate,spring,strut application?

I want to develop application using java frameworks(spring,hibernate,strut). This application has large complex operations.I want to know what is the best between JSF and angular? As well as i want ...
5
votes
1answer
192 views

Can you use annotations for any use-case of Web.xml in Java EE?

Nowadays I have been practising Java EE. There are may annotations which simplify configuration of servlet container. Such as: @WebServlet @WebInitParam @ServletSecurity etc. You can do the ...
3
votes
1answer
125 views

Pass Objects or values as parameters to functions

I'm working with JEE standard. I have the following layers: JPA (Eclipse Link), Data Access, Business Logic, and JSF (Primefaces). Primefaces uses MVC design pattern, so the the presentation layer ...
0
votes
1answer
75 views

Design For Same Activity Triggered Both Manually and Automatically

I need to develop the following Java solution and I would like to double-check here that my approach is correct. At the very basic level, I need the solution to (1) perform an automated activity at ...
2
votes
0answers
97 views

Are Remote EJBs the right way to go?

I am planning to remodel my current application and I am not sure if this is the right approach. Currently I have a Java Enterprise server application with 3 web-applications and an ejb-application ...
1
vote
0answers
49 views

One service facade per view

I am currently trying to design a Java EE web application. The views are quite complex, i.e. several dynamic drop down menus. The content of those drop downs may depend on the internal state of the ...
1
vote
1answer
2k views

CMT transactions on EJB versus @Transactional on CDI beans

Suppose you are designing today a JavaEE JSF web application. You have a choice on the one hand between making the methods of your CDI beans @Transactional, and on the other hand injecting (session ...
1
vote
2answers
1k views

Web Application Architecture review and understanding

I'm an amateur java developer and I have been working on this web application in my current company. The application is made in the Spring MVC framework. Hibernate is used as the ORM tool while the ...
5
votes
2answers
158 views

How to deal with different configurations with non-overlapping properties?

I am working on a project based on the Java EE technology. First I'd like to tell you what I want to achieve, then what I already tried. Task: Imagine two types of configurations, which you want to ...
0
votes
1answer
125 views

Divide java web app into smaller web app

I've a web application that consists of 3 main technologies: JSF, jax-rs and websocket. All three are coupled together with the help of CDI injection and JPA. That means that when a user login, he ...
1
vote
1answer
856 views

Java is not actually a pure object oriented programming language since it needs primitives Why?

here my Question it is said that "Java is not actually a pure object oriented programming language since it needs primitives" I want to know that how data types can affect to java be an pure object ...
3
votes
1answer
1k views

Best way to deliver and deploy JEE application to client

I've worked for a few companies and even developed projects on my own - these projects were based on Java Enterprise Edition. Sometimes with Spring Framework involved, sometimes it was a pure JEE. ...
0
votes
1answer
69 views

Replace a enterprise JAVA EE enviroment with a lightweight solution

Currently I work in a company with several applications developed in Java, these applications share an "internal framework" with common task like find an employee, check user permissions, etc. These ...
3
votes
1answer
238 views

What are modern develop-deploy-test techniques for non-interpreted languages?

I have strong web-developer background, where in order to show client a demo I've uploaded a solution to demo environment and sent over a link. If case client asked to make changes, I did them in ...
5
votes
1answer
5k views

Log4j logger per class vs logger per application

I am stuck at understanding a concept related to Logger creation, especially in the context of Java EE. In my experience, I nearly always used one logger per application, with few cases when I needed ...
2
votes
3answers
12k views

How to reduce size of jar file?

I dont know how to reduce the size of jar file. When we normally code in Java Swing the jar file is created, is there any way to reduce the size of jar file? I can't remove the images and other stuff ...
3
votes
1answer
6k views

How to access environment-specific configuration in an enterprise application?

My application is a generic enterprise application which can be deployed on any application server running on any OS. I don't know how/where to configure my application, except for the database ...
1
vote
2answers
192 views

Where to store standalone.xml and other files so it is acessible in my CI server?

I am fairly new to JavaEE, so I have some concepts still missing. I am learning Docker to use it in our DEV / CI Build environments. I could make it work on my machine. But for it to work in the CI ...
60
votes
5answers
40k views

Dependency Injection: Field Injection vs Constructor Injection?

I know this is a hot debate and the opinions tend to change over time as to the best approach practice. I used to use exclusively field injection for my classes, until I started reading up on ...
0
votes
1answer
165 views

Under the hood of Java application servers resources

We are used to Node.js / Python / Insert X. Moving to a Java EE stack, it seems to me like all of the resources are 'press this button', 'do that' without any actual architectural explanation. For ...
6
votes
2answers
5k views

Why Java does not have a framework like Rails? [closed]

I am a Ruby on Rails developer and I like its simplicity and rapidness. On the other hand we need to use Java for some projects that we develop for our clients. My question is why (pure) Java does ...
1
vote
2answers
2k views

What is a good way for Tomcat to interact with another Java application running on the local machine

I'm new to using Java within a web environment. At the moment I have a Java application that we run on a local machine, we'll call it the server app. We want to add the ability to communicate with ...
1
vote
1answer
1k views

DTO and JPA Version

I have DB tables representing Employees and Departments. The server side(JavaEE) contains JPA entities representing the same. The client is a standalone client and communicates with the server using ...
3
votes
3answers
11k views

Best way to consume REST service within Servlet on same server?

I'm builiding a web app and I'm implementing a RESTful API to expose the server to all sort of clients. On the web client I want to have both server rendering and client rendering. The majority of ...
1
vote
2answers
96 views

Module based project vs Normal project [closed]

I am writing code on top an established Enterprise application. I see that the application has 4 modules as shown below. -Srk -SrkEJB -SrkUtils -SrkWeb I have gone through the code and I see that ...
2
votes
0answers
181 views

Embedded tomcat cold deployment without service disruption

I have the following scenario. For various reasons I chose to use embedded tomcat for my rest backend that will form a cluster of AWS machines. I will want to deploy fairly frequently updates ...
0
votes
0answers
198 views

Microservices - remove unnecessary boilerplate? [duplicate]

My thoughts: microservices are becoming popular for distributed architecture java is (for now) a main course in enterprise applications JEE stack too How to reduce a boilerplate (including Maven ...