[JBoss-user] [EJB 3.0] - The Transfer Object Pattern

2006-05-23 Thread treespace
EJB 2.0 best practices suggested a design pattern where data and behavior were were treated as independent concerns. Stone Age Development (SAD) using structs and procedural programming sounded bad so they were dubbed Transfer or Value Objects, emphasis on "Object". My EJB 3.0 entities are now

[JBoss-user] [EJB 3.0] - Re: @EJB and @Service Race Condition

2006-04-07 Thread treespace
I'm using 4.0.4 RC1 but not sure what EJB3 version it has. Will try CR2 (looks like release candidate is now candidate release) which is now available. I'm doing bee = getEJB("foo") using my own generic lookup method so it's pretty clean, but @EJB beats that and it's less error prone. View th

[JBoss-user] [Management, JMX/JBoss] - Create method is not called on Service bean

2006-04-04 Thread treespace
I have a service bean Special that depends on service bean Core. The special bean loads and the core bean is injected without a hiccup. I have print statements that show the create and start methods of Special are called. Core create and start methods are not called. Special is definitely there.

[JBoss-user] [EJB 3.0] - @EJB and @Service Race Condition

2006-04-04 Thread treespace
The injection fails because A is loaded before B and there's no B to stuff in variable "bee". | @Service ... A | { |@EJB B bee; | | I can use @Depend to load Service beans in order but what about mingled EJBs and Service beans where they call each other? I need bean-lev

[JBoss-user] [EJB 3.0] - Re: Shared Memory in EJB Container

2006-04-04 Thread treespace
Coherence is short for "ensuring consistency across all of the constituent parts". SLSBs have to behaive exactly the same regardless of which instance you get or where that instance lives. This is from the trailblazer on JMX which is why I think the Service bean is the way to go: Different fr

[JBoss-user] [EJB 3.0] - @Service annotation attributes

2006-04-03 Thread treespace
What's the difference between the "name" attribute and the "objectName" attribute in org.jboss.annotation.ejb.Service? Given they are both optional what is the default name? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934579#3934579 Reply to the post :

[JBoss-user] [EJB 3.0] - Re: Shared Memory in EJB Container

2006-04-03 Thread treespace
I was aware that state in a SLSBs was fine provided it was not conversational state between the client and the server. I dissmissed that option because the SLSBs are pooled and in my case clustered. Does an EJB container maintain coherence in SLSBs? If so that reall is a viable option. View th

[JBoss-user] [EJB 3.0] - Re: Shared Memory in EJB Container

2006-04-02 Thread treespace
It appears there is no such beast. You have to use the session context of a web application to host distributed applications. There is no shared context in Java EE that would allow a Swing front end to share code with a Web front end or a Web Services interface or an MDB driven interface. The

[JBoss-user] [EJB 3.0] - Re: Attaching and dettaching EJB3 Entities

2006-04-02 Thread treespace
They may be nothing more than decorative ornaments on the client side but the class loader will need to load runtime and class-resident annotations. That sets up a dependency right out of the box. That a class is required to extend a specific super type is what makes something lose its PO qualit

[JBoss-user] [EJB 3.0] - How are entity beans detached?

2006-03-31 Thread treespace
How are local entity beans detached? The local session bean uses the entity manager to find and return an entity bean. What mechanism is responsible for detaching that bean prior to returning it to, say , the web tier. Corollary: what is the "injection" mechanism? I know annotations trigger the

[JBoss-user] [EJB 3.0] - Shared Memory in EJB Container

2006-03-30 Thread treespace
I have a service interface created with EJBs. I have a web application that uses those services but it's optional. What is the business tier equivalent of the servlet session context? JNDI? I am building up a data structure from the database so it has no direct persistence mapping. I want to k

[JBoss-user] [EJB 3.0] - Re: Auto-increment in MySQL and J/Connector

2006-03-28 Thread treespace
CachedRowSet also fails with Decimal. ResultSet works fine. Obviously there are serious compatibility problems with the MySQL driver (3.2.12) and JDBC 3.0 (an official part of Java 5.0. MySQL 5.0 beta driver also fails. View the original post : http://www.jboss.com/index.html?module=bb&op=view

[JBoss-user] [EJB 3.0] - Auto-increment in MySQL and J/Connector

2006-03-28 Thread treespace
My entity beans are working just fine with MySQL and auto-increment keys. When rendering 2D view-only tables, however, you don't want to marshall a bean only to flatten it again. I use CachedRowSet for that job but it blows up with an 'unknown type 16' exception on the auto-increment keys. se

[JBoss-user] [EJB 3.0] - Re: Initializing a new entity bean with relations

2006-03-27 Thread treespace
First part of answer is you can use any old list since otherwise it's not a POJO. Second, you initialize your own collections or pre-check for null. Pre-initializing is the lesser of two evils. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933014#3933014

[JBoss-user] [EJB 3.0] - Initializing a new entity bean with relations

2006-03-27 Thread treespace
I have a new entity Author and want to add a Book. The book list is empty which generates an exception in author.getBooks().add( new Book() ). Two questions. First, can any old List implementation be used to initialize the list? My impression was that was a special implementation of List with

[JBoss-user] [EJB 3.0] - Re: Finding Java 5.0 Enum Types

2006-03-27 Thread treespace
That's usually what I've done but that adds another file (manifest) and changes the build script and then you've got to repeat that for all the jars that use common.jar. It seems like a lot of needless tinkering when it should just load jars in the base of the ear listed as "java" modules. In

[JBoss-user] [EJB 3.0] - Re: Finding Java 5.0 Enum Types

2006-03-26 Thread treespace
Modules have to be an EJB, WAR or application jar. Listing any old jar as a module only works in JBoss. WLS, for exampe, won't load a plain jar file. Historically I have used Class-Path settings but was hoping there was now a more convenient yet portable solution. I guess I will use the applic

[JBoss-user] [EJB 3.0] - Finding Java 5.0 Enum Types

2006-03-26 Thread treespace
My entity beans have enum columns and EJB 3.0 handles the translation without any intervention on my part -- not even an annotation! Here's my problem: where can common classes like enums be placed in my EAR such that the entity bean jar can see them? I do not want to put them IN the jar contain

[JBoss-user] [EJB 3.0] - Benefit of NamedQuery

2006-03-26 Thread treespace
In the past I would corral all of my queries as string constants in a query manager class -- an old Indian trick my grandfather taught me. Having a single location for database queries had a material impact in terms of improving maintainability. I believe the objective of @NamedQuery is to pre

[JBoss-user] [EJB 3.0] - Re: Are EJB3 Stateless Session beans as boneheaded as they l

2006-03-26 Thread treespace
Thanks for clarifying I was under the impression the recent JNDI name pattern was a standard default. The EAR file name prefix does have a bit of an odor to it but that will evaporate when the web tier gets @EJB injection. Having a default name is a good thing. I can parameterize the pattern in

[JBoss-user] [EJB 3.0] - Re: Are EJB3 Stateless Session beans as boneheaded as they l

2006-03-25 Thread treespace
They were going to use Foo and Bar as the defaut binding names but a preliminary study exposed the strategy as sub-optimal for implementations that were neither single nor dual-bean in nature. The class name seemed like a suitable, portable, default. Reasonable or not, I was also visibly upset

[JBoss-user] [EJB 3.0] - Re: Default JoinColumn name

2006-03-25 Thread treespace
Thanks Emmanual. I found the specification sections you are referring to: 2.1.8.4.0 2.1.8.5.1 2.1.8.5.2 BTW, nice introduction here for anybody else wading (plunging in fact) in to EJB 3.0 as I am: http://www.ejb3workshop.com/presentation/EJB3Introduction.pdf View the original post : http:/

[JBoss-user] [EJB 3.0] - Looking for Best Practices on relation cascading options

2006-03-24 Thread treespace
Looking for a WHEN-TO on relationship cascading options. Assuming you have your owner/inverse relationships correctly constructed, what's the downside in cascading everthing, always? TIA View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932475#3932475 Reply t

[JBoss-user] [EJB 3.0] - Re: @EJB annotation not working in web tier

2006-03-23 Thread treespace
Here's a tip for doing a lookup without having to cast: generic method. I've hard-coded some assumptions that are easy enough to parameterize or use globa settings with. | | public static T getEJB(Class klass) throws NamingException | { |return (T) (new InitialContext().lookup("

[JBoss-user] [EJB 3.0] - Default JoinColumn name

2006-03-22 Thread treespace
I am getting frustrated in my attempt to use default names since I don't know what they are and cannot find a reference. Table and column names were changed from underscores to camel-case so no problem there: what you see is what you get. My relations, however, are another story. What is the

[JBoss-user] [EJB 3.0] - Re: EJB 3.0 Default Naming Strategy

2006-03-22 Thread treespace
Happily I control the schema so just using this convention in the sql: create Table MyTable { myColumn ... } I think, however, the MY_TABLE and MY_COLUMN pattern is by far the most common and it would be a shame to have to force explicit table/column names for those guys. View the original po

[JBoss-user] [EJB 3.0] - EJB 3.0 Default Naming Strategy

2006-03-22 Thread treespace
Where is the default naming scheme published and is it possible to provide your own? I assume there's a table, column and intersect (many-to-many) table naming convention. Java class: CamelusDromedarius Table name: CAMELUS_DROMEDARIOUS. Java property: CamelusDromedarius Column name: CAMELUS

[JBoss-user] [EJB 3.0] - Re: @EJB annotation not working in web tier

2006-03-21 Thread treespace
Good to hear. That annotation is facinating. In general terms, is shows you can use annotations to override Java's default variable initialization value in any reference. In this case to supply a container-specific value. View the original post : http://www.jboss.com/index.html?module=bb&op=v

[JBoss-user] [EJB 3.0] - @EJB annotation not working in web tier

2006-03-20 Thread treespace
Trying to use variable "server" throws a null pointer exception. | public class Client | { |@EJB Server server; | |execute(String operation) |{ | server.execute(operation); |} | } | Does @EJB lose its magic power in the web tier? View the original p

[JBoss-user] [EJB 3.0] - Re: SFSB - when to @Remove?

2006-03-20 Thread treespace
The session will timeout. You could configure SFSB timeout in descriptors. Not sure if there's an EJB 3.0 annotation for that. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931485#3931485 Reply to the post : http://www.jboss.com/index.html?module=bb&op=pos

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: How to use jstl

2006-03-20 Thread treespace
Using JBoss 4.X with Tomcat 5.X you will need standard.jar in WEB-INF/lib. Not sure why they would not just bundle that and have it loaded once for all web applications. AFAIK everything else you need is bundled as part of the install. View the original post : http://www.jboss.com/index.html

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: ResourceBundle considered harmful

2006-03-20 Thread treespace
Resource Bundle Redux (oops, forgot code block) Enumerate messages: | enum Messages | { |UserNameInUser, |... more ... | } | Load this xml in to Map< Message, Map< Locale, String > > | | | | User name already in use | blah blah blah | d

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: ResourceBundle considered harmful

2006-03-20 Thread treespace
Resource Bundle Redux Enumerate messages: enum Messages { UserNameInUser, ... more ... } Load this xml in to Map> User name already in use blah blah blah daka daka daka ... more ... ... more messages ... This strategy puts all the token translatio

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - ResourceBundle considered harmful

2006-03-19 Thread treespace
Resource bundles do not work with XML or RDBMs which is very telling IMO. Supports my contention that I8N with resource bundles should be renamed SteamingResourcePile [audible laughter from crowd]. It seems infinitely simpler to just create a message file for each language, then load them all

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Servlet welcome-file not working

2006-03-19 Thread treespace
I did not see any mention of a dummy static welcome file mapping in the 2.4 servlet specfiication. Whatever works I suppose. I think I will stick with the bona fide static welcome file that sets the window location. That also works. Thanks for the feedbackScott. View the original post : http

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Servlet welcome-file not working

2006-03-15 Thread treespace
Workaround until servlet welcome-files are fixed: Use a static welcome file... index.html Containing the following script element... < body> < script type="text/javascript">window.location="/navigator" hang on buddy... Add query string arguments as needed by your controller, e.g., /n

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Servlet welcome-file not working

2006-03-15 Thread treespace
Just add a servlet, with or without a servlet mapping: Navigator com.acme.Navigator Try using "Navigator" as a welcome-file: Navigator If the war file is "acme" then http://localhost/acme will NOT go to the Navigator servlet. Instead the default tomcat servlet is called and you

[JBoss-user] [Security & JAAS/JBoss] - Re: Getting rid of the j_security_check login page

2006-03-15 Thread treespace
I understand the current behavior and it is working well. Keep in mind we are only looking to keep that behavior but extend it with one extra feature: programmatic login. I have an idea based on your's and Brian's input. I will report back with results. View the original post : http://w

[JBoss-user] [Security & JAAS/JBoss] - Re: Getting rid of the j_security_check login page

2006-03-14 Thread treespace
Posting to j_sercurity_check is not allowed, AFAIK. The container wants to forward the request to the original target. Consider the "remember me" login feature. J2ee_junkie says that you have to ditch form-based login if you need that feature. I think he's high:) View the original post :

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Servlet welcome-file not working

2006-03-14 Thread treespace
Using JBoss 4.0 with Tomcat (5.X) and added a servlet name as a welcome file in my webapp. 2.4 servlet container claims you can do this. Rather than providing a file you just drop in a servlet name as-is with no slashes or any other baggage; just the servlet net. Anybody have this working? My

[JBoss-user] [Security & JAAS/JBoss] - Re: Getting rid of the j_security_check login page

2006-03-14 Thread treespace
I want to invoke the magic login action with an explicit call. I want the container to manage authentication just as always does. That is what users want and in general how authentication is implemented on websites. I don't see how allowing an explicit authentication call suddenly invalidates fo

[JBoss-user] [Security & JAAS/JBoss] - Getting rid of the j_security_check login page

2006-03-13 Thread treespace
We are using JAAS with form based login and j_security_check on our web application. We want users to login from the home page rather have them be intercepted when attempting to access a protected resource. We cannot put the j_security_check form on our home page because it appears it will only

[JBoss-user] [Installation, Configuration & Deployment] - Re: Deploying Jdeveloper app on Jboss 4

2006-03-08 Thread treespace
Related advice: why waste time with an inferior product when you can save a bundle and get Net Beans, Eclipse or IntelliJ? My personal experience with JBuilder is that it's horribly designed, buggy as hell and extremely inefficient. It's the bottom of the barrel but ironically the most expensive

[JBoss-user] [Installation, Configuration & Deployment] - Exception starting JBoss 4.0.3 on OS X.4

2006-03-07 Thread treespace
Exception starting JBoss on Mac: | 1:58:29,292 WARN [HANamingService] Failed to start AutomaticDiscovery | java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface | .. stack trace ... | No biggue since it goes away when a hostname is supplied (e

[JBoss-user] [EJB 3.0] - Re: When to use EAGER / LAZY

2006-03-05 Thread treespace
This is a fundamental question of paramount importance to EJB 3.0 entity bean development. EJB 3.0 keeps it simple and loads everything. You can take a different tack and lazy load everything for maximum performance. When you get an exception such as yours, you can analyze the situation. If tha

[JBoss-user] [EJB 3.0] - Re: Can you use stored procedures in EJB 3.0?

2006-03-03 Thread treespace
FTB, here's an example of an EJB stored procedure. You can use these from, say, a session bean: Query query = em.createNativeQuery("exec foo()" ); List bars = query.getResultList(); View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927901#3927901 Reply to

[JBoss-user] [EJB 3.0] - Re: Can you use stored procedures in EJB 3.0?

2006-03-03 Thread treespace
>> Most devs that are dead set against stored procs do not have an open mind. Too strong. I think also that he was just saying he was not a "fan" versus anti-stored-procedure. >> Stored procs offer an interface into the db that is consistent. That is to say they provide a "uniform implement

[JBoss-user] [EJB 3.0] - Re: Can you use stored procedures in EJB 3.0?

2006-03-02 Thread treespace
Stored procedures have performance benefits and also provide a uniform implementation when you have Java and other languages using the same resources. If some client insists on using stored procedures use JDBC. You can call stored procedures from POJOs or old-style EJB code. Cash client check as

[JBoss-user] [Security & JAAS/JBoss] - Re: Direct link to FORM based authentication with j_security

2006-03-01 Thread treespace
According to the 2.4 servlet specification the login form will only be invoked on an attempt to access a secured resource. Direct login is not supported. What I need is a companion to j_security_check that allows me to directly login a user rather than wait for that user to access a secure reso

[JBoss-user] [Security & JAAS/JBoss] - Direct link to FORM based authentication with j_security_che

2006-02-28 Thread treespace
I configured my application to use JAAS with FORM based authentication. It seems to work well enough. Attempting to access a protected page prior to logging in causes the login page to display. The requested page then displays, assuming you logged in as a user with the required role. What is no

[JBoss-user] [Clustering/JBoss] - Re: Multiple JBoss instances on single machine

2006-02-27 Thread treespace
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHA "Setting up multiple..." at the bottom. Not to say it isn't useful; rather, it's not the simplest solution for that task. BTW, I tried to add some additional comments to the wiki page but apparenly you need special powers. View the original

[JBoss-user] [Clustering/JBoss] - Multiple JBoss instances on single machine

2006-02-26 Thread treespace
There's a link on the JBoss HA wiki page for clustering that details an eight step configuration process for multiple instances of JBoss. I think it creates the impression that using multiple JBoss instances is complicated when it's actually a zero-configuration process for JBoss. On Windows o

[JBoss-user] [Clustering/JBoss] - Re: Web Application Scope Clustering

2006-02-26 Thread treespace
http://jira.jboss.com/jira/browse/JBCLUSTER-86 I can use MagicBean for all application scope variables and since it will be distributed my application scope will be distributed. The ServletContextAttributeListener will allow me to vacuum up and distribute servlet context objects but MagicBean-

[JBoss-user] [Clustering/JBoss] - Web Application Scope Clustering

2006-02-25 Thread treespace
Are objects in the web container's application scope replicated? If not there are several alternatives from persistent POJOs (EJB 3.0) to JBoss Cache (a POJO cache) but it would be useful to transparently replicate the application scope of a web application, automagically. TIA View the origin

[JBoss-user] [EJB 3.0] - Re: Version Timestamp and Hashcode

2006-02-24 Thread treespace
The version timestamp has the same problem as the primary key: generated in entity manager. Therefore looks like I have to use semi-unique business key for each class as Hibernate suggests. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926103#3926103 Reply

[JBoss-user] [EJB 3.0] - Non-persistant base classs with persistent properties

2006-02-24 Thread treespace
I have a package of classes that all share a common base class Model. The Model implements Serializable and houses a few common values important values: public class Model implements Serializable { long id; // primary key Timestamp version; // optimistic locking aid boolean deleted; //

[JBoss-user] [EJB 3.0] - Version Timestamp and Hashcode

2006-02-24 Thread treespace
Each of my persisted classes has a version property of type Timestamp annotated with @Version. Guidelines suggest not using the auto-generated primary keys for equality checks. Is the version timestamp suitable? That would simplify things since the equals and hashCode overrides would be the same

[JBoss-user] [EJB 3.0] - Collection Access Best Practices

2006-02-23 Thread treespace
I want a persistent collection but I do not want anybody accessing the collection directly. So rather than getProtons you might call addProton: | | @Entity class Atom | { |... |public void addProton(Proton proton) |{ | protons.add(proton); | proton.set

[JBoss-user] [JBoss Getting Started Documentation] - Re: EJB3 Trailblazer Faux Pas

2006-01-14 Thread treespace
Side note: Whoever put together the Trailblazer for EJB 3.0 would help us all by continuing to create such documetnation. Extremely well organized, crystal clear and razor sharp in terms of hitting all the points I was interested in. Thanks! View the original post : http://www.jboss.com/inde

[JBoss-user] [JBoss Getting Started Documentation] - EJB3 Trailblazer Faux Pas

2006-01-13 Thread treespace
The Trailblazer guide on EJB 3.0 is very concise but there are a couple of minor tidbits that hit me like fingernails scratched across a chalkboard. First, they have a note about generics and a link to a generics reference. IMO there should be zero bandwidth taken up with a discussion about ess

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: WAR security failure

2005-10-18 Thread treespace
Thanks for replies. Turns out I cannot eliminate every URL access to those resources so I will have to use a bona fide role. Since we use our own home brewed authentication/authorization, a servlet filter should do the trick. View the original post : http://www.jboss.com/index.html?module=bb&o

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: WAR security failure

2005-10-18 Thread treespace
P.S. We use form-based login without JAAS and would not like to add a login module if possible. We just want certain extensions to be inaccessible via direct HTTP request. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3901754#3901754 Reply to the post : h

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - WAR security failure

2005-10-18 Thread treespace
I want to block all access to files with a specific extension. I tried using a security constraint with a non-existent role but that did not prevent acess to files with the extension "vax". It is impractical to move these files to a WEB-INF folder so they are out in the open for the time bein

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Custom 404 in web.xml not working

2005-10-13 Thread treespace
Microsoft will not display error pages less than 512 bytes based on some asinine "friendly message" rule. So even after fixing the error on the error page IE still failed but FF worked fine. Increased the response size with an image to solve the problem. View the original post : http://www.j

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Custom 404 in web.xml not working

2005-10-12 Thread treespace
There is an error in my error page! Tomcat cannot display the custom error page so it coughs up the default hairball instead. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3900758#3900758 Reply to the post : http://www.jboss.com/index.html?module=bb&op=pos

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Custom 404 in web.xml not working

2005-10-12 Thread treespace
Just created test.war with on hello world page and a web.xml containing the error-page elements. The error page is in the root of the war. No impact. It does not display my custom error page. Thanks for trying it. I will poke around some more and see what gives. View the original post : http

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Custom 404 in web.xml not working

2005-10-12 Thread treespace
What the heck? My location tag is evaporating. Just assume that /NotFound.jsp is wrapped in an open and closing location tag. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3900746#3900746 Reply to the post : http://www.jboss.com/index.html?module=bb&op=post

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Custom 404 in web.xml not working

2005-10-12 Thread treespace
Sorry, forgot to type in the location tag in my original post. This is what is in my web.xml but the custom error page is not displayed. I get the same old 404 error page you always get from Tomcat. 404 /NotFound.jsp View the original post : http://www.jboss.com/index.html?modul

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Custom 404 in web.xml not working

2005-10-12 Thread treespace
I added this to my web.xml but the standard 404 page is displayed in the browser. I expected a custom page. The war file is in an ear for whatever that's worth. 404 /NotFound.jsp Using JBoss 3.2.7 with Tomcat built-in View the original post : http://www.jboss.com/index.html

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Countermeasure for Spoofing Referring URL

2005-10-03 Thread treespace
Anybody know a means of detecting a spoofed referer (sic) in the HTTP header? I would like to ensure that all access to pages to our site after the login page originate from our site. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898752#3898752 Reply to the

[JBoss-user] [EJB/JBoss] - Re: Home Interface and Context Thread Safety

2005-09-06 Thread treespace
I think therefore I can safely cache the context used for lookups. The other issue is overlapping create calls from multiple threads on an EJB home. That it's stateless is promising but you never know if it's scribbling on class values that preclude overlapping calls. Unless it's stipulated it

[JBoss-user] [EJB/JBoss] - Re: Home Interface and Context Thread Safety

2005-09-04 Thread treespace
I have a question regarding the reentrancy of the create call on EJB home objects and whether a context lookup is reentrant if its use is restricted to a lookup. It is safe to assume a multi-threaded J2EE application although that might be redundant. View the original post : http://www.

[JBoss-user] [EJB/JBoss] - Re: Home Interface and Context Thread Safety

2005-09-04 Thread treespace
I wanted to know whether contexts and home interfaces were reentrant independent of any specific application. Scott indicated neither is (being undefined is just as good as not being reentrant if portability is an issue). I am interested in what alternatives exist outside of a lookup/create c

[JBoss-user] [EJB/JBoss] - Re: Home Interface and Context Thread Safety

2005-09-04 Thread treespace
That is frustrating because more than one article exists showing cached JNDI contexts and home objects. Based on your information we need to create the context and perform the home lookup every time we need to make EJB calls. Can you confirm that? Are there more efficient yet still portable and

[JBoss-user] [EJB/JBoss] - Home Interface and Context Thread Safety

2005-09-04 Thread treespace
Are EJB home interfaces thread-safe such that we could create it once and use it simultaneously from any number of threads? Google doesn't seem to know the answer to this. There is a mountain of ambiguous and contradictory information on the topic. Regarding the Context for looking up the hom

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: HOW-TO obtain URL for Web Application

2005-08-02 Thread treespace
OK, there's jboss.bind.address so that will take care of the host name. That leaves the port number. That reduces my question to the following: I How can I programatically retrieve the port number the web container is listening on before my first request comes in. View the original post : ht

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: HOW-TO obtain URL for Web Application

2005-08-02 Thread treespace
The scheme is also dynamic (ftp, https, http, file...) so obviously I will have to assume that also. That leaves the host and port number. Is there a runtime config setting for those I can get at somewhere? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - HOW-TO obtain URL for Web Application

2005-08-02 Thread treespace
I frequently load URL based resources and I can get the URL using request attributes to generate a URL like this: https://acme:8443/portal The code is dirt simple: | getURL( HTTPServletRequest r) | { | return r.getScheme() + "://" + r.getServerName() + ":" + | r.g

[JBoss-user] [Performance Tuning] - Re: Setting Processor Affinity

2005-07-30 Thread treespace
Agreed, need metrics from production system or a reasonable fax. Pinning each JVM in a multiple JVM configuration with many threads per JVM may be beneficial but the proof of the pudding is in the eating as they say. View the original post : http://www.jboss.org/index.html?module=bb&op=viewto

[JBoss-user] [Performance Tuning] - Re: Setting Processor Affinity

2005-07-27 Thread treespace
Correction: keep one JVM pinned to a range of CPUs from one to several. Main point is each JVM has its own resources to retain cache and minimize memory contention. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3886934#3886934 Reply to the post : http://ww

[JBoss-user] [Performance Tuning] - Setting Processor Affinity

2005-07-27 Thread treespace
We are running multiple JVMs on a dual CPU box. Each is running the same application under JBoss so they are sharing the same code and within a JVM sharing a lot of application data. Best practice seems to indicate that multi-threaded applications should set processor affinity to keep the thre

[JBoss-user] [EJB/JBoss] - Re: Throwing RemoteException

2005-06-22 Thread treespace
To clarify, the RemoteException is thrown from a stateless session bean and caught in the web tier. Tested and does work but also know that throwing RemoteException is a crime with an unstipulated punishment. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=388

[JBoss-user] [EJB/JBoss] - Throwing RemoteException

2005-06-22 Thread treespace
I understand RemoteException should not be thrown directly. Say you had a release where RemoteException was thrown by some session beans: until the next patch is released, are there any dangers we need to know about? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtop

[JBoss-user] [EJB/JBoss] - HOW-TO use SortedSet with CMR

2005-06-22 Thread treespace
S'er a way to have CMR sets returned as a SortedSet such as TreeSet? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882415#3882415 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882415 ---

[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Using MQSeries or WebSphereMQ

2005-06-03 Thread treespace
... given enough time and money. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880235#3880235 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880235 --- This SF.Net

[JBoss-user] [HTTPD, Servlets & JSP] - Re: jboss classloading question

2005-04-07 Thread treespace
Class loaders are nested to provide isolation. WARs use war-local resources, EARs use ear-local, ditto for SARs and so on. The configuration is next followed by jars or classes in the server. WAR files have the added requirement of an option that stipulates that no classes outside of system

[JBoss-user] [HTTPD, Servlets & JSP] - Re: Displaying images in a JSP.

2005-04-06 Thread treespace
Yuck! Drop the leading / and use relative paths. Not context required. If you need absolute use a tag. It's mindbogglingly simple to create tags nowadays; no code required even. That way the tag can supply the context for absolute paths and it can check for that. | | View the original

[JBoss-user] [HTTPD, Servlets & JSP] - Re: getting a 404

2005-04-06 Thread treespace
Try capturing the 404 and poking around from there. | | 404 | /jboss/whaddup.jsp | | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872956#3872956 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&m

[JBoss-user] [HTTPD, Servlets & JSP] - Re: Using enums on JSP pages

2005-04-06 Thread treespace
Correction: public class ColorMap extends TreeMap { |public ColorMap() { | for(Color value : Color.values()) { | put(value.name(), value.name()); | } |} | } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872938#3872938

[JBoss-user] [HTTPD, Servlets & JSP] - Re: Using enums on JSP pages

2005-04-06 Thread treespace
I have come up with a solution so elegant it brings tears to my eyes:) Color is an enum. I convert it to a map that can be useBean'd and dereferenced in EL. So my app uses the enum while the JSP uses the same enum in map form. Sweet! public class ColorMap extends TreeMap { public C

[JBoss-user] [HTTPD, Servlets & JSP] - Using enums on JSP pages

2005-04-05 Thread treespace
Constant management is a major sore point that can be addressed using static final constants accessed via snipplets. It's ugly but you get compile time checking versus flakey runtime symptoms from typos. Enums might improve things but 3.2.6 jasper is using javac without the -source 1.5 switch

[JBoss-user] [HTTPD, Servlets & JSP] - Welcome page is not automatically found

2004-12-18 Thread treespace
Deployed webapp with / as the context-root in jboss-web.xml. The welcome file in web-xml is login.jsp however if fails to load unless entered explicitly: This works: http://host/login.jsp This brings up the Welcome to JBoss page: http://host/ Version of JBoss: 3.2.6 View the original p

[JBoss-user] [HTTPD, Servlets & JSP] - Need hostname and port number and context path at startup

2004-12-17 Thread treespace
I want to load one of my own URLs at startup time and would like to build the URL dynamically. For example: https://foo:8080/bar/baz.xml I can genrate that URL easily using these request methods and a little glue: request.getScheme() request.getServerName() request.getServerPort() request.getCo

[JBoss-user] [Management, JMX/JBoss] - Re: Array return type from ACTION fails to deploy

2004-11-09 Thread treespace
Oops... try disable HTML. Foo generateFoo Foo[] View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3854540#3854540 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3854540 -

[JBoss-user] [Management, JMX/JBoss] - Re: Array return type from ACTION fails to deploy

2004-11-09 Thread treespace
Forgot to quote my XML Foo generateFoo Foo[] View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=385

[JBoss-user] [Management, JMX/JBoss] - Array return type from ACTION fails to deploy

2004-11-09 Thread treespace
Are there restrictions on JMX operation return types? Probably an RTFM solution but nothing jumped out at me. Got this error deploying. String array also croaked. Exception: ... Caused by: java.lang.IllegalArgumentException: Return type is not a valid java identifier (or is reserved): Foo[]

[JBoss-user] [HTTPD, Servlets & JSP] - Re: JSF Challenge

2004-10-12 Thread treespace
No replies. Figures given that JSF is a noob on the technology scene. I can always trace the code in the reference implementation to see what's going on I suppose. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851182#3851182 Reply to the post : http://ww

[JBoss-user] [HTTPD, Servlets & JSP] - JSF Challenge

2004-10-11 Thread treespace
I am evaluating JSF as a possible alternative to JSPs with Struts and have run in to a problem that might be a design flaw in JSF. Consider a simple page with one edit box, one drop-down menu and one submit button. When the menu changes the edit box should display that item's description. You

[JBoss-user] [Persistence & CMP/JBoss] - Re: ParseException when creating CMP tables on 3.2.4RC2 and

2004-08-18 Thread treespace
ORDER is reserved as part of ORDER BY so the error is correct behavior according to JBoss. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845483#3845483 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845483

[JBoss-user] [Security & JAAS/JBoss] - Getting SSLPeerUnverifiedException with https accesses

2004-07-01 Thread treespace
We are using HTTPS connections to an application running on JBoss 3.2.3. We receive an SSL error with officially certs in production and with self-signed certs in development. This problem is not present in 3.2.5 but we are not ready to upgrade at the moment. Ideas? TIA! 2004-06-30 10:14:39,

  1   2   >