[jboss-user] [JBoss Seam] - Re: Any way to invoke Seam method from an applet?

2007-08-17 Thread SmokingAPipe
It's not difficult to do it. One option: Pass the session identifier in to the applet as a parameter. Another possibility is to have the applet use NSObject to execute JavaScript. I haven't actually tried either of these. View the original post :

[jboss-user] [JBoss Seam] - Re: Application config file outside the EAR

2007-08-17 Thread SmokingAPipe
No ideas on this? It sure would be nice to have a properties file somewhere in JBoss that is external to the EAR that lets me define parameters that are visible to Seam. Like the location of an uploads directory, etc. View the original post :

[jboss-user] [JBoss Seam] - Re: Application config file outside the EAR

2007-08-17 Thread SmokingAPipe
I could do that, but isn't the app classpath all within the EAR? I want to be able to ship out an EAR file on a CD and have the sysadmin (who knows nothing about any of this stuff) be able to copy it into a directory and say, I'm done. My idea right now is to try to do this the JBoss Way.

[jboss-user] [JBoss Seam] - Re: Application config file outside the EAR

2007-08-17 Thread SmokingAPipe
From reading a bunch of pages on the Wiki it looks like what I need to do is set up a SAR with a simple persistent xmbean in it. Then I need to have my application EJBs find and connect to the mbean that's in the SAR. A bit cumbersome but a workable solution. Is this the right way to go?

[jboss-user] [JBoss Seam] - Re: Application config file outside the EAR

2007-08-17 Thread SmokingAPipe
I just got my SAR working and it is persistent. Now I have to get access to the SAR's mbean from within the EAR. That seems like that should be easy. And the persistent SAR itself was pretty easy, and this is a nice way to do all this, so config parameters can be used from the jmx-console.

[jboss-user] [JBoss Seam] - Re: Application config file outside the EAR

2007-08-17 Thread SmokingAPipe
Actually using MBeans is better than just having it read a config file somewhere. With the bean, I get to store properties, and yes, that is more cumbersome than putting them in a config file. But I get to do more: I can have the bean not only store the path to the file storage directory, but

[jboss-user] [JBoss Seam] - Re: Build system

2007-08-17 Thread SmokingAPipe
The IDE tools need to catch up with the power of Seam. One thing for catching facelet file validity: I have a task in my ant build.xml file which creates an exploded EAR file. That is what I deploy during development. I have another task in the build.xml file which pushes all the current

[jboss-user] [JBoss Seam] - Application config file outside the EAR

2007-08-14 Thread SmokingAPipe
Simple question: What is the way to store application configuration information outside the EAR file? For example: my app allows users to upload lots of content. I'll be storing this in the filesystem, not the DB (I know, there are pros and cons to both approaches). There are a few other

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-31 Thread SmokingAPipe
I was too quick when I said it works. It works most of the time, but not all the time. I get errors like: javax.faces.FacesException: javax.el.ELException: /layout/menu.xhtml @12,51 rendered=#{s:hasRole('admin')}: Function 's:hasRole' not found | at

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-31 Thread SmokingAPipe
It seems to be happening when I invoke an action from that page by clicking a button, which hits some action in my FooHome extends EntityHome object. I can research this some more if it would help. View the original post :

[jboss-user] [JBoss Seam] - Re: Some doubts about Seam

2007-07-31 Thread SmokingAPipe
To answer your questions: 1. Seam works with either EJB3 or Hibernate. I'm using EJB3 in my projects because EJB3 is a standard. I think that Hibernate itself is a bit more powerful in what it can do. Under the hood, JBoss EJB3 is based on Hibernate I believe. 2. Don't use Tomahawk. I

[jboss-user] [JBoss Seam] - AJAX question: how to dynamically add fields to a form?

2007-07-31 Thread SmokingAPipe
Simple question here: A user has to enter a series of serial numbers on a form. We don't know in advance how many serial numbers the user will enter. It could be five or fifty. What would be cool is if a new text field would get added when the last empty one is filled in. I'm sure there's

[jboss-user] [JBoss Seam] - Re: AJAX question: how to dynamically add fields to a form?

2007-07-31 Thread SmokingAPipe
Actually I mean DHTML, not AJAX. Anyway, in this case, it might be better for me to have a scrollable panel that opens up, and provide a couple hundred number fields, and be done with it. Easy to implement, and if we need something more advanced later, I'll change it. View the original post

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
And it looks like the problem is in org.jboss.seam.util.EL: | import com.sun.el.ExpressionFactoryImpl; | import com.sun.el.lang.VariableMapperImpl; | which means that Seam is still dependent on the Sun EL RI, while JBoss AS has switched, and packaging the Sun RI in the EAR causes

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
Further checking, the Sun RI is used in only two files in Seam: ./main/org/jboss/seam/util/EL.java:import com.sun.el.ExpressionFactoryImpl; | ./main/org/jboss/seam/util/EL.java:import com.sun.el.lang.VariableMapperImpl; | ./main/org/jboss/seam/jsf/SeamELFunctionMapper.java:import

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
[EMAIL PROTECTED] wrote : I think you may need to have that JAR around. It seems like that jar would mess up other things. Reading Michael Yuan's blog: http://www.michaelyuan.com/blog/2007/05/29/seam-book-examples-updated-to-jboss-as-420-ga/ There is now a JIRA open on it:

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
By the way this shows why classes which are not public should not be labeled public. My guess is that com.sun.el.*Impl should have default permissions so external projects couldn't specify them directly. View the original post :

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
When I put the jars in the war/WEB-INF/lib, I get: SEVERE: Error Rendering View[/index.xhtml] | com.sun.facelets.FaceletException: Could not instantiate feature[compiler.ExpressionFactory]: org.jboss.seam.ui.facelet.SeamExpressionFactory | at

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
I put el-ri.jar in the WEB-INF/lib, and got the same java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl. I then put the el-ri.jar directly in the ear, and added it as a module in application.xml, and... it works! I tested it and it lets me run the restricted factory method. I

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
Yes, it's AS 4.2.1 GA. Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4068890#4068890 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-30 Thread SmokingAPipe
Built on Friday the 13th, note! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4068891#4068891 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068891 ___ jboss-user mailing list

[jboss-user] [JBoss Seam] - Design question: Why use @Name on Entities?

2007-07-30 Thread SmokingAPipe
Simple question: I'm using EntityHome objects to manage a bunch of entities. Therefore I have FooHome to manage Foos, etc. Of course FooHome has to have a @Name annotation: @Name(fooHome) for it to be a Seam component. I can do all my stuff to Foos using fooHome.instance. And if I want to

[jboss-user] [JBoss Seam] - Why no @Local interface for EntityHome sub-classes?

2007-07-29 Thread SmokingAPipe
Simple question: When I create a session bean, I need to create the bean itself, and then an interface for the bean, with a @Local tag. For example, FooAction, and then @Local interface Foo. This is probably an obvious question, but... Why is no interface needed with actions which extend

[jboss-user] [JBoss Seam] - Re: /lib directory in EAR with Seam, JBoss 4.2

2007-07-29 Thread SmokingAPipe
Cool, that eliminates all the possible bugs of making a mistake in the application.xml list of modules. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4068566#4068566 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068566

[jboss-user] [JBoss Seam] - Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDef

2007-07-29 Thread SmokingAPipe
I have a factory method that is restricted, like this: @Out(required=false) ListUser userList; | | @Factory(userList) | @Restrict(#{s:hasRole('admin')}) | public void listUsers() { | This is the first time I have tried using @Restricted, so it's not like other

[jboss-user] [JBoss Seam] - Re: Seam 1.2.1, AS 4.2.1, @Restricted method gives NoClassDe

2007-07-29 Thread SmokingAPipe
I looked some more and the missing class is defined in el-ri.jar . But I thought that that jar should no longer be used in JBoss 4.2.1. This means that some Seam class is compiled to look for the com.sun.el.ExpressionFactoryImpl class. Is there a work-around for this? Everything else is

[jboss-user] [JBoss Seam] - /lib directory in EAR with Seam, JBoss 4.2

2007-07-28 Thread SmokingAPipe
Simple question: Seam requires a ton of jar files to handle everything like JBoss Rules, etc. It's annoying to have to list them all as modules in the application.xml. I know that the latest version of the EAR standard says that I can put JAR files in a /lib directory in the EAR. Is that

[jboss-user] [JBoss Seam] - Re: external authentication-any pointers for a beginner?

2007-07-28 Thread SmokingAPipe
This is a very interesting thread, I will be following closely. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4068507#4068507 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4068507

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-25 Thread SmokingAPipe
I've looked through all the detailed logs. It is completely strange. It does in fact identify that there is a test component, it just never installs it and doesn't say why. Is there any way to solve this? I assume I'm not the first to try Seam 1.2.1 with JBoss 4.2.1? What's strange is that

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-25 Thread SmokingAPipe
I got it working, using: http://chiralsoftware.com/blog/PropertyNotFoundException-Target-Unreachable-identifier-resolved-to-ead71296c05a98ec.html blog entry Conclusion: Wrong seam jar file in WEB-INF/lib. I'm not sure how that prevented the ejbs from being installed, but it did. Debugging

[jboss-user] [JBoss Seam] - Re: How to setup Seam 1.2.1 with JBoss 4.2.1?

2007-07-25 Thread SmokingAPipe
tonylmai wrote : Hello all, | | I've just upgraded JBoss to 4.2.1. How do I get configure Seam 1.2.1GA to work with JBoss 4.2.1? I remember reading some postings about not needing to run jems installer. | | Can someone help? | | Thanks AFAIK the JEMS installer is gone as of 4.2.

[jboss-user] [JBoss Seam] - Re: The Right Scope

2007-07-25 Thread SmokingAPipe
My understanding is that conversation scope is almost always the right scope. If you're doing a search, you want conversations so that users can do multiple different searches in different tabs, right? View the original post :

[jboss-user] [JBoss Getting Started Documentation] - Re: Has anyone gotten this to work with 4.2.1GA??

2007-07-24 Thread SmokingAPipe
It is not easy. This is what I went through to get a plain old seam-gen app to work within JBoss 4.2.1: http://chiralsoftware.com/blog/JBoss-Application-Server-with-Java-6-ab298ea104a78da7.html View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067253#4067253

[jboss-user] [JBoss Seam] - Re: How to setup Seam 1.2.1 with JBoss 4.2.1?

2007-07-24 Thread SmokingAPipe
How are you getting Seam to manage your entities? I am trying everything I can think of and none of the entities are showing up within any Seam context. It's strange because I was able to modify a seam-gened app to work, but my own app, it's like the EJBs aren't there at all. View the

[jboss-user] [JBoss Seam] - Re: How to setup Seam 1.2.1 with JBoss 4.2.1?

2007-07-24 Thread SmokingAPipe
It's quite agonizing. Seam is an incredible system, but realistically it can take a week or more just to configure an application to say hello world, unless seam-gen managed to get it right. With JBoss 4.2.1, seam-gen needs a lot of help to work. View the original post :

[jboss-user] [JBoss Seam] - Any way to debug why Seam isn't registering a component?

2007-07-24 Thread SmokingAPipe
I have a JAR file with what I think are Seam components in it. The thing is, none of them are being registered to Seam. I'm beating my head against the wall here. Is there some way to force Seam to register a component, or else is there some way to ask Seam why it didn't scan components from

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-24 Thread SmokingAPipe
I'm using 1.2.1. I'm having a devil of a time with it, so I'm not even going to try to use pre-release stuff right now. There is definitely a components.xml in META-INF and Seam is scanning it. I setup a component like this: | factory name=remoteAddr auto-create=true |

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-24 Thread SmokingAPipe
Ah... let's see, how do I start it in debug mode? This might solve my problems. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067272#4067272 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067272

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-24 Thread SmokingAPipe
And by the way, Christian, you are partially responsible for me being in this mess because I wouldn't have gotten launched into the whole ORM thing if I hadn't read the first edition of your book! I read it, realized that I had to be using ORM because trying to mess around with SQL in an

[jboss-user] [JBoss Seam] - Re: Any way to debug why Seam isn't registering a component?

2007-07-24 Thread SmokingAPipe
Thanks for the hint on enabling debugging. Now it is getting stranger, because it is finding the components: | 21:38:36,965 DEBUG [Scanner] found: rbcworkflow/beans/TestAction.class | 21:38:36,967 DEBUG [ComponentScanner] found component class: rbcworkflow/beans/TestAction.class | So

[jboss-user] [JBoss Seam] - Is Seam compatible with JBoss 4.2.1?

2007-07-23 Thread SmokingAPipe
I've been trying for two days to get a Seam app, with some very simple persistent EJB3 entities, to run within JBoss 4.2.1. Is this even possible? If anyone has an example of a .ear file that uses Seam that will run in JBoss 4.2.1 please let me know. I'm also trying to use Seam-gen. I'm

[jboss-user] [Installation, Configuration DEPLOYMENT] - Weird problem: can't start JBoss AS

2007-07-22 Thread SmokingAPipe
I'm sure this is some minor system config issue, but I'm puzzled. I unzipped JBoss AS 4.2.1 and run it and it fails with this exception: 17:17:14,000 WARN [BasicMBeanRegistry] javax.management.MBeanRegistrationException: preRegister() failed:

[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Weird problem: can't start JBoss AS

2007-07-22 Thread SmokingAPipe
Really, is JBoss 4.21 that unhappy with Java 6? That's a bit annoying given how much faster Java 6 is, and it has been out for over a year now. But I'll try it. What's strange is that my other computer is running Java 6 and it lets JBoss 4.2.1 start up. Hmm. View the original post :

[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Weird problem: can't start JBoss AS

2007-07-22 Thread SmokingAPipe
It's a trivial problem. The identity that JBoss is looking for must be in /etc/hosts. http://chiralsoftware.com/blog/JBoss-Application-Server-with-Java-6-ab298ea104a78da7.html View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4066521#4066521 Reply to the post

[jboss-user] [Installation, Configuration DEPLOYMENT] - Re: Weird problem: can't start JBoss AS

2007-07-22 Thread SmokingAPipe
Or, properly formatted link: http://chiralsoftware.com/blog/JBoss-Application-Server-with-Java-6-ab298ea104a78da7.html View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4066523#4066523 Reply to the post :

[jboss-user] [JBoss Seam] - PropertyNotFoundException?

2007-07-20 Thread SmokingAPipe
I have an EJB application, which uses a Swing desktop interface. I'm finding that, while Swing can produce better UIs than are possible in web apps, developing in Swing is slower and more painful than developing in good ole' JBoss Seam (side note: it would be super-cool if there were some

[jboss-user] [JBoss Seam] - Re: Gavin, Can you tell me how run seam2.0 on tomcat6 ???

2007-07-20 Thread SmokingAPipe
I haven't tried running Seam outside of JBoss (ie in standalone) and I haven't yet tried Seam 2. I'll try Seam 1.21 in standalone with EJB3 embedded at some point. It would be quite useful to get that working. Sometimes I really want to use the neat features of Seam and EJB3 without

[jboss-user] [Management, JMX/JBoss] - Run a task the 1st of the month?

2007-03-22 Thread SmokingAPipe
Is there any way to do this within JBoss, ie, to have a task that runs on some specific day of the month? I can see in the scheduler documentation (http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch10.html#ch10.sched) that I could have it call a method every 24 hours, for example, so an easy

[jboss-user] [JBoss Seam] - Doing a batch update after a persist

2007-03-20 Thread SmokingAPipe
I'm getting a constraint violation exception. Here's what's going on: 1. I create a new entity, and persist it, using the SMPC. 2. I then do a batch update: entityManager.createQuery().executeUpdate(). This query changes all the objects in a class to have a value that is the new entity that

[jboss-user] [JBoss Seam] - Re: Doing a batch update after a persist

2007-03-20 Thread SmokingAPipe
I'm wondering if it's related to: http://jboss.com/index.html?module=bbop=viewtopicp=3893197 Any ideas would be welcome. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029645#4029645 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Doing a batch update after a persist

2007-03-20 Thread SmokingAPipe
I found the solution: do an entityManager.flush() after doing the persist(), to flush the new entity to the underlying DB, so that Postgres will be at peace with the universe. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029653#4029653 Reply to the post :

[jboss-user] [EJB 3.0] - No joins on an update

2007-03-20 Thread SmokingAPipe
I'm trying to do a bulk update query like this: update Foo | set status = 99 | where address.city = :x | This isn't working. It's throwing an SQL error: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute update query |

[jboss-user] [EJB 3.0] - sum() returning null?

2007-03-19 Thread SmokingAPipe
I'm doing an EJB query, where I'm getting the sum of a value of some objects. If that query doesn't match any objects (rows), the value being returned is null. Does this make sense, or is there some other problem in my query? View the original post :

[jboss-user] [EJB 3.0] - Re: sum() returning null?

2007-03-19 Thread SmokingAPipe
I did some experiments with some more queries, and indeed, it looks like if you take the sum() of an empty set of objects you get null, not zero. I just checked it and I get the same behavior in SQL itself. View the original post :

[jboss-user] [JBoss Seam] - SwingWorker and the Event Dispatcher Thread

2007-03-04 Thread SmokingAPipe
One of the main reason incorrectly-written Swing apps are bad is that people do work on the event disptach thread (EDT). They'll have some event handler which loads and parses the file right within the event dispatcher itself. If the file can load and parse in 0.05 seconds, fine, but if it

[jboss-user] [JBoss Seam] - Re: IDE for Seam

2007-03-04 Thread SmokingAPipe
I'd love to see a NetBeans module that could handle all this. Right now I'm using NetBeans as my IDE but it's not doing anything Seam-specific for me. I'd double-plus love to see a Matisse-style GUI builder that links to Seam components in some way. But Seam and Matisse and all that are all

[jboss-user] [JBoss Seam] - Re: SwingWorker and the Event Dispatcher Thread

2007-03-04 Thread SmokingAPipe
Well, SwingWorker itself is a lot different from just handling things asynchronously. It's a thread class that you sub-class, and you have a few methods: doInBackground: When the SwingWorker is executed, this is the part that starts running. Obviously it happens in a thread so the GUI keeps

[jboss-user] [JBoss Seam] - Re: SwingWorker and the Event Dispatcher Thread

2007-03-04 Thread SmokingAPipe
Ahh, ok, I said I was a Seam newbie and now it is confirmed. I need to look up @Asynchronous because from the name of it, that sounds like what I want. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4024932#4024932 Reply to the post :

[jboss-user] [Security JAAS/JBoss] - Re: Anyone get JAAS working with remote entities?

2007-02-16 Thread SmokingAPipe
Ok, now I am finding out more: it seems like the security check doesn't happen until a secured method is invoked, and if the security check fails, it just throws an exception. This seems ridiculous, but that's what I'm finding in docs like this:

[jboss-user] [Security JAAS/JBoss] - Re: Compare a VarBinary Password

2007-02-16 Thread SmokingAPipe
Why are you using var binary for storing a password? Why not just store it as chars and use some reasonable encoding, like UTF-8? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4017984#4017984 Reply to the post :

[jboss-user] [Security JAAS/JBoss] - Re: Compare a VarBinary Password

2007-02-16 Thread SmokingAPipe
Oh and to answer your question: It sounds to me like you might need to write a custom subclass of one of JBoss's LoginModule classes. It's not hard to do. But what you're doing doesn't sound like it makes sense. If your passwords are hashed, you should hex encode them before storing them,

[jboss-user] [Security JAAS/JBoss] - Anyone get JAAS working with remote entities?

2007-02-15 Thread SmokingAPipe
I'm trying to get JAAS to work with remote connections to a server. What happens is it needs to make an initial connection without any login information. It checks some status things on the server. If that's ok, it then can send login information. Due to user errors it's possible that a

[jboss-user] [Security JAAS/JBoss] - Re: Anyone get JAAS working with remote entities?

2007-02-15 Thread SmokingAPipe
I found out what was happening, sort of: the thread that's creating my InitialContext just silently dies. I don't get it. The thread itself collapses. I put: InitialSystem.out.println(start); | Context context = new InitialContext(properties); | System.out.println(done.); I see the

[jboss-user] [Security JAAS/JBoss] - Re: Anyone get JAAS working with remote entities?

2007-02-15 Thread SmokingAPipe
And I found out the problem: The thread died because some jar wasn't in the path. This is bad for a thread to die silently, and it is a bug in Java, but oh well, I got that fixed. Now I have the whole thing working as long as the password is correct for the login. This is big progress. But

[jboss-user] [Security JAAS/JBoss] - Re: Anyone get JAAS working with remote entities?

2007-02-15 Thread SmokingAPipe
This system is madenning. Who could write a whole security infrastructure but not provide a way for a user to do a simple username / password login like people have been using for the past several decades? All I want is to be able to log in and use JNDI to look up remote objects, but if the

[jboss-user] [EJB 3.0] - Using a JoinTable, getting unique constraint violtions

2007-02-14 Thread SmokingAPipe
Let's say I'm making an accounting system. I have Invoices, and on Invoices I have Products. Every invoice can have a set of one or more products, and there could be duplicates. Every product could show up on any number of invoices. The relationship is uni-directional. The Product doesn't

[jboss-user] [EJB 3.0] - Re: Using a JoinTable, getting unique constraint violtions

2007-02-14 Thread SmokingAPipe
I figured out the problem, but not the solution. Here's the problem: I have a uni-directional Collection in my Invoice: @Entity class Invoice { | |@OneToMany CollectionProduct getProducts(); | | } This results in creating a join table, with a unique constraint on the product_id

[jboss-user] [EJB 3.0] - Re: Using a JoinTable, getting unique constraint violtions

2007-02-14 Thread SmokingAPipe
I ended up creating a placeholder entity. If that's the only way to do this, that's an unfortunate defect in the EJB3 spec. If there is some way please let me know. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016724#4016724 Reply to the post :

[jboss-user] [EJB 3.0] - Not understanding detached entities and merge()

2007-02-14 Thread SmokingAPipe
Here's the situation: I have an entity that refers to other entities, like this: @Entity public class Invoice implements Serializable { |@ManyToOne private transient Customer customer; | } It must implement Serializable so I can send it to message queues. I labeled the customer field

[jboss-user] [EJB 3.0] - Re: Not understanding detached entities and merge()

2007-02-14 Thread SmokingAPipe
So what do I want to use to re-attach a detached entity? I think in Hibernate I would use session.refresh(entity). What would it be in EJB3? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016813#4016813 Reply to the post :

[jboss-user] [JBoss Seam] - Re: seam-gen enhancement

2007-02-13 Thread SmokingAPipe
Speaking of SeamGen: I have one small bug fix for it: The Linux shell script should start with #!/bin/sh, not #/bin/sh. Without the #!, it doesn't execute poperly for tcsh users. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4016092#4016092 Reply to the

[jboss-user] [JBoss Seam] - Re: Outjection problems with interface variables

2007-02-11 Thread SmokingAPipe
I'm pretty sure I know what's going on. Your interface is not a Seam-managed entity. Therefore the Seam-entity's scope specification doesn't apply to it. But when you use the real Seam entity, and not the interface, then those rules DO apply and you can't outject it to a wider context than

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
And I tried something like this: @TransactionManagement(TransactionManagementType.BEAN) | public class . | | @Resource SessionContext sessionContext; | | public void beanSend() { | final UserTransaction userTransaction = sessionContext.getUserTransaction();

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
I gave up on it, and put everything that I need into Serializable fields. This is unfortunate that I can't find out how to attach it to an EntityManager from within the MDB, but I've tried a bunch of stuff all evening and nothing works. Any suggestions would be welcome. View the original

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
And just for fun I also tried events.raiseTransactionSuccessEvent() and that just threw a NullPointerException. I would guess that that method would raise an event that happens AFTER the method / transaction is finished, which is what I want to happen, but it's just throwing

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
Ah it's always the little things that make the big differences. I'll try that. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4013697#4013697 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4013697

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
I tried that and IT WORKED! The message-sending method gets called after the transaction has committed successfully and then the message processor can see the entity in the persistence context, as is needed. My one suggestion would be, in the raiseTransactionSuccessEvent, if the

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
[EMAIL PROTECTED] wrote : This is very dangerous stuff. Hibernate entities should never be used in two concurrent transactions/persistence contexts. You will need some kind of DTOish thing to work around. Wait are you saying that even if I use this events trick to send the message AFTER the

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-09 Thread SmokingAPipe
Cool, thanks for letting me know because I would just be guessing otherwise. Now my final dumb question: What's the right way to re-attach an entity? This entity has been serialized, so all its collections have been lost (they are marked transient). If I go entityManager.merge(myEntity) I

[jboss-user] [JBoss Seam] - Re: Building Seam CVS with ant build

2007-02-09 Thread SmokingAPipe
Java 6 is noticably faster than earlier versions in general use. I use it with NetBeans and it's nicer. I think startup of JBoss is also faster. There are problems running JBoss with Java 6! The main problems that I have encountered are that JBoss unfortunately includes many JARs for

[jboss-user] [JBoss Seam] - DataModelSelection and components.xml

2007-02-08 Thread SmokingAPipe
Let's say I use the super-handy feature of components.xml with something like this: factory name=logList value=#{queryLogList.resultList}/ | framework:entity-query name=queryLogList | ejbql=from LogMessage lm max-results=100 / | But what if I want to have a

[jboss-user] [JBoss Seam] - SMPC and forcing a transaction to commit

2007-02-08 Thread SmokingAPipe
Here's the situation: I have a Seam SFSB which creates an entity and persists it. It does this using a SMPC. The method that does the persisting also sends the same entity to a message driven bean (MDB) on this same server. The MDB needs this entity to be attached so it can look at various

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-08 Thread SmokingAPipe
Actually one crazy thing I could do is inject the plain old EntityManager that isn't the SMPC and use that to do the persist, and then I suppose the MDB will see the Entity, because it will be using the same EM. Would that work? View the original post :

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-08 Thread SmokingAPipe
Tried that and it didn't work. Obviously even if I'm using the old @PersistenceContext annotation, I'm still bound to use the transaction created by Seam or the container so I can't do a commit() while the method is still running. Hmmm. View the original post :

[jboss-user] [JBoss Seam] - Re: SMPC and forcing a transaction to commit

2007-02-08 Thread SmokingAPipe
I just now tried to use an @Observer. It was in the same class as the class that is doing all this. Anyway, the @Observer got triggered but it acted just like a regular function call, in other words, it happened within the method's transaction. Surely there's some way to do some things AFTER

[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread SmokingAPipe
Action can be a call to a method in a session bean. If that method returns a string, that string is used as the view identifier. If that method has no return (void) or it returns null, then the view specified by view= is used as the view. If the action returns null AND there is no view=,

[jboss-user] [JBoss Seam] - Re: Issues moving from Seam 1.1.0 to Seam 1.1.5

2007-02-07 Thread SmokingAPipe
Call me old fashioned but I'm in the camp that says that the logging system should be brain-dead-simple and should never cause errors and should always work. It exists to debug and diagnose other problems. I shouldn't have to debug and diagnose it. Now, what's happening here is we need TWO

[jboss-user] [JBoss Seam] - Re: Who uses EntityHome objects?

2007-02-07 Thread SmokingAPipe
I'm going to start using them. Most of the grunt work is the same all over the place so it would be cool if I can get it all from one class. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4012645#4012645 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Issues moving from Seam 1.1.0 to Seam 1.1.5

2007-02-07 Thread SmokingAPipe
In my experience, I end up deleting most of my logging statements as I finish pieces of code. They help me a lot when I'm trying to get the basic code going. I might put 5 log statements in a simple method sometimes, if I really can't figure out why it's not working. After I get it fixed I

[jboss-user] [JBoss Seam] - Re: how to trace failed entityManager injection?

2007-02-07 Thread SmokingAPipe
What else is going on in components.xml? I'm guessing your EM is not being attached to your DS correctly. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4012860#4012860 Reply to the post :

[jboss-user] [JBoss Seam] - Re: view vs action attribute (Explanation needed)

2007-02-07 Thread SmokingAPipe
Of course it should render editUser.xhtml in your example. That is the action you have specified. In most cases the action is a snip of EL that gets called, and the string that results from that call is used as the next view. In your case, you have used a static string instead of EL. It's

[jboss-user] [JBoss Seam] - SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Simple problem: I want to have a selectonemenu where the labels are strings (as usual) and the values are objects. For example, let's say that the user can go to a checkout page and select a shipping address: home, business, or other. Those have labels, but the value is an Address object.

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
COOL! That's exactly what I'm talking about. A select menu where the values are entities. This is a pretty common usage but it's not something which is handled well in any of the existing systems (whether JSP, JSF, or even PHP or whatever). If there's a good Seam solution that would be

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Ok I may go ahead and try that. Btw here's the link: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItemsNewDesign View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4011780#4011780 Reply to the post :

[jboss-user] [JBoss Seam] - Re: Multiple DataModels in an SFSB

2007-02-06 Thread SmokingAPipe
I have had multiple DataModels in SFSBs and had no problems, but I have always used @DataModel on a variable, not on a method. Also I would think that @Factory and @DataModel should not be on the same thing. Try putting your @DataModels as variables, and leave your @Factorys on the

[jboss-user] [JBoss Seam] - Re: A time picker?

2007-02-06 Thread SmokingAPipe
I'm just going to do this in the simple way, which is setting components in the SFSB and then having the SFSB handle it when persist() or whatever is called. At some point when a time picker is packaged and ready to go I'll try it. View the original post :

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Quick question: I'm using SMPC but my EntityManager is not named entityManager. What do I put in my components.xml to fix that? I'm eager to try this now because it looks like exactly the right way to do this. I guess I will switch to 1.1.5 in the near future so I'll try that also. View the

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
I tried it like this: selectitems:config entity-manager=#{smpc} / | | component name=smpc | class=org.jboss.seam.core.ManagedPersistenceContext | property name=persistenceUnitJndiNamejava:/EntityManagerFactories/smpcData/property | /component | and

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Ok, I had a few problems, which I sorted out (I still have a lot of problems but at least these are now sorted). First, if I'm using an unusual name for the entityManager, I need to do this: framework:entity-query entity-manager=#{smpc} name=queryStoreList ejbql=from Store s / and then I need

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
I looked at the HTML output and I can see that the option values are being correctly set as the entity IDs. So, now I really don't understand this. Hmm. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4012200#4012200 Reply to the post :

  1   2   3   4   >