Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [java]

Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.

6
votes
0answers
649 views

Design thoughts on a schema based request object for CXF endpoint

Trying to seek design suggestion on a schema based request object for a CXF endpoint. I've created a CXF SOAP endpoint which takes the following object as an input. The request object will have ...
5
votes
0answers
181 views

Finger Paint path gets huge over time and slows the app

So I am writing a Finger paint app. I have multiple color which user can select. I save the path and paint information inside an array. ArrayList<PaintPath> arrayPaintPath = new ArrayList<...
4
votes
0answers
2k views

Java 8 time - LocalDateTime vs LocalDate and truncatedTo limitation handling

I am new to the Java 8 time package, and am trying to better understand it and make sure that I am making good use of it. Is there a specific reason that LocalDateTime's truncatedTo(TemporalUnit) ...
3
votes
0answers
91 views

Ripple Effect Analysis using coupling metrics

How can I observe ripple effect using coupling attributes alone? I first find the common coupling metrics for a set of deprecated classes in a project, like CBO(Coupling Between Objects), RFC(...
3
votes
0answers
334 views

FRP-style GUIs in Java

I recently built a small web application using riotjs, a library that facilitates creating UIs in the spirit of functional reactive programming, i.e. defining the UI as a pure function of the ...
3
votes
0answers
217 views

Should I be concerned with dependencies?

Our organization uses IBM ClearCase to manage its versioning controls (for better or worse). We've been working on our application for several years now, and a large number of activities have started ...
3
votes
0answers
736 views

Allowing users to add their own custom fields in a Spring MVC Hibernate application - What's an ideal approach?

We all may have seen applications like JIRA, or many CRM or other applications that allow its users to define their own custom fields to an entity, and do a variety of stuff with it, like making them ...
3
votes
0answers
645 views

Should I annotate all the entry points in my library?

In a library project, I see numerous warnings suggesting that I reduce the visibility of public classes and methods. (Or in the case of methods I haven't written tests for, warnings about them being ...
3
votes
0answers
309 views

How do I design concurrent scalable system with guaranteed ordering? How about Akka?

I have designed a simple PoC system that processes a feed of prices that tick. It consumes a stream of "Ticker, Price" objects off JMS and updates a map, so that the map simply contains the latest ...
3
votes
0answers
1k views

How to pass control between sub-controller to parent controller in Java MVC Design Pattern?

I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
3
votes
0answers
199 views

Incorporating custom Algorithm in SOLR-LUCENE , before Indexing?

CURRENT FLOW: I am using a custom algorithm(presently in php) to rank the MYSQL records before INDEXING it to SOLR . WHAT I WANT : Is it possible implementing this ALGORITHM(may be in JAVA) inside ...
3
votes
0answers
377 views

How to deal with runtime changes to tenant-location in a clustered, multitenant web application with app-managed datasources?

I have a Java web application that supports multi-tenancy to keep customer data separate. Connection pools to each customer database are created at runtime. The details of each customer shard (...
2
votes
0answers
51 views

What is the best way to handle glue between different classicly OOP objects at the higher levels of abstraction?

In object oriented programming, it is commonly said that each class/object/instance should have a well-defined purpose. For example, there may be a Window class in a windowing toolkit, a ChunkLoader ...
2
votes
0answers
47 views

java hashtable extending to support duplicates

I have to maintain an old application and have to extend some modules. There is an hashtable that is used for maintaining/holding some objects as representation of running (real) processes (don't see ...
2
votes
0answers
127 views

Is this an example of cyclic dependency?

I'm an undergraduate student and I have this assignment on a Discrete Event simulator. Currently I have completed to the end of v1.2 here. Attached also, is an algorithmic overview. I have wrote my ...
2
votes
0answers
157 views

How to handle a large number of optional parameters

I am currently developing on a small library allowing to read and write Java .properties files while retaining all the formatting (comments, whitespace, etc.): https://github.com/hupfdule/apron This ...
2
votes
0answers
46 views

Where to specify drag-and-drop related meta data?

The structure of our project strongly separates the three different parts: core - data classes, POJOs, sometimes aggregated with annotations (e.g. for XML/JSON serialization) plugin - plugin for a ...
2
votes
0answers
629 views

How to deal with large data in Websocket message?

I wrote a websocket server in Spring Boot and a client in Javascript. These work fine. I also wrote a second client in Java. When this one attempts to handle a frame after connecting to the host, I ...
2
votes
0answers
80 views

Chronicle Queue: how to make a stack and how to limit disk usage

My server and several clients are different JVMs running on the same machine, they need to share persisted time series data: server reads a time series from somewhere, writes to a persisted embedded ...
2
votes
0answers
669 views

How to avoid DTO on a client/server application?

I would like to use DRY beans on my client-server application (DRY: Dont Repeat Yourself). It is not a problem to me if it is highly coupled: I know that my DTO will have the same form as the ...
2
votes
0answers
208 views

Designing clickstream analysis?

I have a application where user purchases/click the certain products. I need to design the click stream analysis here which product got clicked how many number of time, user/geographical detail click ...
2
votes
0answers
562 views

Long lived connections

I have a custom non-blocking I/O server that supports (among other things) HTTP and websockets. I have two timeout concepts for connections: idle: connections that don't do anything are closed after ...
2
votes
0answers
319 views

Examples for “serverless” Java service for AWS Lambda

Doesn anybody have practical experience with implementing a (micro)service based on AWS Lambda? My team is currently working on an MVP. We started with a monolith and that has worked very well. It's ...
2
votes
0answers
69 views

Pattern for retrieving batches of Objects?

This seems to be a recurring requirement for me, so I'd like to get some feedback on how to implement it and what sort of test code makes sense. I need to retrieve batches of data and stitch it ...
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 ...
2
votes
0answers
34 views

Approach for querying an arbitrary set of user submitted fields and values in Spring application? Like a shopping site sidebar search?

I am working on a Spring Boot and Angular application which has a requirement to search based on any number of the available filters being applied to a list. For example, a user searches on 'Title' ...
2
votes
0answers
196 views

CQRS “private” command

In CQRS, if a saga (or more precisely a process manager according to the CQRS Journey book) sends out a new command to change aggregates how can I ensure that this command is not possible to send from ...
2
votes
0answers
584 views

Creating a better mouse dragger function

I originally posted this to code review, not knowing incomplete code was off-topic and was pointed to post here. I don't believe this question is a good fit for stack overflow because the code I ...
2
votes
0answers
923 views

Architecture design for Java servlet that triggers work (for sending push notifications)

I'm designing a push notification server (for pushing notification via APNS and Google servers) and have come up with the following design for a Java based web application server. I would really like ...
2
votes
0answers
176 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 ...
2
votes
0answers
516 views

Optimal data structure for binary data/Java

I have several input formats mostly restricted to geotiff and some proprietary binary formats. I import them into my program and then need to export them into various other data formats (also binary) ...
2
votes
0answers
383 views

vert.x message bus architecture

A large part of the vert.x architecture is around the message bus, and message passing between verticals. The main idea I guess being that I can create multiple modules (possibly in multiple languages)...
2
votes
0answers
493 views

Do thin fluent builder method chains have any need to be “extensible”?

In an environment where refactoring is difficult extensibility can be a life saver. However, this is no excuse to over engineer code. Given that a thin fluent builder method chain is backed by well ...
2
votes
0answers
2k views

Spring bean injection into a hibernate validator constraint

I have a controller method like listed below whose argument is annotated with @Valid to validate PasswordChange object using a Hibernate validator @Constraint. Both PasswordChange and a sample ...
2
votes
0answers
445 views

Benefits of EJBs over POJOs for Jersey JAX-RS Resources

I'm writing a Jersey 1.9 JAX-RS application. I have to use 1.9 because it's the only supported version. I'm trying to decide if there is any benefit to using EJBs as my Jersey Resources, rather than ...
1
vote
0answers
41 views

Third-party API wrapper in Java: how to design

Suppose, there's a site that provides an API, such as this: Users post questions, answers on that site You can make GET and POST calls There are two types of authentication: weak (only gives read ...
1
vote
0answers
46 views

How to solve circular dependency scenario while executing http calls which require authentication?

I am working on a project which requires me to execute standard HTTP calls with session tokens. I am building a custom HTTP client, with a custom authenticator, something like this: Client client = ...
1
vote
0answers
21 views

Performance impact of JPARepository save() on a large database table with index

We have a few tables with a large amount of data and with indexes on those tables to help in faster retrieval. We are also using Spring Data JPA JpaRepository for adding data to those tables using the ...
1
vote
0answers
25 views

Periodically update files from s3 in a Java maven library used as Packaged JAR

I have an application say x which uses another Java library(say Y) as a JAR file . So y basically needs to download a file and load it into memory before any of it's methods are called at runtime by X....
1
vote
0answers
155 views

How to simplify design and remove duplication in java layered architecture?

I've the following project structure (simplified): domain dto view In domain model is kept. dto classes are used to pass data from domain to view. And in view I've a controller and a handful of *req,...
1
vote
0answers
47 views

separate table for one of the type or java enum?

I want to make budget tracking web-app, tracking all savings and expenses with corresponding dates. Later generating reports, summaries etc.. I came up this design Frequency Table - does it have to ...
1
vote
0answers
70 views

Hierarchy of models while designing a client for a RESTful service

I am trying to write a client for a restful service. I am confused in designing the models. Below are the details: I have a Model named UnicastMessageRequest, it's definition is like this: ...
1
vote
0answers
29 views

Identify specific methods and their parameters in source code

I have two source code files (one in java and the other in python). Certain methods in the java file have references to the python file using the PythonInterpreter, e.g. execfile("hello.py"); or it'...
1
vote
0answers
47 views

Java dashboard for machine data

I am currently working on a project for a production facility. The machines in the production are saving so called 'Telemetry Data', measurements like water pressure, plastic volume or temperature ...
1
vote
0answers
27 views

What are some design ideas for a data mapping and transformation application?

Here is a high level outline of the project: We frequently need to convert data from a new incoming system to our in house system (sort of a basic ETL process) We would prefer to do this dynamically, ...
1
vote
0answers
52 views

Should I implement a JAX-RS ExceptionMapper for java.lang.Error?

I have a Jersey server that handles REST requests where I've implemented a RuntimeExceptionsMapper implements ExceptionMapper<RuntimeException>. If there's an unexpected exception, it handles it ...
1
vote
0answers
156 views

MVC - How should components inside controller communicate?

I'm developing a level editor in Java. I'm designing its code in MVC. From what I've learned: controllers can have a direct reference (fields) to views and models. Views can have direct reference to ...
1
vote
0answers
46 views

Seeking Tips on PAAS Architecture

I've developed a java web app using Vaadin, and using Jelastic/MassiveGrid as the PAAS. However, I need advice on proper architecture for my needs. Desired Outcome: Users land on my homepage where ...
1
vote
0answers
284 views

How to make rest api end points in swagger UI pre authenticated in Spring BOOT

I have written a spring boot rest API application with OAuth.I have integrated swagger UI for API documentation. I want the API endpoints on swagger UI to be accessible without an access token. Please ...
1
vote
0answers
112 views

Why is java's Object toString method defined as it is?

In the Java API specification for the Object class for the toString method, there is the line "It is recommended that all subclasses override this method." While I don't have a better idea for what ...