Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
78thAirhacksQ&A.md

Ask questions and see you at September, 7th, 8.PM. CET: https://vimeo.com/event/154379

Also checkout recent episode:

77 airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@masumcse1

This comment has been minimized.

Copy link

@masumcse1 masumcse1 commented Aug 15, 2020

commercial architectural framework

https://www.accenture.com/_acnmedia/pdf-19/accenture-afp-java-lrweb-april-2015.pdf

Q1 :
This is java base commercial architectural framework. I think this framework is very helpful
for large scale application development.

This architectural framework is Spring framework based. I have passion for Java EE.
So, i am searching this type of architectural framework based on java ee. but i can't find out.

Can you please give me some list framework , which was same as Accenture Foundation Platform for Java.

Q2: what is merits and demerits of commercial architectural framework like : Accenture Foundation Platform for Java ?

@alibttb

This comment has been minimized.

Copy link

@alibttb alibttb commented Aug 19, 2020

Hello Adam,

I have multiple questions, I hope this diversity of topics is acceptable:

  1. I see you use mac for your work, I tried to do the same just to back my old trusted windows environment, how do you setup development environment on mac?

  2. I do a lot of JSF development, I always use primefaces for GUI, on my mac I was shocked that <p:inputNumber> would not accept Hindi digits (used in Arabic-PC keyboard) as numbers, I don't know how does it work on pc, but it didn't work on mac (Arabic digits 1,2,3,4... vs Hindi Digits starting with \u0660 ٠,١,٢,٣,٤,٥,٧... )
    how does this work, we should be able to input numeric values with any digit system?

  3. JPA vs JDBC when to use each one? how does it go if we use both in the same project? how does plain SQL affect JPA cached entities?

JPA is great most of the time, but lately I was tasked with integrating with a legacy system (read only I don’t update any thing in that system) where I couldn’t map every result to an entity class, what do you consider the best approach here to be:
A- creating views and mapping them as entities (might not always be easy or allowed)
B- using native queries on top of entities
C- plain and simple JDBC with datasource resource injection and DTOs?
do you suggest another approach?

  1. In the latest 77th AirHacks.tv you mentioned that a database that is used by multiple apps is the legacy way and it doesn't apply for newer apps: https://youtu.be/nXT08jENPGQ?t=1284
    I agree with you, but if you can compare the the two paradigms, I think I can learn something from the way you discuss this.

Thank you very much!!

@dwamara

This comment has been minimized.

Copy link

@dwamara dwamara commented Aug 21, 2020

