Dave Alvarado

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

Recent posts by Dave Alvarado

Hi,

I'm using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, and JBoss 7.1.3 AS. I have a Hibernate entity with this field …



I would like to reference the first address in the field and so through JSTL I tried doing this:



However I get the exception …



Is it possible to access the first address object? Thanks, - Dave
Hi,

I'm using Eclipse Juno on mac 10.7.5. I'm trying to recover from a workspace crash. I want to import an existing Maven project, but when I got to File -> Import, "Existing Maven Project" isn't part of the list of options. I went to verify if the M2E plugin was installed and indeed it is. I get the error



when I go to "Help" -> "Install New Software", select the URL "Maven Integration for Eclipse - http://download.eclipse.org/technology/m2e/releases/1.0/1.0.200.20111228-1245"; and check the box for "Maven Integration for Eclipse". Any ideas how to make Eclipse recognize my Maven project?
Hi,

I'm using JBoss 7.1.1.Final and am building a WAR application using Spring 3.1.1.RELEASE and Hibernate 4.1.5.Final. The Hibernate version is a slight upgrade from what module JBoss provides. My question is, are there performance (or other) disadvantages of doing this? I would prefer not to install a new module in JBoss because there may be other applications running that depend on the Hibernate version taht ships with JBoss.

Thanks for your feedback, - Dave
11 years ago
Hi,

I'm using JBoss AS 7.1.1.Final. Is there a JNDI JTA transaction manager that Jboss provides that I can use with my Spring 3.1.1.RELEASE application? Where is it and what's it called? I'm using Spring 3.1's persistence.xml-less configuration for my application but I'm getting errors about not being able to find a transaction manager. Here's my Spring config …



I did a search through the JBOss configs for anything called "TransactionManager," but no dice. Here's how I define my datasource in JBoss' $JBOSS_HOME/standalone/conf/standalone.xml file …



Thanks for any guidance, - Dave
11 years ago
Hi,

I'm building a WAR using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, JPA 2.0, and deploying to JBoss 7.1.1.Final. I'm noticing some errors that occur in my JBoss environment that don't occur in my unit tests and I want to eliminate a couple of factors. Is there a way to mock the JBoss transaction manager when running Spring JUnit tests? I use this application context when I deploy my application:



but in my JUnit environment, I use a different context:



I would like my tests to mirror as closely as possible what will happen when I deploy. Thanks, -
11 years ago
Yeah, I think so. I tried setting the timeout attribute on the "@Transactional" method of my service class ...



but this doesn't work (I set it to a low value to test it stuff would actually time out, but it didn't).
11 years ago
Hi,

I'm using JPA 2.0, Hibernate 4.1.0.Final, Spring 3.1.1.RELEASE, and JUnit 4.8.1. I'm confused about why a JUnit test is NOT failing. I have this test



My code for deleting an entity is



Shouldn't the second call to "delete" result in some kind of exception since the entity was removed in the first call? My flush mode is set to AUTO (the default) and below is how I configure my entity manager in my JUnit Spring application context and persistence.xml. Why isn't the second delete call failing?



and here is the persistence.xml file


Oh, no, I'm creating a web application (WAR) and am currently using Spring "@Transactional" annotation to declare which of my service methods (service class is declared with Spring's @Service annotation) I want treated as transactions. Here's how i declare my transaction manager in my spring application context ...



and here's my persistence.xml file ...

11 years ago
Hi,

I'm using JBoss 7.1.1. on Mac 10.7.5. While I was able to find how to set the transaction timeout on a global basis, is it possible to put some kind of configuration into my WAR file to tell JBoss I want a specific transaction timeout for my application? I'm using Spring 3.1.1.RELEASE and Hibernate 4.1.0.Final.

Thanks, - Dave
11 years ago
What port is in use, though? The error messages don't provide enough information. I know it isn't 8080, b/c I can't telnet into that port. -
11 years ago
Thanks but there are a couple of problems with that approach. In your clause, you are asking for products in contracts, but those two lists contain different objects. A contract has a product, and I'd like to know of the given list of products, what contracts contain a product that match.

Also, I'm trying to use the more generic JPA API, using entityManager, and so I'm trying to eliminate any Hibernate-specific APIs.

> Now, is your question about how to find the users who have contracts related to the products in this list?

Yes, that's what I want. I think I'm close. I have ...



but I can't figure out how to write the last line. The above dodsn't work because "contracts" are different objects than "products".
Hi,

I'm using JPA 2.0 and Hibernate 4.1.0.Final. I'm curious how I would write a specific entity manager query. I have a domain object



and then the Contract domain object has



Given a java.util.List of Products, how do I construct a query asking for Users who have at least one contract tied to a product in the given list?

Thanks, - Dave
Hi,

I'm using JBoss AS 7.1.0.Final on Mac 10.7.5. Occasionally, I'll try and restart JBoss, and I'll fail with the below error ("bind failed: Address already in use"). Below is output from the console …



The server log has this message



What else should I be doing to restart my server successfully? - Dave
11 years ago