Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active April 11, 2016 15:31
Show Gist options
  • Save AdamBien/9a8ad5beec52199f1d13 to your computer and use it in GitHub Desktop.
Save AdamBien/9a8ad5beec52199f1d13 to your computer and use it in GitHub Desktop.
25thAirhacksQ&A.md

Ask questions and see you at 11th April at 6.PM. CET: http://www.ustream.tv/channel/adambien Also see archives: airhacks.tv

  1. Java EE 8 News
  2. 2 years of airhacks.tv celebration (now really 2 years)
  3. Do you think NetBeans is still a good IDE for JEE, Java, HTML, SPA, etc, development in 2016? I'm currently faced with a number of developers who seem to love IntelliJ, but I'd love a free alternative for some of our projects. We're currently using Eclipse (and STS), but that platform doesn't agree with me which is why I'm considering NetBeans. I know I should just make up my own mind about this, but I appreciate your work a lot and would love to hear your opinion.
  4. How to access the "other side" with afterburner.fx?:
@Service
public class Receiver {
    private long counter = 0;
    
    @PostConstruct
    public void init() {
        System.out.println("Receiver.init()");
    }
 
    @RabbitListener(queues = "hello")
    public void receiveMessage(Message message) {
     String s = new String(message.getBody());
//     msgRepository.save(new Msg(null, s));
     
        Platform.runLater(() -> {
         counter++;
         System.out.println("Received <" + s + ">" + counter);
         //I want to print this log to JavaFx Label
        });
    }
}
@gbourant
Copy link

gbourant commented Apr 3, 2016

Hey Adam,

  • Security
    I'm moving a PHP spaggeti Project into a JavaEE one, exposing REST Services.
    To secure the API i'm using Keycloak.
    Could you recommend me any other parts where i have to shield the App (except the exposed API)?
  • I had a class like the following
@Stateless
public class A {
@Inject
Clazz C;
}

after i implemented it with this way and Injection stopped working , to make it work i used @Local instead of @stateless , why it didn't work?

@Local
public class A implements B{
@Inject
Clazz C;
}
  • I want to share common fields and beheivor at all entities , how to achive something like the following ? (JPA doesn't save the extened fields).If possible the extended fields to be on the same table.
@Entity
public class A extends EntityLogger {
 @Id
 @GeneratedValue
 private Long ID;
 private String Name;
}

public class EntityLogger {

    @Temporal(TemporalType.TIMESTAMP)
    Date created;

    @Temporal(TemporalType.TIMESTAMP)
    Date updated;

    @PrePersist
    public void created() {
        created = new Date();
    }

    @PreUpdate
    public void updated() {
        updated = new Date();
    }
}

Thanks.

@masumcse1
Copy link

I have need a sample project that are build on java ee 7 with following criteria
JSF2.2 + Rest + Service (EJB/cdi) + JPA + any db

*** crud JSF2.2 with Rest client

@masumcse1
Copy link

i want to learn SAML with JAVA EE and implement my personal project .
SAML with java ee
please give me a idea how to do this one ?

@acll19
Copy link

acll19 commented Apr 7, 2016

When I face a new project, can I think of it in a microservice architecture way from the beginning, or it is just for "refactoring" a monolithic application?

@Chilis92
Copy link

Hi Adam,

I'm using JMS and i have one web application that works as a producer and I have another web application (Consumer) with an MDB, my MDB is implementing MessageListener interface so I'm getting the messages in the console properly. The problem is that I'm not able to send those messages to my JSF page. I tried to create an stateless EJB to get the messages and then send them to the JSF page but it does't work. So do you know if there is a way to call like a JSF back bean from MDB to display message on the view?

Thanks

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