All Questions
88
questions
2
votes
3answers
108 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 ...
-1
votes
1answer
36 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 ...
2
votes
1answer
78 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 ...
1
vote
7answers
397 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
62 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) ...
1
vote
1answer
318 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 = ...
1
vote
1answer
60 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
63 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
101 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 ...
1
vote
0answers
298 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
763 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 ...
0
votes
0answers
126 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 ...
2
votes
1answer
872 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 ...
2
votes
1answer
140 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
77 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 ...
3
votes
0answers
101 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
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
189 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
128 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
966 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
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. ...
3
votes
1answer
242 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 ...
6
votes
1answer
8k 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 ...
6
votes
3answers
23k 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 ...
4
votes
1answer
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 ...
74
votes
4answers
49k 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
190 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 ...
7
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
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 ...
3
votes
0answers
185 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 ...
1
vote
1answer
753 views
How can I find what Resources a Java EE container provides?
How can I find what "Resources" a Java EE container provides? Can I discover this programmatically, or is there documentation I should refer to? (Note that the Java EE tutorial is vague on this ...
1
vote
0answers
334 views
handling external events in a cluster environment
I have an app written with JSF and Spring using JPA+Hibernate which is running on a Glassfish4 server.
Right now I have an Observer pattern which is listening for some Postgresql events. Let`s say ...
1
vote
0answers
284 views
How is ORB distinct from an endpoint?
What, fundamentally, am I misunderstanding about how to use appclient?
The Application Client Container (ACC) includes a set of Java classes,
libraries, and other files that are required for and ...
2
votes
1answer
401 views
Use of validators for simple validations
I've been working in Liferay code, and I've come across this construct a few times:
List<?> list;
...
if (Validator.isNotNull(list)) {
//do stuff
}}
The source code for Validator.java ...
3
votes
1answer
256 views
Best practices for programmatic describing of behavior of complex input forms
We have a complex web form (we use GWT/GXT stack) with lots of input elements of different types (text fields, selects, checkboxes, buttons), and behavior of these elements depends on each other.
Now ...
2
votes
1answer
195 views
Java App as Tomcat Service?
I currently have a basic j2ee website. Currently, a jsp frontend gets data from the backend (the java program, lets call it object "Score"). The backend gets this data from a web site.
<% Main m =...
3
votes
1answer
890 views
Debugging xml and annotations
By now, most web containers have an annotation variant of their xml configurations for Java EE. I'm guessing this is because it's better to keep things in Java where they can be managed, coded with ...
0
votes
1answer
985 views
Spring web application deployment infrastructure
I'm interested in hearing out what's out there in terms of tips and tricks on deploying and maintaining a Java web application whilst keeping agile. I'm running solo on a startup project I'd like to ...
3
votes
3answers
1k views
Could the creation of many methods in Java affect performance? [closed]
I was told by a colleague that in Java, the performance may be worse if we create more methods, stacking many methods calling over them in JVM, specially in a Java EE environment.
This seems to ...
0
votes
3answers
3k views
Why do APIs generally consist of interfaces? [duplicate]
I am starting out in Java API design and in reading existing code bases, I have found that most APIs consist of interfaces only with their implementations bundled in a different package.
Having read ...
4
votes
3answers
488 views
If I unite many web apps into one, will I save resources?
I'm comparing 2 different approaches of J2EE application architecture:
Divide independent parts as modules of one big web app.
Divide independent parts as different web apps running on same server.
...
1
vote
1answer
547 views
Implementing an interface from a framework vs simple java interface
This concept is unclear with me.
I have worked on several frameworks for an instance Spring. To implement a feature we always implement some interfaces provided by the framework.
For an instance if ...
2
votes
3answers
1k views
J2EE - Session swap
Application server - JBoss AS 7.1.1
JDK6
J2EE 1.3
My web application is more than 10 years old and facing this session swap problem in my portal. Noticed
that swap happens mostly when many ...
18
votes
5answers
72k views
Java web application folder structure
As a beginner to J2EE, I have recently started developing my own project from scratch using the Core of J2EE : Servlets & Jsps.
I could not evaluate whether my project folder structure is right ...
1
vote
1answer
956 views
Applying DDD principles in a RESTish web service
I am developing an RESTish web service. I think I got the idea of the difference between aggregation and composition. Aggregation does not enforce lifecycle/scope on the objects it references. ...
5
votes
1answer
1k views
Shall I separate the admin part from the rest of the war
I built a web-applicationg using struts2. Then I built a small admin interface in the same war.
With time the webapp grew and so the admin-interface. Now, I'm thinking to separate the admin interface ...
4
votes
1answer
510 views
Web app outgrowing current framework
I have quite a bit of experience with using Django for websites and so when I started a new project I naturally chose to use Django for it. Everything went well for a time but now the application is ...
0
votes
1answer
147 views
Do JAX WS implementation classes come as part of the Java 5/6 package or only as part of an application server libraries?
Do JAX WS implementation classes come as part of the Java5 package, as part of the Java6 package or only as part of an application server libraries like WAS?
I read that it comes as part of Java EE? ...
11
votes
2answers
59k views
What is the difference between Enterprise Java vs Core Java? [duplicate]
I have some experience in programming in Java but wondering if someone could explain what is the difference between Enterprise Java vs Core Java?
Someone asked me a question on whether I use core-...
4
votes
2answers
9k views
High-Load Java Server for Multiplayer
I am making a multiplayer game. Now I am trying to choose the technology to connect the android devices to the server. The clients run on Android, and the game is MMORPG. I would like to write the ...