Stream

 
 
#CDI 1.2 is released. All the info and link to spec and RI (Weld 2.2) on our site.
3
1
Maxime Gréau's profile photo
Add a comment...
 
Hi Guys,

I am trying to call stored procedure (have sys_refcursor as OUT param)  from JPA 2.1 using StoredProcedureQuery  .

Below is my code snippet. Getting  below exception.

"java.lang.UnsupportedOperationException: org.hibernate.dialect.Oracle10gDialect does not support resultsets via stored procedures"

Oracle Stored procedure :

create or replace procedure sp_student_merge (as_error_msg out sys_refcursor, an_stud_new_id in varchar2, an_stud_merge_id in varchar2, )

Java JPA 2.1 Code:

StoredProcedureQuery sp = JPA.em().createStoredProcedureQuery("sp_student_merge");
sp.registerStoredProcedureParameter("an_stud_new_id", String.class, ParameterMode.IN);
 sp.registerStoredProcedureParameter("an_stud_merge_id", String.class, ParameterMode.IN);
sp.registerStoredProcedureParameter("as_error_msg", void.class, ParameterMode.REF_CURSOR);

List errorMasgs1 = storedProcedure.getResultList();

persistence.xml:  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

Am I missing anything ?
1
Gianluca Tessarolo's profile photo
 
Source of the stored procedure could help...

Maybe you are returning a cursor instead of a select, see: http://stackoverflow.com/questions/8681027/get-result-via-postgresql-procedure-using-hibernate
Add a comment...
 
Svn or git. What is the best way for developing an enterprise app with 5 developers also using jenkins?
1
Alex Lewis's profile photo
 
Personally, having used both extensively, I'd recommend Git. There's nothing stopping you from using Git in an SVN-like manner to begin with if that's what you're more comfortable with until you gain confidence with Git. If you're already comfortable with Git, then just use it. For me Git has been invaluable for working on my own, part of a team, opensource, etc. When I do have to go back to SVN, on those rare occasions, it highlights just how much I've come to enjoy using Git. HTH.
Add a comment...
 
 
Great news for #CDI users. Apache #DeltaSpike 0.6 is out today. Congrats to the team. Lot of fix and new features :
3
3
Anil Saldhana's profile photoMark Struberg's profile photo
Add a comment...
 
 
My vision of CDI 2  #CDI2  
2
1
John D. Ament's profile photo
Add a comment...
 
Hi
How can send email after register for users ?

1
Gianluca Tessarolo's profile photosina maleki's profile photo
4 comments
 
Thanks again
Add a comment...
 
Chance to win a free RESTful Web Service book!

To know more, please visit: http://bit.ly/1nZMqWD
1
Add a comment...
 
Many JavaEE servers face annoying pause times because of Core Java's GC. After seeing the presentation on Shenandoah at FOSDEM and the source code release announcement I've put together a summary blog post & instructions on how to build and run this new low pause GC for Hotspot.  See the following link for details:

http://www.jclarity.com/2014/02/19/shenandoah-a-new-low-pause-garbage-collection-algorithm-for-the-java-hotspot-jvm/
1
Add a comment...

About this community

Worldwide

Alex Lewis

Discussion  - 
 
Ok, so I've tried Google, I've read Blogs, articles, and posts but I've not seen a conclusive answer to my question, which is...

Is there a recommended approach to persistent application configuration?

By "Application Configuration" I mean the kind of values an Administrator would configure once they've deployed/installed the application through an administration UI. These are the kind of values that probably don't get changed very often but on certain occasions it will be necessary. 

I'd like to abstract users/admins from having to open artefacts, edit files, redeploy them, etc. The application I'm developing would provide a Web-based Administration UI, providing validation, etc. (I.e. JSF) and the config data would eventually make it through to an EJB which would manage the lifecycle/persistence of it and make it available to the other components within the application.

JPA doesn't appear to be the right approach, from what I've understood so far. I don't have collections of items like Books, Shopping Carts, etc. possibly just a single "Configuration" class which has a small number of members/values. Apart from JPA I haven't found a standard way of storing the data. 

Does anyone have any suggestions? Is JPA actually the right way to go about this? Is my design approach wrong and there is a JEE way of doing this? Any help would be greatly appreciated. 

Cheers,
Alex
1
Alex Lewis's profile photoPhilip Durbin's profile photo
2 comments
 
Thanks +Philip Durbin, I might go down that route so I can get the rest of my application written. Either that, or I guess I might use JPA so I can continue writing the admin ui front end. Cheers for your help!
Add a comment...

David Poole

Discussion  - 
 
What does everyone use for profiling their Java EE applications?

Looking for heavy methods, high memory usage, slow methods etc?

VisualVM or other?
1
Add a comment...

Pietro Chico

Discussion  - 
 
How am I supposed to use Oracle's Java's API's offline? Just downloaded a .zip file, but there are too many folders in there and it's a really mess :/
Is there an application that could help me organize all the directories and use them easily?

Thanks in advance :)
1
Add a comment...
 
Clearvision-CM are seeking an experienced Senior Java Developer to join their dynamic in-house development team in Hampshire, UK.

Several big projects in the pipeline including ongoing development of their flag ship solution, Spectrum. 

Find out more info and apply at the link below. No agencies please. 

http://goo.gl/XuY9eo
We are looking for a Senior Java Developer to join our dynamic and innovative products team based in Hampshire. Learn more about the role here.
1
Add a comment...
 
Hi I have an enterprise application with the following EE modules:

- Ejb module
- War module

My main goal is to distribute the ejb binary module (jar) and the war binary module (war) to some foreign developers so that they can extend the session/entity/managed/converter beans using inheritance, is it possible ?

If yes what is the correct configuration ?

Many thanks in advance...
1
Gianluca Tessarolo's profile photoPhilip Durbin's profile photo
4 comments
 
Ok Philip, many thanks
Add a comment...

Dinesh Thakur

Discussion  - 
 
The elements() method of the Vector class is used to retrieve an enumeration of the elements that were added to the vector. A while loop is then used to cycle through and print the elements contained in the enumeration.
1
Add a comment...

Philip Durbin

Frontend Technologies  - 
 
ThoughtWorks recommends avoiding JSF

"We continue to see teams run into trouble using JSF -- JavaServer Faces -- and are recommending you avoid this technology. Teams seem to choose JSF because it is a J2EE standard without really evaluating whether the programming model suits them. We think JSF is flawed because it tries to abstract away HTML, CSS and HTTP, exactly the reverse of what modern web frameworks do. JSF, like ASP.NET webforms, attempts to create statefulness on top of the stateless protocol HTTP and ends up causing a whole host of problems involving shared server-side state. We are aware of the improvements in JSF 2.0, but think the model is fundamentally broken. We recommend teams use simple frameworks and embrace and understand web technologies including HTTP, HTML and CSS."

http://www.thoughtworks.com/radar/#/languages-and-frameworks/683 (January 2014)

via page 60 of http://www.slideshare.net/mraible/comparing-jvm-web-frameworks-february-2014 or http://static.raibledesigns.com/repository/presentations/Comparing_JVM_Web_Frameworks_February2014.pdf

via "Comparing JVM Web Frameworks" by Matt Raible - YouTube - "Comparing JVM Web Frameworks" by Matt Raible and http://www.meetup.com/virtualJUG/events/153096902/

IRC log: https://docs.google.com/document/d/1bndPsSaf1NT5o72p6txd0L2rdsZahlqyvsh9U13XQRE/edit
4
4
Viktor Schmidt's profile photoWilliam Malubag's profile photoAnna Dobrowolska's profile photoPhilip Durbin's profile photo
5 comments
 
PrimeUI to the rescue ?
Add a comment...
 
hey folks, i was fighting the whole night with the 2nd level cache using infinispan. i am using JPA 2.0 and a jboss 7.1.1. server. i added the following lines in my persistance.xml: 
 <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<properties>
    <property name="hibernate.cache.use_second_level_cache" value="true" />
    <property name="hibernate.cache.use_query_cache" value="true" />     
    <property name="hibernate.cache.infinispan.cachemanager" value="java:jboss/infinispan/hibernate"/>
  <!--    <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.JndiInfinispanRegionFactory"/>   -->     
<property name="hibernate.show_sql" value="true"/>

The Problem ist that i was not able to cache entities or querys. every time i was looking on my jboss i can see the sql's are send to the database. i used the cacheable annotation but no chance. i also tried to use the querycache using qery.sethint but no chance. can anybody help me?
1
stefan kahr's profile photo
 
I solved the problem. You have to put a @cacheable in every entity where you want to use the querycache. So this annotation is not only to cache entities also query results. 
Add a comment...
 
Hi,

I've successfully tried out SSO using Jasig CAS Server with JEE6 applications, the CAS server uses an LDAP (Windows Active Directory) and SSO works well, but...

I want to avoid that the user, that has already logged into windows domain, enters the credentials again into CAS Server login page...

Seems that this is possible using SPNEGO Jasig configuration, what I can't understand is if I MUST have a Kerberos server, the documentation says that a Linux Kerberos server must be used, but in this scenario I've only windows server...

My question is: does anyone tried to configure a SSO on Jasig CAS Server using SPNEGO without a Linux Kerberos server ?

If yes is there any suggestion on configuration on how to configure the SPNEGO module ?

Many thanks in advance...
1
Gianluca Tessarolo's profile photoPhilip Durbin's profile photo
2 comments
 
Hi Philip, I want that a customer already logged into a windows domain when he runs browser he must be automatically logged into my web app, without doing a new login...
Add a comment...