[jboss-user] [JBoss Seam] - Re: s:link propagation

2007-11-16 Thread trickyvail
Thanks Pete. http://jira.jboss.org/jira/browse/JBSEAM-2261
- Rich

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4105617#4105617

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105617
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Exception when redeploying ear with multiple wars.

2007-11-15 Thread trickyvail
Added JIRA: http://jira.jboss.org/jira/browse/JBSEAM-2255

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4105270#4105270

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105270
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - s:link propagation

2007-11-14 Thread trickyvail
When you use a s:link tag the tag propagates long-running conversations by 
default. You can change it's behavior with the use of the propagation attribute:
anonymous wrote : propagation - determines the conversation propagation style: 
begin, join, nest, none or end.
Shouldn't there also be a propagation attribute value for the default behavior? 
Something like propagation=propagate. 

From what I can understand the jsf tag libs and ejb3 annotations are 
structured in this manner. If you don't specify (or annotate) an attribute (or 
field / method) the defaults take precedence. However you have the option of 
being literal and specifying the attribute or annotation - including literally 
specifying the default.

If you take a look at this previous post 
http://www.jboss.com/index.html?module=bbop=viewtopict=118268 I think you 
might get an idea why this could be useful. Currently I have to create 
duplicate s:link tags to get around this limitation.

Thanks for you insight and comments.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4104748#4104748

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4104748
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Question about SeamTest

2007-11-08 Thread trickyvail
Currently there is too much we need it now at my company for management to 
see the value in testing so I have not explored the seam testing functionality. 
However, I personally expect to utilize testing extensively in the near future 
and would strongly urge you to continue it's integration and development in 
seam.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102914#4102914

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102914
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Exception when redeploying ear with multiple wars.

2007-11-08 Thread trickyvail
I have an ear that contains two wars. When I redeploy I get the following error 
in the log:
13:53:03,135 INFO  [TomcatDeployer] undeploy, ctxPath=/www.domain1.com, 
warUrl=.../deploy/admin.ear/www.domain1.com.war/
  | 13:53:03,277 INFO  [TomcatDeployer] undeploy, 
ctxPath=/www.admin.domain2.net, 
warUrl=.../deploy/admin.ear/www.admin.domain2.net.war/
  | 13:53:03,279 ERROR [net]] Exception sending context destroyed event to 
listener instance of class org.jboss.seam.servlet.SeamListener
  | java.lang.IllegalStateException: Attempted to invoke a Seam component 
outside the an initialized application
  | at 
org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
  | at 
org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:50)
  | at 
org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:118)
  | at 
org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:39)
  | at 
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3893)
  | at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4525)
  | at 
org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1134)
  | at 
org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4615)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 
If I remove one of the wars from the ear, the application can be redeployed 
without error. It looks like the seam listener is destroyed for the first war, 
but then another message is sent to the now non-existent seam listener.

This error does not prevent the application from redeploying, but I thought a 
seam developer may want to be made aware of it.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4103089#4103089

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4103089
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error selecting object problem

2007-11-07 Thread trickyvail
The seam documentation says
anonymous wrote : noSelectionLabel ? specifies the (optional) label to place at 
the top of list
  | (if required=true is also specified then selecting this value will cause a
  | validation error)
so try
h:selectOneMenu required=false value=#{rstReportHome.specialFirm} 
id=firm

I'm not sure if JSF will submit a null to setSpecialFirm() when the 
non-selection is selected, so you may have to adapt the form's action method to 
check for this situation and create a new automatic entity.

P.S. You don't need
private Firm specialFirm;
inside RstReportHome.java.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102585#4102585

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102585
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Error selecting object problem

2007-11-06 Thread trickyvail
I believe you are right about the  tag having problems. I think it is because 
the Automatic object you create has not been persisted and won't have an id.

Here's a suggestion for something you could try:

  | h:selectOneMenu value=#{rstReportHome.specialfirm} ...
  | s:selectItems ... noSelectionLabel=AUTOMATIC/
  | 
  | public Firm getSpecialFirm()
  | {
  | return getInstance().getFirm();
  | }
  | 
  | public void setSpecialFirm(Firm firm)
  | {
  | if(firm == null)
  | {
  | // create a new automatic firm.
  | firm = new Firm();
  | firm.setStuff(stuff);
  | }
  | getInstance().setFirm(firm);
  | }
  | 

I'm guessing that noSelection returns a null here.
Please post your results. Thanks.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102316#4102316

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102316
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModel/dataTable for rendering 2 tables

2007-10-08 Thread trickyvail
I think you are trying to call getMls() on the listings collection inside 
Sellers. The collection does not have this method. You will first need to use a 
jsf iteration tag like h:dataTable, ui:repeat or rich:dataTable. Something like 
this:
ui:repeat value=#{somebean.sellers} var=seller
  | h:outputText value=#{seller.name}
  | ui:repeat value=#{seller.listings} var=listing
  | h:outputText value=#{listing.mls}/
  | /ui:repeat
  | /ui:repeat

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092585#4092585

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092585
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: 2.0.0.CR2 Seam-gen Error

2007-10-08 Thread trickyvail
I am also unable to generate-entities with seam 2.0.0.CR2 and postgresql.

I have a possible work around for the time being:

1. Create the new project with seam-2.0.0.CR2,
2. Generate the entities with seam-2.0.0.CR1.

Appears to work fine after some casual testing. I don't know if there are any 
changes to the seam-gen jsf facelet templates, so there may be some subtle 
differences. Hope this helps. Cheers.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092760#4092760

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092760
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModel/dataTable for rendering 2 tables

2007-10-08 Thread trickyvail
Just a hunch here, but is your collection a Set? JSF does not iterate correctly 
through sets. If you are using a set, try changing it to a List, or creating a 
transient method that instantiates and returns a new ArrayList constructed from 
the set.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092762#4092762

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092762
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModel/dataTable for rendering 2 tables

2007-10-08 Thread trickyvail
Yes, DataTable can iterate through a One to Many collection of an entity. 
However there are limitations to what kinds of collections are acceptable. 
Lists and Arrays are allowed, Sets are not (because they are unordered).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092776#4092776

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092776
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModel/dataTable for rendering 2 tables

2007-10-08 Thread trickyvail
Just found a JSF forum posting about this:

http://forum.java.sun.com/thread.jspa?threadID=589709messageID=3062225

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092777#4092777

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092777
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: limiting size of query/result set

2007-10-03 Thread trickyvail
Could you try this?
framework:entity-query
  | name=randomPageImagesSmallmax-results=3 
  | framework:ejbqlfrom PageImage/framework:ejbql
  | framework:orderRAND()/framework:order
  | /framework:entity-query

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4091096#4091096

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4091096
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: #{conversationList} appears to be empty

2007-09-28 Thread trickyvail
I agree that a short sentence describing this requirement added to the 
documentation at 6.7.3 would be helpful to people using the conversationList or 
switcher.

You may also be able to set the conversation description programatically. 
Something like this I think:((Conversation) 
Component.getInstance(org.jboss.seam.core.Conversation)).setDescription(String)
Not totally sure if this will work as expected.

I agree that this behavior is fragile. Perhaps if you create a JIRA you could 
also ask if in the event the description is not set, the conversationList and 
switcher fall back to some other description string created from the id or 
similar.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089739#4089739

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089739
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: #{conversationList} appears to be empty

2007-09-28 Thread trickyvail
In order for the conversationList to display your conversations they must have 
descriptions set in pages.xml.

Please refer to this post: 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4049848#4049848

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089710#4089710

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089710
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Comprehensive beginner tutorial?

2007-09-28 Thread trickyvail
Personally I think that Michael Yuan's book is currently the best Seam book 
available for purchase. The documentation that comes with seam is a goldmine of 
information too, but definitely assumes the reader understands JSF and EJB3.

There is another book called Beginning JBoss Seam (Nusairat Apress 2007) which 
is much more beginner orientated. It has a section outlining the new features 
of Java 5 and chapters devoted to JSF and EJB3. This book is very light when it 
comes to seam information but it may be helpful to you at the outset of your 
journey.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4089866#4089866

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089866
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam-gen build corrupts images

2007-09-25 Thread trickyvail
This issue is resolved in the latest release ( jboss-seam-2.0.0.CR1 ).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4088551#4088551

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088551
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL

2007-09-13 Thread trickyvail
I'm not certain this will work but please try and post results.

Inside your entity bean change the setter method for the field you want to be 
null to something like this:
public void setField(String field)
  | {
  | if(.equals(field))
  | {
  | this.field = null;
  | }
  | else
  | {
  | this.field = field;
  | }
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4084017#4084017

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084017
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Inserting into primary and secondry table using bean

2007-09-13 Thread trickyvail
I'm not sure I understand your question correctly, but I think you are asking 
how to have the primary keys generated for you? Your entity beans do not have 
the @GeneratedValue annotation on their id fields. This may be what you need to 
explore.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4084036#4084036

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084036
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Newbie Seam generate-entities question?

2007-09-11 Thread trickyvail
Yes, seam-gen will create entity relationships.

If you are not seeing any it may be that you have not created the referential 
relationships for the foreign keys in your tables.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4083109#4083109

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4083109
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: servlet accessing seam components

2007-09-11 Thread trickyvail
There is a servlet that does this in the seamspace example application. Take a 
look at ContentServlet.java.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4083113#4083113

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4083113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Redirecting to Previous Long Running Conversations

2007-09-10 Thread trickyvail
I have fixed a small error in the last version.

@Name(stickyConversationManager)
  | @Scope(ScopeType.SESSION)
  | public class StickyConversationManager
  | {
  | private StackString conversationStack = new StackString();
  | 
  | @Logger
  | private Log log;
  | 
  | @In(create = true)
  | @Out
  | private CartHome cartHome;
  | 
  | public String stick()
  | {
  | Manager manager = Manager.instance(); 
  | HttpServletRequest httpServletRequest = (HttpServletRequest) 
FacesContext.getCurrentInstance().getExternalContext().getRequest();
  | String conversationIdRequestParameter = 
httpServletRequest.getParameter(manager.getConversationIdParameter());
  | 
  | if(! manager.isLongRunningOrNestedConversation())
  | {
  | ConversationEntries conversationEntries = 
ConversationEntries.instance();
  | 
  | if(conversationEntries.getConversationEntries().size() 
== 0)
  | {
  | manager.beginConversation();
  | 
  | // the following change to the conversation 
timeout
  | // is gone on the next page submission
  | Conversation.instance().setTimeout(24 * 60 * 60 
* 1000);
  | 
conversationStack.push(Conversation.instance().getId());
  | }
  | else if(conversationIdRequestParameter == null)
  | {
  | while(conversationStack.size()  0)
  | {
  | ConversationEntry conversationEntry = 
conversationEntries.getConversationEntry(conversationStack.peek());
  | if(conversationEntry != null)
  | {
  | conversationEntry.redirect();
  | break;
  | }
  | else
  | {
  | conversationStack.pop();
  | }
  | }
  | }
  | }
  | else if(manager.isLongRunningConversation())
  | {
  | try
  | {
  | if(conversationStack.peek() != 
Conversation.instance().getId())
  | {
  | 
conversationStack.remove(Conversation.instance().getId());
  | 
conversationStack.push(Conversation.instance().getId());
  | }
  | }
  | catch(EmptyStackException e){}
  | }
  | 
  | log.debug(toString());
  | return null;
  | }
  | 
  | @Override
  | public String toString()
  | {
  | StringBuffer stringBuffer = new StringBuffer();
  | stringBuffer
  | .append(ConversationManager)
  | .append(Stack);
  | for(String conversationId : conversationStack)
  | {
  | stringBuffer
  | .append(ConversationId)
  | .append(conversationId)
  | .append(/ConversationId);
  | }
  | stringBuffer
  | .append(/Stack)
  | .append(/ConversationManager);
  | return stringBuffer.toString();
  | }
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4082639#4082639

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082639
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - facelet template menu conversation propagation

2007-09-10 Thread trickyvail
If you are using a facelets template which displays common menu links on every 
page you may require a different conversation propagation attribute value 
within the links depending on the view.

In your view page when you want to change the default propagation of the menu 
items set the propagation type in a ui:param tag:
ui:composition xmlns=http://www.w3.org/1999/xhtml;
  | xmlns:ui=http://java.sun.com/jsf/facelets;
  | template=layout/template.xhtml
  | 
  | 
  |ui:param name=menuPropagation value=end/
  |ui:define name=body
  |   h1Some View/h1
  |/ui:define
  | /ui:composition

In the menu template create two links for each item one for when the 
propagation is not set and the other for when it is:
div
  | xmlns=http://www.w3.org/1999/xhtml;
  | xmlns:ui=http://java.sun.com/jsf/facelets;
  | id=menu
  | 
  | s:link
  | rendered=#{menuPropagation == null}
  | view=/home.xhtml
  | value=Home
  | /
  | s:link
  | rendered=#{menuPropagation != null}
  | view=/home.xhtml
  | value=Home
  | propagation=#{menuPropagation}
  | /
  | 
  | s:link
  | rendered=#{menuPropagation == null}
  | view=/nextMenuItem.xhtml
  | value=nextMenuItem
  | /
  | s:link
  | rendered=#{menuPropagation != null}
  | view=/nextMenuItem.xhtml
  | value=NextMenuItem
  | propagation=#{menuPropagation}
  | /
  | 
  | !-- etc ... --
  | /div
  | 



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4082710#4082710

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082710
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Redirecting to Previous Long Running Conversations

2007-09-07 Thread trickyvail
Seam 2.0.0.BETA1

I would like a shopping website that allows users to have multiple carts open 
in different browser windows at the same time. Seam's conversation model 
appears to provide a solution: use a long running conversation for each cart 
and nested conversations everywhere a regular application would use a 
conversation.

One of the problems is how to transparently connect a user back to their cart 
(most recently accessed session) if they leave the site and come back using a 
url without the conversation id? I've tried the following solution:


  | pages.xml (fragment):
  | 
  | page view-id=* action=#{conversationManager.manage}
  | 
  | ConversationManager.java:
  | 
  | @Name(conversationManager)
  | @Scope(ScopeType.SESSION)
  | public class ConversationManager
  | {
  | private StackString conversationStack = new StackString();
  | 
  | public String manage()
  | {
  | Manager manager = Manager.instance(); 
  | HttpServletRequest httpServletRequest = (HttpServletRequest) 
FacesContext.getCurrentInstance().getExternalContext().getRequest();
  | String conversationIdRequestParameter = 
httpServletRequest.getParameter(manager.getConversationIdParameter());
  | 
  | if(! manager.isLongRunningOrNestedConversation())
  | {
  | ConversationEntries conversationEntries = 
ConversationEntries.instance();
  | 
  | if(conversationEntries.getConversationEntries().size() 
== 0)
  | {
  | manager.beginConversation();
  | 
conversationStack.push(Conversation.instance().getId());
  | }
  | else if
  | (
  | 
conversationEntries.getConversationEntries().size()  0
  |  conversationIdRequestParameter == null
  | )
  | {
  | while(conversationStack.size()  0)
  | {
  | String conversationId = 
conversationStack.pop();
  | ConversationEntry conversationEntry = 
conversationEntries.getConversationEntry(conversationId);
  | if(conversationEntry != null)
  | {
  | conversationEntry.redirect();
  | }
  | }
  | }
  | }
  | else if(manager.isLongRunningConversation())
  | {
  | try
  | {
  | if(conversationStack.peek() != 
Conversation.instance().getId())
  | {
  | 
conversationStack.remove(Conversation.instance().getId());
  | 
conversationStack.push(Conversation.instance().getId());
  | }
  | }
  | catch(EmptyStackException e){}
  | }
  | 
  | return null;
  | }
  | }
For every view the manage method:
- begins a long running conversation for new sessions.
- for requests that have conversations but no conversation id, redirects to 
last accessed existing conversation.

I've not tested this extensively but it appears to work as intended.

Because the conversation holds the cart, its timeout should be set to a long 
span. However when creating nested conversations it would be preferable for 
them to have a short span. Here's where I've run into a problem. I can set the 
conversation timeout like so:
Conversation.instance().setTimeout(int);
but as soon as I go to the next page the timeout will be back to the default 
setting. I've would like to use an approach like:
ConversationEntries.instance().getConversationEntry(2).setTimeout(int);
which would set the ConversationEntry dirty, but this method is not visible.

Here are my questions:
=
- How do you permanently change a conversation's timeout?

- Is there a better multiple cart solution without hijacking the seam 
conversation model? (e.g. storing the carts in the sesssion and creating 
management similar to conversations)

- If this is an acceptable solution would it be better implemented as a servlet 
filter instead of mapping an action to the * view in pages.xml?
=

Thanks in advance for your feedback.

references:
http://www.jboss.com/index.html?module=bbop=viewtopict=109084

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4082227#4082227

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4082227
___
jboss-user 

[jboss-user] [JBoss Seam] - Re: Inserting into primary and secondry table using bean

2007-07-30 Thread trickyvail
This is a question for the EJB3 forum.

Yes this is easy to do without using a trigger.

You could map as a One-to-One Unidirectional or a One-to-One Bidirectional.

e.g. One-to-One Unidirectional

  | @Entity
  | public class Employee
  | {
  |private int id;
  |private Address address;
  | 
  |@Id
  |@Column(name = eno)
  |@GeneratedValue
  |public int getId() { return this.id; }
  | 
  |@OneToOne
  |@PrimaryKeyJoinColumn
  |public Address getAddress() { return address; }
  | 
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4068779#4068779

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068779
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Best Seam Development Environment? (Switch from MC to EJ

2007-07-30 Thread trickyvail
Yes, running exploded will greatly decrease your build cycle.

If you are running JBoss 4.0.5.GA please be aware of this bug:
http://wiki.jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenRedeploying 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4068782#4068782

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068782
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Best Seam Development Environment? (Switch from MC to EJ

2007-07-30 Thread trickyvail
Depends on whether you want to use Seam 1.2.1.GA or 2.0.0.BETA1.

Seam 1.2.1.GA is the current stable release and works with jboss-4.0.5.GA.

Seam 2.0.0.BETA1 is the next version of seam and works with jboss-4.2.0.GA 
(maybe 4.2.1.GA - anyone?).

I've not run into any problems with Seam 2.0.0.BETA1.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4068798#4068798

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068798
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam-gen build corrupts images

2007-07-25 Thread trickyvail
Though I would ping this thread in case it missed the developers attention.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4067506#4067506

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067506
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam-gen build corrupts images

2007-07-25 Thread trickyvail
Thank you.

Here's a link to JIRA:

http://jira.jboss.org/jira/browse/JBSEAM-1726

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4067518#4067518

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067518
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam-gen build corrupts images

2007-07-20 Thread trickyvail
Seam 1.2.1.GA

I have experienced corrupt image files when creating new seam-gen projects in a 
Linux environment (Debian  Ubuntu) for some time. When creating a new seam-gen 
project in a WindowsXP environment the file corruption does not occur.

There are only 3 files that are effected by this problem:

/view/img/cal-next.png
/view/img/cal-prev.png
/view/img/dtpick.gif

So it has not been a big deal to copy the files over manually.

I've done a little research into the problem and I think it is related to the 
use of a filterset in the ant copy task on lines 602-605 of the seam-gen build 
file $SEAM_HOME/seam-gen/build.xml
  | 
  | 
  | copy todir=${project.home}/view
  | fileset refid=view/
  | filterset refid=project/
  | /copy

The ANT documentation (http://ant.apache.org/manual/CoreTasks/copy.html) says:
anonymous wrote : Note: If you employ filters in your copy operation, you 
should limit the copy to text files. Binary files will be corrupted by the copy 
operation. This applies whether the filters are implicitly defined by the 
filter task or explicitly provided to the copy operation as filtersets. See 
encoding note.
  | 

When copying the contents of the image directory within a copy task (without 
any filters) the file corruptions do not occur.

Would it be appropriate to post a JIRA issue with a patch?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4066241#4066241

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4066241
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration DEPLOYMENT] - Multiple WARs with SSL and common data source configuration.

2007-07-19 Thread trickyvail
I have a requirement for two SSL enabled shopping websites to share the same 
data source. Both websites are owned by the same company. Some of the products 
are unique to one website and some products are common to both - hence the 
shared data source to accurately reflect inventory levels.

I have an implementation using Apache2 and mod_jk but I would be very grateful 
to hear any tips for alternative solutions.

In particular please clarify the following:

- Can WARs inside the same EAR utilize different SSL certificates?

- Can EARs running within different VMs but not within a cluster share a common 
Persistence Provider Instance (factory / secondary cache)?



Here are the details for my current implementation.


Software:
- Debian 4.0 Etch AMD64
- Apache 2.2.3
- JBoss 4.0.5.GA
- JBoss Seam 1.2.1.GA
- JDK 1.5.0_12
- libapache2-mod-jk 1.2.18

Server Configuration
--
The server has been configured to have two network addresses through virtual 
addressing (aka multihomed).

/etc/network/interfaces :auto eth0
  | iface eth0 inet static
  | address 192.168.0.81
  | netmask 255.255.255.0
  | network 192.168.0.0
  | broadcast 192.168.0.255
  | gateway 192.168.0.254
  | auto eth0:0
  | iface eth0:0 inet static
  | address 192.168.0.82
  | netmask 255.255.255.0
  | network 192.168.0.0
  | broadcast 192.168.0.255

JBoss configuration
--
JBoss has been configured with 2 virtual hosts bound to the 2 addresses.

$JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml :Server
  | 
  |Service name=jboss.web
  |   className=org.jboss.web.tomcat.tc5.StandardService
  | 
  |   Connector port=8080 address=${jboss.bind.address}
  |  maxThreads=250 strategy=ms maxHttpHeaderSize=8192
  |  emptySessionPath=true
  |  enableLookups=false redirectPort=8443 acceptCount=100
  |  connectionTimeout=2 disableUploadTimeout=true/
  | 
  |   Connector port=8009 address=${jboss.bind.address}
  |  emptySessionPath=true enableLookups=false redirectPort=8443 
  |  protocol=AJP/1.3/
  |   Engine name=jboss.web defaultHost=localhost
  | 
  |  Realm 
className=org.jboss.web.tomcat.security.JBossSecurityMgrRealm
  | 
certificatePrincipal=org.jboss.security.auth.certs.SubjectDNMapping
  | allRolesMode=authOnly
  | /
  | 
  | Host name=localhost
  |autoDeploy=false deployOnStartup=false deployXML=false
  |
configClass=org.jboss.web.tomcat.security.config.JBossContextConfig
  |
  | 
  | Valve 
className=org.jboss.web.tomcat.tc5.jca.CachedConnectionValve
  | 
cachedConnectionManagerObjectName=jboss.jca:service=CachedConnectionManager
  | 
transactionManagerObjectName=jboss:service=TransactionManager /
  | 
  | 
  |  /Host
  | 
  | Host
  | name=192.168.0.81
  | autoDeploy=false
  | deployOnStartup=false
  | deployXML=false
  | 
  | Aliaswww.domain1.net/Alias
  | /Host
  | 
  | Host
  | name=192.168.0.82
  | autoDeploy=false
  | deployOnStartup=false
  | deployXML=false
  | 
  | Aliaswww.domain2.net/Alias
  | /Host
  | 
  |   /Engine
  | 
  |/Service
  | 
  | /Server

My application is deployed as an EAR containing 2 WARs. The WARs are configured 
to attach to different addresses.

application.ear/META-INF/application.xml :?xml version=1.0 encoding=UTF-8?
  | application xmlns=http://java.sun.com/xml/ns/javaee; 
  |  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  |  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/application_5.xsd;
  |  version=5
  | 
  |display-namedomain/display-name
  |
  |module
  |   web
  |  web-uridomain1.war/web-uri
  |  context-root//context-root
  |   /web
  |/module
  | 
  |module
  |   web
  |  web-uridomain2.war/web-uri
  |  context-root//context-root
  |   /web
  |/module
  | 
  | SNIP . . .
application.ear/domain1.war/WEB-INF/jboss-web.xml :jboss-web
  | context-root//context-root
  | virtual-host192.168.0.81/virtual-host
  | /jboss-web
application.ear/domain2.war/WEB-INF/jboss-web.xml :jboss-web
  | context-root//context-root
  | virtual-host192.168.0.82/virtual-host
  | /jboss-web

Apache2 configuration

/etc/apache2/ports.conf :Listen 192.168.0.81:80
  | Listen 192.168.0.81:443
  | Listen 192.168.0.82:80
  | Listen 192.168.0.82:443
added to /etc/apache2/apache2.conf :JkWorkersFile 
/etc/apache2/jk/workers.properties
  | JkLogFile 

[jboss-user] [JBoss Seam] - Re: Problem with the images in the [i]D:\jboss-seam-1.2.1. G

2007-07-19 Thread trickyvail
I have also experienced corrupt image files when creating new seam-gen projects 
in a Linux environment. I'm not sure that this problem occurs within windows. 

There are only 3 files that are effected by this problem:

/view/img/cal-next.png
/view/img/cal-prev.png
/view/img/dtpick.gif

So it has not been a big deal to copy the files over manually.

I've done a little research into the problem and I think it is related to the 
use of a filterset in the ant copy command on line 602-605 of the seam-gen 
build file $SEAM_HOME/seam-gen/build.xmlcopy 
todir=${project.home}/view
  | fileset refid=view/
  | filterset refid=project/
  | /copy
  | 
The ANT documentation (http://ant.apache.org/manual/CoreTasks/copy.html) says:
anonymous wrote : Note: If you employ filters in your copy operation, you 
should limit the copy to text files. Binary files will be corrupted by the copy 
operation. This applies whether the filters are implicitly defined by the 
filter task or explicitly provided to the copy operation as filtersets. See 
encoding note.

Would it be appropriate to post a JIRA issue? I think it can be resolved by 
copying the image files within their own copy task (without filters or 
filtersets).


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065946#4065946

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065946
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: NIC address binding granularity

2007-07-17 Thread trickyvail
Peter and Dimitri - thank you both for your replies.

Cheers !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065038#4065038

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065038
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Unable to start the JBOSS 4.2.0 GA in Customized Linux e

2007-07-17 Thread trickyvail
I don't know what is causing your problem but it appears to be identical to 
this post:

http://jboss.com/index.html?module=bbop=viewtopict=113572

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065047#4065047

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065047
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration DEPLOYMENT] - NIC address binding granularity

2007-07-16 Thread trickyvail
When starting the JBoss you may specify an address binding option like this: -b 
x.x.x.x(bind to network address x.x.x.x only)
  | 
  | or
  | 
  | -b 0.0.0.0(bind to all available network addresses)

How do you configure the server to connect to more than one individual network 
address, but not all?

I've taken a look at the source code and it seems that network binding is 
limited in this fashion.

Have I missed something or would a JIRA feature request be reasonable?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4064738#4064738

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4064738
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Using stateless beans generated by seam in standalone Ja

2007-07-12 Thread trickyvail
The entity beans generated by seam-gen are EJB3 beans. I don't see any reason 
why you should not be able to use them directly in a stand alone java 
application (outside of JBoss). You will have to create an application managed 
persistence context to do so.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4063726#4063726

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063726
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Using stateless beans generated by seam in standalone Ja

2007-07-12 Thread trickyvail
Here is an example of an Application-Managed Entity Manager from the book 
Pro EJB 3
public class EmployeeClient {
  |   public static void main(String[] args) {
  | EntityManagerFactory emf = 
Persistence.createEntityManagerFactory(EmployeeService);
  | EntityManager em = emf.createEntityManager();
  | 
  | Collection emps = em.createQuery(SELECT e FROM Employee e)
  |   .getResultList();
  | for(Iterator i = emps.iterator(); i.hasNext();) {
  |   Employee e = (Employee) i.next();
  |   System.out.println(e.getId() + ,  + e.getName());
  | }
  | 
  | em.close();
  | emf.close();
  | } * from page 117

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4063729#4063729

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063729
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Class Inheritance and the EntityHome Framework Class

2007-07-11 Thread trickyvail
It turned out to be pretty simple to get it working.

@Entity
  | @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  | @DiscriminatorColumn(name = discriminator, discriminatorType = 
DiscriminatorType.STRING)
  | public abstract class BaseClass implements Serializable
  | {
  | private String discriminator;
  | 
  | @Column(name = discriminator, length = 16, insertable = false, 
updatable = false)
  | @Length(max = 16)
  | public String getDiscriminator()
  | {
  | return discriminator;
  | }
  | 
  | public void setDiscriminator(String discriminator)
  | {
  | this.discriminator = discriminator;
  | }
  | }
@Entity
  | @DiscriminatorValue(SubClassOne)
  | public class SubClassOne extends BaseClass
  | {
  | public SubClassOne()
  | {
  | discriminator = SubClassOne;
  | }
  | }
@Entity
  | @DiscriminatorValue(SubClassTwo)
  | public class SubClassTwo extends BaseClass
  | {
  | public SubClassTwo()
  | {
  | discriminator = SubClassTwo;
  | }
  | }

@Name(ClassHome)
  | public class ClassHome extends EntityHomeBaseClass
  | {
  | // set a default subclass to instantiate
  | private String discriminator = SubClassOne;
  | 
  | @Override
  | protected BaseClass createInstance()
  | {
  | BaseClass baseClass;
  | if(SubClassOne.equals(discriminator))
  | {
  | baseClass = new SubClassOne();
  | }
  | else if(SubClassTwo.equals(discriminator))
  | {
  | baseClass = new SubClassTwo();
  | }
  | else // unknown class
  | {
  | // throw exception
  | }
  | return baseClass;
  | }
  | 
  | public String getDiscriminator()
  | {
  | return discriminator;
  | }
  | 
  | public void setDiscriminator(String discriminator)
  | {
  | this.discriminator = discriminator;
  | }
  | }

When I want to create a new SubClass I set a JSF control to call 
setDiscriminator in the BaseClassHome object which it uses in turn to determine 
the type of subclass to instantiate.

I'd appreciate any comments or advice if this seems like a misuse of the seam 
framework. Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4063034#4063034

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063034
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: selectOneMenu and selectItems problem

2007-07-11 Thread trickyvail
If your Company object is an entity you need to be aware of:

http://hibernate.org/109.html

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4063133#4063133

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063133
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:fileUpload problem

2007-07-02 Thread trickyvail
The Lob annotation is for ejb3 entity beans when they have a field that is 
mapped to a Large Object in the database. I don't know if this is related to 
the delay you are experiencing but I would remove the annotation as it does not 
look like your backing bean is an Entity.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059651#4059651

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059651
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Editable tabular data the seam way?

2007-06-25 Thread trickyvail
Pete,

When you say CONVERSATION do you specifically mean a LONG RUNNING CONVERSATION 
or a TEMPORARY CONVERSATION?

Is there a standard meaning of Long Running Conversation when members post 
Conversation in messages of this forum?

I think it may also be necessary for the links or buttons that perform 
pagination to take part in the submission of the dataTable fields (ie the jsf 
postback) in order to update the database.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4057391#4057391

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057391
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Search Engines and Seam

2007-06-14 Thread trickyvail
I am confused about the use of .seam as a web page file extension and the 
behavior of internet search engines in relation to this file extension. Would 
it be more conservative to use a jsf or jsp extension?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4054405#4054405

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054405
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Search Engines and Seam

2007-06-14 Thread trickyvail
I created a website with the .seam extension but found that although my site 
was indexed by Google and Yahoo, it was not cached. I changed the extension for 
seam pages to .html and then Google and Yahoo no longer indexed the site at 
all. Because the jsf components render xhtml elements I think maybe the engines 
are  unhappy with the use of the .html extension (although MSN works fine). 
At the moment I'm going back to the .seam extension. Please share your 
experiences and insights in this regard. Thank you.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4054419#4054419

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054419
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Search Engines and Seam

2007-06-14 Thread trickyvail
Does this sound like a plausible explanation for the search engine behavior?

Seam-gen creates an index.html page that contains:
html
  | head
  |   meta http-equiv=Refresh content=0; URL=home.seam
  | /head
  | /html

Search engine retrieves this page, caches it and then proceeds to index and 
cache the home.seam page. The root page for your domain ends up being a blank 
page.

Possible solution? Edit server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml
   welcome-file-list 
  |   welcome-filehome.seam/welcome-file
  |/welcome-file-list


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4054471#4054471

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054471
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Search Engines and Seam

2007-06-14 Thread trickyvail
I've tried the above with both home.seam and home.xhtml as the target welcome 
page but with no success. Maybe because the server tries to access the file 
directly rather than letting seam intercept the file by extension?

Solution attempt 2 - create a robots.txt file that directs the search engines 
to the correct root page for the site (home.seam).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4054487#4054487

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054487
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Search Engines and Seam

2007-06-14 Thread trickyvail
Previously I stated that search engines were not caching pages, but it would be 
more accurate to state that they were caching blank pages (sorry for the 
imprecision).

It seems that robots.txt can only be used to define areas to not visit, so that 
won't work either.

Currently I'm thinking about the following approach:
html
  |   head
  | meta http-equiv=Refresh content=0; URL=home.seam
  | meta name=robots content=noindex,follow
  |   /head
  | /html(Tell the search engine to follow the redirecting index.html page, 
but not to index it.)

Ideally though, I would like to have JBoss load my home.seam page by default, 
rather than load an index.html page with a redirect. Is this something that is 
possible and how do you configure JBoss to do this?

Thank you for everyone's help.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4054498#4054498

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4054498
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityHome validation error (Chapter 14 example)

2007-06-05 Thread trickyvail
TMTOWTDI = there's more than one way to do it (it's an acronym popularized by 
PERL).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4051483#4051483

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051483
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Howto handle LazyInitializationException

2007-05-24 Thread trickyvail
anonymous wrote : That is one way, but a better way is to use a Seam-managed PC.

The Seam-managed Persistence Context (PC) you refer to is an Extended 
Persistence Context that is stored inside a Seam Conversation Scope?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4048342#4048342

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048342
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Howto handle LazyInitializationException

2007-05-24 Thread trickyvail
Seam managed persistence contexts are explained in the Seam documentation in 
section 8.3 page 107.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4048349#4048349

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048349
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Class Inheritance and the EntityHome Framework Class

2007-05-18 Thread trickyvail
I've been using a
 public class BaseHome extends EntityHomeBase
class to manage persistence for a collection of sub class entities that inherit 
from Base. 

For sub classes which have been persisted to the database things work as 
expected. I can setId(), getInstance(), and persist state changes to the 
database.

I would like to create new entities using BaseHome, but I need a way to specify 
which concrete subclass should be instantiated. Here's what I've tried to do:
public class BaseHome extends EntityHomeBase
  | {
  | @Override
  | public void create()
  | {
  | setEntityClass(Subclass.class);
  | super.create();
  | }
  | }
  | 
  | public class Subclass extends Base{}
  | 
With the result:The method setEntityClass(ClassBase)
  | in the type HomeEntityManager,Base
  | is not applicable for the arguments (ClassSubclass)

Am I using the EntityHome framework in a manner that was never intended? Should 
I  build my own bean for managing this object heirachy?

As always, I greatly appreciate the insights the members of this forum share.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4046913#4046913

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4046913
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - EntityHome validation error (Chapter 14 example)

2007-04-26 Thread trickyvail
I think you mave have failed to instantiate an instance of Person inside 
EntityHome.
@Name(personHome)
  | public class PersonHome extends EntityHomePerson  {
  | 
  | private static final long serialVersionUID = 219059304048820709L;
  | 
  | public void setPersonId(Long id)
  | {
  | setId(id);
  | }
  | 
  | public Long getPersonId()
  | {
  | return (Long) getId();
  | }
  | 
  | @Override
  | protected Person createInstance()
  | {
  |   Person person = new Person();
  |   return person;
  |  }
  | }
  | 


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4041185#4041185

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4041185
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Injection of a stateless session bean (SLSB) into anothe

2007-04-05 Thread trickyvail
Yes that worked! Thank you to both Matt and Knass.

My classes look like this:
@Local
  | public interface Simple
  | {
  | public abstract String getName();
  | }
  | 
  | @Stateless
  | @Name(simpleBean)
  | public class SimpleBean implements Simple
  | {
  | private String name = simple;
  | 
  | public String getName()
  | {
  | return name;
  | }
  | }
  | 
  | @Local
  | public interface Container
  | {
  | public abstract String getName();
  | }
  | 
  | @Stateless
  | @Name(containerBean)
  | public class ContainerBean implements Container
  | {
  | @In(create=true)
  | Simple simpleBean;
  | 
  | public String getName()
  | {
  | return simpleBean.getName();
  | }
  | }

I'm still left wondering about the implementation details within the EJB 
container. I suspect that the ContainerBean is issued a proxy stub to which it 
maintains a reference. This would allow different pooled SimpleBeans to service 
the getName() method call from the ContainerBean. In this scenario I think 
things should work as planned. Any further insights appreciated...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4035075#4035075

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4035075
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Injection of a stateless session bean (SLSB) into another SL

2007-04-04 Thread trickyvail
I've set up a SLSB as follows:
@Stateless
  | @Name(simpleBean)
  | public class SimpleBean implements Simple
  | {
  | public String getName()
  | {
  | return simple;
  | }
  | }
  | 

The simpleBean bean can be accessed from a EL expression on a facelets page 
without any trouble.

I have another SLSB like this:
@Stateless
  | @Name(containerBean)
  | public class ContainerBean implements Container
  | {
  | @In
  | SimpleBean simpleBean;
  | 
  | public String getName()
  | {
  | return simpleBean.getName();
  | }
  | }
However, when I try to access the getName method of containerBean I run into 
the following error:
Caused by: org.jboss.seam.RequiredException: In attribute requires non-null 
value: containerBean.simpleBean
  | at org.jboss.seam.Component.getValueToInject(Component.java:1919)
  | 
If I change simpleBean into a JavaBean provided and annotate containerBean 
with In(create=true) the injection works as expected, but if I create a similar 
annotation without changing simpleBean to a JavaBean I get an error like this:
... 95 more
  | Caused by: java.lang.IllegalArgumentException: Could not set field value by 
reflection: ContainerBean.simpleBean on: com.somedomain.stateless.ContainerBean 
with value: class org.javassist.tmp.java.lang.Object_$$_javassist_3
  | at org.jboss.seam.util.Reflections.set(Reflections.java:77)
  | at org.jboss.seam.Component.setFieldValue(Component.java:1555)
  | ... 117 more
  | Caused by: java.lang.IllegalArgumentException
  | at 
sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
  | 
The seam documentation makes it clear that SLSB's live in the stateless context 
which is not included in the context search. Is this why my simpleBean can 
not be found for injection into my containerBean? I'm not familiar with how 
seam and the ejb3 container interact during instantiation of these SLSB objects 
into pools - perhaps the beans are being created out of order? Perhaps I'm 
trying to do something way beyond the intention of the EJB3 SLSB specification. 
I'm pretty much resolved that what I'm trying to do here is not a great idea. 
Is there a different way to dynamically assign a reference to a SLSB to a 
different SLSB when a method is called? I would be very interested to hear 
other peoples insight and wisdom on the subject. Thanks in advance and kind 
regards.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034807#4034807

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034807
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Injection of a stateless session bean (SLSB) into anothe

2007-04-04 Thread trickyvail
Yes I have tried to annotate with In(create=true) and receive the second 
exception and stack trace.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034851#4034851

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034851
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - ROOT.war and virtual hosts

2007-03-30 Thread trickyvail
I am using JBoss AS 4.0.5

Under normal conditions my JBoss server makes the 
jbossweb-tomcat55.sar/ROOT.war directory available for static content. However 
as soon as I deploy an ear with a virtual host configuration I am unable to 
access this directory.

I've tried changing the name attribute of the host element inside the 
jbossweb-tomcat55.sar/server.xml file to reflect the hostname (as opposed to 
localhost) with no success.
Server
  | 
  | 
  | SNIP
  | 
  |   Engine name=jboss.web defaultHost=www.mydomain.com
  | 
  | 
  | Host name=www.mydomain.com
  | 
  |autoDeploy=false deployOnStartup=false deployXML=false
  | 
  |
configClass=org.jboss.web.tomcat.security.config.JBossContextConfig
  | 
  |
  | 
  | 
  | 
  |  /Host
  | 
  | 
  | 
  |   /Engine
  | 
  | 
  | 
  |/Service
  | 
  | 
  | 
  | /Server
  | 
  | 

I think this behavior has changed from previous versions of JBoss? Could anyone 
direct me to directions for preventing virtual hosting from breaking the 
default ROOT.war behavior?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=408#408

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=408
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Page Redirection with Seam Navigation

2007-03-28 Thread trickyvail
I would like to use JSF or Seam navigation rules to redirect page requests. 
This would avoid having to update all the other pages' references when a page 
changes location. I've tried variations of the following configuration:
FILE: /real/location/actual_page.page.xml
  | !DOCTYPE
  | page PUBLIC -//JBoss/Seam Pages Configuration DTD 1.1//EN
  | http://jboss.com/products/seam/pages-1.1.dtd;
  | 
  | page view-id=/imaginary/location/virtual_page.xhtml
  | navigation
  | rule
  | redirect view-id=/real/location/actual_page.xhtml/
  | /rule
  | /navigation
  | /page
But with no success. Sometimes I can get a 403 Error: Access to the requested 
resource has been denied, but more often I recieve a 404 Error: Resource not 
found. I have not created any access restrictions on the target file.

Any assistance is greatly appreciated, especially if someone knows a resource 
for instructiuons / examples of Seam navigation.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4032410#4032410

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032410
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Page Redirection with Seam Navigation

2007-03-28 Thread trickyvail
Thank you Gavin, that was the piece of the puzzle I was missing.

My final configuration in WEB-INF/pages.xml looks like:
page view-id=/virtual/path/to/alias_file.xhtml action=
  | navigation
  | rule
  | render view-id=/real/path/to/real_file.xhtml/
  | !-- or redirect --
  | /rule
  | /navigation
  | /page

When you create a granular configuration file like [page_name].page.xml the 
view-id attribute does not seem to have any effect. The view-id appears to be 
determined by the path and filename of the [page_name].pages.xml file. I 
presume this is the expected behavior?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4032535#4032535

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032535
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Stateless Session Beans - Static Variables - Concurrency and

2007-03-15 Thread trickyvail
I've been trying to find out what (if any) consequences there may be for 
implementing static class variables inside ejb3 stateless session beans. I've 
created some beans in this manner and they appear to function as I would expect 
on a standalone JBoss server, but I'm concerned that this technique may break 
clustering.

Essentially I'm trying to cache seldomly updated data (in the database) that is 
requested very frequently on the web front end.

@Stateless
  | public class CatalogBean implements Catalog
  | {
  | static boolean current = false;
  | static String data = null;
  | 
  | public void refresh()
  | {
  | current = false;
  | }
  | 
  | public String getData()
  | {
  | if(! current)
  | {
  | update();
  | }
  | return data;
  | }
  | 
  | private void update()
  | {
  | data = getDataFromTheDatabase();
  | current = true;
  | }
  | }

Beans that are responsible for CRUD call the refresh method on this stateless 
bean - in turn updating their shared cache. My (hazy) understanding is that the 
ejb container is responsible to  ensure that only one thread at a time can 
access a bean? Does this mean that different instances can be accessed 
concurrently - and therefore I could have syncronization issues? I suspect that 
static variables may be a bad idea - especially in a clustered environment.

Perhaps there is a different or recomended approach that I have not considered? 
Thank you in advance for all your comments and insights.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4028479#4028479

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4028479
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to implement cross cutting classes jar in a seam ear

2007-03-07 Thread trickyvail
Small note:

You need to make sure you have an empty seam.properties file in the root of 
your jar file so the seam components inside the jar will be deployed.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4025868#4025868

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4025868
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - How to implement cross cutting classes jar in a seam ear?

2007-03-06 Thread trickyvail
I'm trying to split my utility classes away into their own jar file so I can 
easily reuse them from different seam projects and maintain a single source 
tree. I've created a jar containing the classes but I have not been able to add 
the jar into my ear (or war) correctly.

I've tried a few different approaches with no success:

- adding the jar to project.ear/project.war/WEB-INF/lib (class not found)
- adding the jar to project.ear/ and adding a module tag inside application.xml 
(bean class has no local, webservice or remote interfaces defined)
- adding the jar to project.ear and adding a loader-repository tag inside 
jboss-app.xml (expected only one loader-repository tag)

Some of the classes inside my jar are seam components which is why I've posted 
this question in the seam forum. My project.ear is esentially a generic empty 
seam-gen project to which I've added my jar.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4025590#4025590

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4025590
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to implement cross cutting classes jar in a seam ear

2007-03-06 Thread trickyvail
I've got my utility classes working. Here's how:

Added utility.jar to the root of project.ear.

Edited project.ear/META-INF/application.xml and added
   module
  |   javautility.jar/java
  |/module

Thanks for yout reply, I was not seeing that this approach worked because I had 
introduced another similar error in a different part of the application.

This has lead me to seek an answer to another question. If you want to deploy 
fully fledged statefull or stateless ejb3 session beans would you use a tag 
like this (in application.xml):
   module
  |   ejbejb_bean_classes.jar/ejb
  |/module

I'll give it a try.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4025624#4025624

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4025624
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to use @Id @GeneratedValue(strategy=GenerationType.A

2007-03-01 Thread trickyvail
In Enterprise JavaBeans 3.0 (O'Reilly 2006) it states The AUTO strategy tells 
the persistence provider that you are allowing it to generate the key for you 
(page 94).

I don't specifically know the Hibernate implements this feature, but might I 
suggest that you utilize the features of your database to create primary keys 
instead.

With Postgresql you could use a mapping like this:

@Id
  | @Column(name = id, unique = true, nullable = false)
  | @SequenceGenerator(name=identifier, sequenceName=ppl_id_seq, 
allocationSize=1)
  | @GeneratedValue(strategy=GenerationType.SEQUENCE, 
generator=identifier)
  | @NotNull
  | public int getId()
  | {
  | return this.id;
  | }

In this manner Hibernate would assign primary keys from the Postgresql sequence 
rather than internally. This would allow Hibernate to play nicely with other 
database users.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4024423#4024423

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4024423
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - SessionBean Interface @Local Annotation

2007-03-01 Thread trickyvail
I was tracking down an error in my code and noticed that the Seam example code 
may be missing an annotation.

Specifically the ShoppingCart.java interface in the DVD Store example does not 
have a @Local annotation although it does appear to define a locally accessed 
stateful session bean.

Is the EJB3 @Local annotation superfluous when using Seam?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4024430#4024430

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4024430
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - SeamLoginModule EntityManager injection difficulties

2007-02-23 Thread trickyvail
I am running Seam version 1.1.6 on a JBoss 4.0.5.GA server.

While following the example from the Seam documentation (page 124) for creating 
a SeamLoginModule authentication method I have run into the following error:

09:37:41,228 ERROR [SeamLoginModule] Error invoking login method
  | javax.faces.el.EvaluationException: Exception while invoking expression 
#{authenticator.authenticate}
  | at 
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
  | at 
org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
  | at 
org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:74)
  | [SNIP]
  | at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.jboss.seam.RequiredException: In attribute requires value 
for component: authenticator.entityManager
  | at org.jboss.seam.Component.getInstanceToInject(Component.java:1920)
  | at org.jboss.seam.Component.injectFields(Component.java:1386)
  | at org.jboss.seam.Component.inject(Component.java:1156)
  | [SNIP]
  | ... 59 more

This suggests that Seam is unable to locate and inject the entityManager by its 
component name. The relevant java bean that the login component is calling is 
as follows:

@Name(authenticator)
  | public class Authenticator
  | {
  | @In EntityManager entityManager;
  | 
  | public boolean authenticate()
  | {
  | return true;
  | }
  | }

For completeness here, is the form that is calling the validation:
!DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  |   
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  | ui:composition xmlns=http://www.w3.org/1999/xhtml;
  | xmlns:s=http://jboss.com/products/seam/taglib;
  | xmlns:ui=http://java.sun.com/jsf/facelets;
  | xmlns:f=http://java.sun.com/jsf/core;
  | xmlns:h=http://java.sun.com/jsf/html;
  | template=layout/template.xhtml
  | 
  | ui:define name=body
  | 
  | h1Login/h1
  | pPlease login using any username and password/p
  | 
  | h:messages styleClass=message/
  | 
  | h:form
  | 
  | div class=dialog
  | div class=prop
  | span class=nameUsername/span
  | span class=value
  | h:inputText id=username 
value=#{identity.username}/
  | /span
  | /div
  | div class=prop
  | span class=namePassword/span
  | span class=value
  | h:inputSecret id=password 
value=#{identity.password}/
  | /span
  | /div
  | div class=prop
  |   span class=nameRemember me/span
  |   span class=value
  |   h:selectBooleanCheckbox id=rememberMe 
value=#{identity.rememberMe}/
  |   /span
  | /div
  | /div
  | 
  | div class=actionButtons
  | h:commandButton value=Login action=#{identity.login}/
  | /div
  |   
  | /h:form
  | 
  | /ui:define 
  | /ui:composition

I have also tried to annotate the EntityManager object in the following ways:
@In(entityManager) EntityManager entityManager;
  | 
  | @In(value=entityManager) EntityManager entityManager;
but have recieved the same error.

My configuration was generated by seam-gen and the authenticate method works 
fine until I try to inject an EntityManager into the component.

I will create a Stateful Session Bean in order to try to inject the 
EntityManager by the EJB3.0 annotation @PersistenceContext rather than Seam @In 
annotation.

Could this be caused by a filter loading order? I've looked at web.xml and it 
does not seem to be the cause. I think too that the identity component is a 
Seam component (ie. eats its own dogfood), therefore should not be a problem, 
Maybe the identity component is instantiated before other components like the 
entity manager?

P.S. Thank you Gavin King for all your past helpful answers.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021216#4021216

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021216
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: SeamLoginModule EntityManager injection difficulties

2007-02-23 Thread trickyvail
That worked like a charm.

This leaves me wondering how some of my other java bean componenets manage to 
have Seam inject the EntityManager (without create=true). I will assume some 
other component is instantiating it and outjecting it prior to those injection 
calls.

Thank you both very much.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021243#4021243

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021243
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: SeamLoginModule EntityManager injection difficulties

2007-02-23 Thread trickyvail
Thank you Gavin. I have made the change you recomended and it works perfectly.

For anyone else that is follwing this thread please note that I edited the 
components.xml file to include the following:

core:managed-persistence-context
  | name=entityManager
  | auto-create=true
  | persistence-unit-jndi-name=java:/NewSeamEntityManagerFactory
  | /
  | 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021367#4021367

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021367
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Tomahawk Setup and JSF Library Compatibility

2007-02-08 Thread trickyvail
Yesterday, I configured my JBoss Seam application to use Tomahawk JSF 
components.

I copied tomahawk.jar and commons-fileupload.jar to my 
$JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-lib directory. 
After adding these jars to the server I configured my web-xml file as described 
by the Tomahawk website (http://myfaces.apache.org/tomahawk/index.html).

Additionally I made the changes outlined on the Tomahawk wiki 
(http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk) to allow the use of 
these JSF components with Facelets.

I created a page with the calendar component and it appears to be working 
correctly.

After I had made these changes and tested the calendar component I discovered 
the Seam documentation (version 1.1.6.GA) states:
We do not recomend the use of the Tomahawk tag library.

Please comment on my use of the jbossweb-tomcat55.sar/jsf-lib directory for 
deploying the jar files. Is this considered part of the Server Classpath?

 Please briefly explain why the use of Tomahawk is not recomended and describe 
what kinds of problems might be encountered. Does this mean that Seam also 
precludes the use of other JSF tag libraries (eg IceFaces)?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4013189#4013189

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4013189
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Mapping entity primary key to Postgresql serial sequence

2007-01-03 Thread trickyvail
While testing an entity bean mapped to a Postgresql database table I recieved 
some duplicate key violates unique constraint errors. The errors occured 
during concurrant access to the database by jboss and psql using different 
database roles. After setting the SequenceGenerator annotation attribute 
allocationSize = 1 this issue was resolved.


  | // database table
  | CREATE TABLE people (
  | id SERIAL PRIMARY KEY
  | , name VARCHAR(32)
  | );
  | // CREATE TABLE will create implicit sequence people_id_seq for serial 
column people.id
  | 
  | // entity bean
  | @Entity
  | @Table(name = people, schema = public)
  | public class People implements Serializable
  | {
  | private static final long serialVersionUID = 1234L;
  | private int id;
  | private String name;
  | 
  | public People() {}
  | 
  | @Id
  | @SequenceGenerator(name = identifier, sequenceName = people_id_seq, 
initialValue = 1, allocationSize = 1)
  | @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = 
identifier)
  | @NotNull
  | public int getId()
  | {
  | return id;
  | }
  | 
  | public void setId(int id)
  | {
  | this.id = id;
  | }
  | 
  | @Column(name = name, length = 32)
  | @Length(max = 32)
  | public String getName()
  | {
  | return this.name;
  | }
  | 
  | public void setName(String name)
  | {
  | this.name = name;
  | }
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3997615#3997615

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3997615
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user