Hi Adam,
I have a question regarding Metrics of an application. One thing that I kept from one of your episode is that one thing that you spoke about was getting the metrics of the business methods (may be I didn't paraphrased it correctly).
Say you have a frontend service using the Microprofile Rest Client that calls another service doing the logic, from where will you get the metrics: from the calling method of the frontend or from the called method of the other service?
It's particularly for the @counted and @timed annotations, although the @timed will more be for the performance of the method.

Kind regards,
Daniel

@enji7

This comment has been minimized.

Copy link

@enji7 enji7 commented Sep 2, 2020

Hi,

not a question, but an info: Our company has published a small support library (open source) for speeding up REST development based on Java EE / MicroProfile REST Client - might be interesting for you as well:

https://github.com/svc-ehealth/jareto

Cheers,
Nenad

@dwamara

This comment has been minimized.

Copy link

@dwamara dwamara commented Sep 2, 2020

Hi,

not a question, but an info: Our company has published a small support library (open source) for speeding up REST development based on Java EE / MicroProfile REST Client - might be interesting for you as well:

https://github.com/svc-ehealth/jareto

Cheers,
Nenad

Hi Nenad,
I just had a quick look at the readme and I must say that I don't really see the gain on using it over say a plain MP. Maybe you could made a post somewhere or code something and put it on github to show the benefits.

Kind regards,
Daniel

@t-shaguy

This comment has been minimized.

Copy link

@t-shaguy t-shaguy commented Sep 4, 2020

Hi Adam,

Sure you are safe and great.

Please, what tech/tool stack is best for an e-document management system implementation? Of particular interest are the following;

  1. Document /file storage.

  2. Security.

  3. Document indexing.

  4. Document search (simple/ advanced).

  5. Document Access controls.

  6. Document compression

  7. How is ORM ( foreign keys) handled in hibernate panache

Thank you and looking forward.

@thehpi

This comment has been minimized.

Copy link

@thehpi thehpi commented Sep 4, 2020

How can I test the defined @RolesAllowed on rest resources using a predefined JASPIC login module.
Can I eg use embedded payara or arquillian and inject a JASPIC login module somehow which will provide the roles/groups?

@enji7

This comment has been minimized.

Copy link

@enji7 enji7 commented Sep 5, 2020

Hi,
not a question, but an info: Our company has published a small support library (open source) for speeding up REST development based on Java EE / MicroProfile REST Client - might be interesting for you as well:
https://github.com/svc-ehealth/jareto
Cheers,
Nenad

Hi Nenad,
I just had a quick look at the readme and I must say that I don't really see the gain on using it over say a plain MP. Maybe you could made a post somewhere or code something and put it on github to show the benefits.

Kind regards,
Daniel

Hi Daniel,

we found ourselves implementing the same standard code over and over again for every new REST service / client. Examples for using the library can be found in the accompanying "jareto-demo" project.

For instance, we can now simply throw Jareto's generic "AppException" or "AppRuntimeException" on the server-side, and catch it on the client-side (just as if it was a plain, local Java invocation). The exception mappers for server and client are part of Jareto, so we don't have to re-implement them for every new REST service.

Regards,
Nenad

@thehpi

This comment has been minimized.

Copy link

@thehpi thehpi commented Sep 7, 2020

Sometimes you develop in http mode as no real certificate is available but in production typically you use https.
So sometimes I need a secure cookie and sometimes not.I know I can use

<session-config> <cookie-config> <secure>true</secure> </cookie-config> </session-config>

in web.xml but is there a way to make this configurable?
Is there a programmatic way?
Or is it possible to set a JNDI parameter that can be used?

@thehpi

This comment has been minimized.

Copy link

@thehpi thehpi commented Sep 7, 2020

Payara (Grizzly) does not allow a backslash in a url. So a rest call with an {id} which contains a backslash never reaches the rest endpoint.
What is sent in the request is something that was returned earlier from another endpoint. I can add interceptors that will replace the (outgoing) backslash with something else and when it comes back in replace it back to the original value.

Is there a better way?

@FlorinAlexandru

This comment has been minimized.

Copy link

@FlorinAlexandru FlorinAlexandru commented Sep 7, 2020

Hello Adam,

I have a class MyDao with an injected DataSource member: @Inject @Postgres private DataSource dataSource;. I have the @Postgres qualifier defined. To inject I'm using a producer method:

public class PostgresDataSourceProducer {
    @Resource(mappedName = "java:jboss/PostgresDS")
    private DataSource ds;

    @Produces
    @Postgres
    DataSource postgresDataSouce() {
        return ds;
    }
}

I want to do some integration tests for MyDao class. For this I need to change the datasource to point to my test database. How to do that?

Thank you,
Florin

@thehpi

This comment has been minimized.

Copy link

@thehpi thehpi commented Sep 7, 2020

How would you handle concurrency if you create an MBean which has concurrently updated maps which of course are also read through JMX? @stateless would do it I guess but that feels like overkill. ConcurrentHashMaps? But what if the MBean also does small calculations?

@deratzmann

This comment has been minimized.

Copy link

@deratzmann deratzmann commented Sep 7, 2020

Hi Adam.

In one of the last episodes you mentioned, that replacing EJBs in quarkus Projects with CDI could be quite simple.

I created 2 Annotation Types.

For replacing @Stateless I would do sth. like this:

@Asynchronous
@Bulkhead
@RequestScoped
@Transactional
@Stereotype
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface StatelessBoundary {
    
}

For @Singleton I created this:

@Bulkhead(value = 1, waitingTaskQueue = 10)
@Singleton
@Transactional
@Stereotype
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface SingletonBoundary {
    
}

Is this a good way to replace my good old Stateless and Singleton Beans especially when using Bean Pooling (Stateless) and Single-Running-Process-at-one-time (Singleton)? Would you add sth other?

Best regards from Hamburg.

Bastian

@tmsanchez

This comment has been minimized.

Copy link

@tmsanchez tmsanchez commented Sep 7, 2020

HI Adam,
what's your opinion about recent changes announced for MDN? https://hacks.mozilla.org/2020/08/an-update-on-mdn-web-docs/

@t-shaguy

This comment has been minimized.

Copy link

@t-shaguy t-shaguy commented Sep 7, 2020

How is ORM ( foreign keys) handled in hibernate panache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment