Pranav Sharma

Ranch Hand
+ Follow
since Oct 27, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pranav Sharma

I'm looking at converting some existing applications into a more micro-service architecture framework. How does one handle transaction management in this architecture and does Spring provide anything specifically to help implementing transaction management across microservices.
6 years ago
Thank you for the responses everyone. While I understand that they are different as of Java 8 and that backward compatibility is real world practical problem. I wanted to start a conversation about how the lines between the 2 are more blurred than ever with Java 9 and how would one design a solution if we were not restrained by backward compatibility.

Kenneth thanks for clarifying that the private methods can only be accessed inside the interface.
6 years ago
And if they are not, why not just make it so and be done with it.
6 years ago
I have 2 AspectJ aspects in my application. One does our transaction management and the other weaves in a UI related function. Because the UI aspect is so broad, it really slows up my compilation in eclipse. I'm using maven to build and deploy. I was wondering if there was any way I could disable only the UI aspect from weaving during compile time.

Any help would be great. Thanks
Hi
I have a case where the primary key for an entity can be "generated and assigned" by an external system or generated by an oracle "sequence".

What is the cleanest way to achieve this in Hibernate 3.6.10.

Thanks
Hello
My current scenario first.

Following are the relationships for domain objects A, B and C

A 1---------------many B (cascade = "all" inverse="true")
A 1---------------many C (cascade = "all" inverse="true")
B 1---------------many C (cascade = "all" inverse="true")

I do the following in this order.


I get the following.

org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: foo.bar.packages.C



What am I doing wrong here ?

I'm hoping to do this with one save call, because that defines our transaction boundary call.

Please help. Thanks.
Thank you.
11 years ago
Thanks Bill.
Any suggestions to where I could read more about this. I searched through the Spring documentation, did not find info about custom handlers. Thanks.
11 years ago
Hi,
I need to call a sproc when a user logs out. How do I go about adding a custom logout handler to standard spring logout handling.

Thanks
11 years ago
Bumping up to try once more. Any feedback would be helpful.
12 years ago
I'm coming into a project that uses Spring Web-Flow with Ajax techniques for various types of pages for their prototype application. Some of which are wizard style interactions.

However from my limited understanding, Spring Web-Flow does not seem to give me much in return especially if a lot of my interactions are Ajax based ie, there is no real "flow" to talk of.

Am I right in this assumption. I would like to hear from people who are actively using Spring Web-Flows in production and even better if you are using them with in conjunction with Ajax-heavy pages.

Even if it is with light or no Ajax, do you see great returns with using SWF. I can see them become overly complicated for big flows and added unnecessary burden to maintain.

Bottom line, I'm not convinced and would like to hear from you either ways. Thanks.
12 years ago
Hi
I'm migrating my project from Spring Tool Suite to Eclipse Helios as I was not happy with STS performance. However I have run into problems with building and publish to Tomcat in eclipse.

Seems like any change resources is not detected by eclipse and does not kick off an auto rebuild or publish. I have tried manually cleaning, building, cleaning Tomcat republishing, even deleting the app folder in .metadata\.plugins\org.eclipse.wst.server.core\ with no avail.

Tomcat is set to republish with change to resource and eclipse is set to auto-build.

Any help in this regard would be great help. Thanks.
I also tried this:

sql-query name="sprocName" callable="true">
<return-scalar column="newId" type="integer"/>
...


Returned a 1 as constant in the sproc.

and did a query.uniqueResult()

and now I get this

Unhandled exception
java.lang.NullPointerException
at org.hibernate.loader.Loader.doQuery(Loader.java:720)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1722)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)

Hi
I'm trying to execute a sql server stored procedure via hibernate named query. However get the exception below when I do query.list(). Other sprocs are executed similarly and work just fine. THanks

java.lang.NullPointerException
at org.hibernate.loader.custom.CustomLoader$Metadata.<init>(CustomLoader.java:544)
at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:517)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1817)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1722)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)