Questions tagged [java-ee]

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

Filter by
Sorted by
Tagged with
-1 votes
2 answers
74 views

Java: Autogenerating documentation for Strategy Pattern with lambdas

Situation Object MyObject needs to be sent to one of our downstream systems depending on the enum value of its field myField. public class MyObject { private MyEnum myField; public MyEnum ...
downwash's user avatar
1 vote
1 answer
74 views

How to represent CDI interceptors in class diagram?

I have the following classes: public class MyCaller{ @Inject private MyService service; private void callerMethod(int arg1, String arg2){ service.serviceMethod(arg1, arg2); } }...
cidra's user avatar
  • 321
0 votes
1 answer
306 views

Should i specify that my methods "throws ConstraintViolationException" if the exception is actually thrown by a CDI interceptor?

Here is a sample method: @ApplicationScoped public class MyClass{ public void getUser(@Min(1) int id){ //get User logic } } I'm in a CDI environment with @ValidateOnExecution(type = ...
cidra's user avatar
  • 321
2 votes
3 answers
254 views

Pattern for syncing databases with undo option

I work on a large and old application consisting of a server and a fat client. Part of what the application does is handle a large-ish (a few 100MBs) database of frequently changing data (~a dozen ...
Johannes Hahn's user avatar
-1 votes
1 answer
38 views

Opinions on using standardized J2EE APIs over specific over vendor APIs

I have always advocated the use of standardized api, and currently use it on my code. However i always get very strong resistance when it comes to code review, even on projects i have designed and ...
user3414321's user avatar
2 votes
1 answer
99 views

Which is the better architecture to follow for API Development in Java using any RDBMS database backend?

This question is regarding the better architecture to follow for API Development in Java using any RDBMS database backend. Currently, we are using the below approach to fetch data from database and ...
Nithin's user avatar
  • 129
-1 votes
1 answer
574 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 ...
gordonprog's user avatar
1 vote
7 answers
619 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 ...
henhen's user avatar
  • 149
0 votes
1 answer
91 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) ...
a e s t h e t i c's user avatar
0 votes
0 answers
20 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 ...
Aditya Ajmera's user avatar
1 vote
3 answers
579 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 ...
Mr.Q's user avatar
  • 121
0 votes
1 answer
294 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 ...
alfredopacino's user avatar
0 votes
1 answer
4k 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....
isuru-buddhika's user avatar
-1 votes
1 answer
69 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?
Hossein's user avatar
  • 27
-2 votes
1 answer
631 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, ...
Theodore's user avatar
1 vote
1 answer
81 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: ...
Kishor Prakash's user avatar
1 vote
1 answer
422 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 = ...
Prateek Jain's user avatar
0 votes
1 answer
799 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 ...
Miha Jamsek's user avatar
1 vote
1 answer
64 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 ...
mohsenJsh's user avatar
  • 1,267
1 vote
0 answers
69 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 ...
anothernode's user avatar
0 votes
2 answers
122 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 ...
user1787812's user avatar
5 votes
0 answers
2k 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) ...
Jignesh M. Khatri's user avatar
1 vote
0 answers
372 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 ...
bish's user avatar
  • 173
0 votes
2 answers
931 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 ...
Mariano L's user avatar
  • 111
1 vote
0 answers
115 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 ...
DWoldrich's user avatar
  • 119
0 votes
0 answers
142 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 ...
Escape Velocity's user avatar
-1 votes
2 answers
1k 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 ...
rand0rn's user avatar
  • 189
2 votes
1 answer
999 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 ...
mikee's user avatar
  • 121
5 votes
3 answers
1k 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, ...
Cesar Miguel's user avatar
-4 votes
2 answers
4k 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 ...
Wasantha Yapa's user avatar
5 votes
1 answer
253 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 ...
ucas's user avatar
  • 151
2 votes
1 answer
219 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 ...
AFP_555's user avatar
  • 349
0 votes
1 answer
80 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 ...
John Steed's user avatar
3 votes
0 answers
102 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 ...
GameDroids's user avatar
1 vote
1 answer
3k 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 ...
John Donn's user avatar
  • 424
1 vote
2 answers
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 ...
Aditya Cherla's user avatar
5 votes
2 answers
276 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 ...
qecce's user avatar
  • 51
0 votes
1 answer
131 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 ...
Ced's user avatar
  • 315
1 vote
1 answer
1k 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 ...
Shraddha's user avatar
3 votes
1 answer
2k 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. ...
Pavel Pscheidl's user avatar
0 votes
1 answer
76 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 ...
Jorge Iten Jr's user avatar
3 votes
1 answer
250 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 ...
user1065145's user avatar
7 votes
1 answer
9k 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 ...
XMight's user avatar
  • 185
9 votes
3 answers
31k 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 ...
Rick's user avatar
  • 203
4 votes
1 answer
8k 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 ...
Olivier Grégoire's user avatar
1 vote
2 answers
297 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 ...
JSBach's user avatar
  • 1,375
77 votes
4 answers
53k 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 ...
Eric B.'s user avatar
  • 1,239
0 votes
1 answer
216 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 ...
Slytael's user avatar
  • 291
7 votes
2 answers
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 ...
xaph's user avatar
  • 187
1 vote
2 answers
3k 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 ...
Mr. Nivlac's user avatar