[JBossCache] - maven2 dependencies for stand alone cache with hibernate
by memoores
I'm trying to get a TreeCache running stand alone with hibernate, so I followed the entry
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheHibernateTransactionsS...
I am also using maven, so I started hooking in the dependencies based some trial and error.
Can someone let me know the correct set of jars to get from the maven repo? They are
totally different from the ones inthe hbcache.zip that is on the wiki.
Here's what I have so far, which results in a
java.lang.NoClassDefFoundError: org/jboss/invocation/MarshalledValueInputStream.
There is a version of this class in jboss-aop, but it's a different package..
THanks for taking a look..
--Michael
| <dependency>
| <groupId>jboss</groupId>
| <artifactId>jboss-cache</artifactId>
| <version>1.4.1.SP3</version>
| </dependency>
| <dependency>
| <groupId>jboss.jboss-aop</groupId>
| <artifactId>jboss-aop</artifactId>
| <version>1.5.0.GA</version>
| </dependency>
| <dependency>
| <groupId>jboss</groupId>
| <artifactId>jboss-system</artifactId>
| <version>4.2.0.GA</version>
| </dependency>
| <dependency>
| <groupId>jboss</groupId>
| <artifactId>jboss-common</artifactId>
| <version>4.0.4</version>
| </dependency>
| <dependency>
| <groupId>jboss</groupId>
| <artifactId>jboss-jmx</artifactId>
| <version>4.2.0.GA</version>
| </dependency>
| <dependency>
| <groupId>jgroups</groupId>
| <artifactId>jgroups</artifactId>
| <version>2.4.1</version>
| </dependency>
| <dependency>
| <groupId>oswego-concurrent</groupId>
| <artifactId>concurrent</artifactId>
| <version>1.3.4</version>
| </dependency>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047380#4047380
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047380
18 years, 11 months
[EJB/JBoss] - Re: EJB2.1:UserTransaction with CMT- possible bug?
by waynebaylor
I just checked out the EJB3 Spec and found the following:
Section 13.6.5 Handling of Methods that Run with "an unspecified transaction context"
anonymous wrote :
| The term ?an unspecified transaction context? is used in the EJB specification to refer to the cases in
| which the EJB architecture does not fully define the transaction semantics of an enterprise bean method
| execution.
|
| This includes the following cases:
|
| ? The execution of a method of an enterprise bean with container-managed transaction demarcation
| for which the value of the transaction attribute is NOT_SUPPORTED, NEVER, or SUPPORTS.
|
| ? The execution of a PostConstruct, PreDestroy, PostActivate, or PrePassivate
| callback method of a session bean with container-managed transaction demarcation.[71]
|
| ? The execution of a PostConstruct or PreDestroy callback method of a message-driven
| bean with container-managed transaction demarcation.[72]
|
| The EJB specification does not prescribe how the container should manage the execution of a method
| with an unspecified transaction context?the transaction semantics are left to the container implementation.
|
My guess is that JBoss lets you use UserTransaction since there's no tx context defined.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047374#4047374
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047374
18 years, 11 months
[JBoss Seam] - Need some clarification about seam-gen-ed EntityHome class
by kingcu
Hi,
I used "seam generate-entities" to generate a complete CRUD application from an existing database schema. Everything works great! I just need some clarification/education to better understand EntityHome.
Here is the background description: there is a bidirectional one-to-many relation between two entities, Widget (1) <---> Feed (n), entity Widget on the one side and entity Feed on the many side. Below are the seam generated classes extending EntityHome.
So, my questions are:
1. Why isWired() always returns true? In other words, is there any situation that this method needs to return false?
2. wire() seems to be the method to "wire up" the correct entity relation, but it's empty in WidgetHome class, even though this is a bidirectional relation and both sides need to be wired, why?
3. the wire() method is only referenced in page.xml as a page action (I can't find a complete description about page.xml anywhere, but I guess the purpose of action element is to call some method on page load, right?), the creation/refreshing of the home component seems unclear to me.
Thanks.
WidgetHome.java
package com.kfi.was.entity;
|
| import java.math.BigDecimal;
| import java.util.ArrayList;
| import java.util.List;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityHome;
|
| @Name("widgetHome")
| public class WidgetHome extends EntityHome<Widget> {
|
| public void setWidgetId(BigDecimal id) {
| setId(id);
| }
|
| public BigDecimal getWidgetId() {
| return (BigDecimal) getId();
| }
|
| @Override
| protected Widget createInstance() {
| Widget widget = new Widget();
| return widget;
| }
|
| public void wire() {
| }
|
| public boolean isWired() {
| return true;
| }
|
| public Widget getDefinedInstance() {
| return isIdDefined() ? getInstance() : null;
| }
|
| public List<Feed> getFeeds() {
| return getInstance() == null ? null : new ArrayList<Feed>(getInstance()
| .getFeeds());
| }
|
| }
|
FeedHome.java
package com.kfi.was.entity;
|
| import java.math.BigDecimal;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityHome;
|
| @Name("feedHome")
| public class FeedHome extends EntityHome<Feed> {
|
| @In(create = true)
| WidgetHome widgetHome;
|
| public void setFeedId(BigDecimal id) {
| setId(id);
| }
|
| public BigDecimal getFeedId() {
| return (BigDecimal) getId();
| }
|
| @Override
| protected Feed createInstance() {
| Feed feed = new Feed();
| return feed;
| }
|
| public void wire() {
| Widget widget = widgetHome.getDefinedInstance();
| if (widget != null) {
| getInstance().setWidget(widget);
| }
| }
|
| public boolean isWired() {
| return true;
| }
|
| public Feed getDefinedInstance() {
| return isIdDefined() ? getInstance() : null;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047364#4047364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047364
18 years, 11 months