Re: [JBoss-user] DataSources, JNDI, ejb-jar.xml and avoiding jboss.xml
What you must remember is that this was designed this way This is to allow you to map things at deployment time. Just like CMP beans should be mapped at deployment time so should resources. What if you have 6 DS resources on the server... which should I pick to map to if you dont tell me (if I am the server). Al Oliver Henlich wrote: Hi! There seem to be so many postings about this stuff and all the solutions seem to involve the use of jboss.xml. The documentation says Note that this file [jboss.xml] is almost NEVER required by JBoss. I would really like to be able to access the DataSource as all the books and tutorials describe (without the use of a vendor specific conf file)...as below: InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/TWANG_DS); I've got this to work but only with an extra level of indirection by using jboss.xml. There must be a way to avoid this and still be able to access the datasource using the format java:comp/env/jdbc/DATASOURCE_NAME. I would really appreciate any advice/suggestions/solutions. Cheers oliver Here are the relevant bits in the config/code files: DAO.java ... try { InitialContext ic = new InitialContext(); dbDataSource = (DataSource) ic.lookup(java:comp/env/jdbc/TWANG_DS); } catch (NamingException ne) { //error } ... ejb-jar.xml --- ... resource-ref descriptionDataSource for the STRUM database/description res-ref-namejdbc/TWANG_DS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref ... jboss.xml - ... resource-managers resource-manager res-namejdbc/TWANG_DS/res-name !-- DB name used in your EJB -- res-jndi-namejava:/STRUM/res-jndi-name /resource-manager /resource-managers ... jboss.jcml -- ... mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=DriversCOM.cloudscape.core.RmiJdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver/attribute /mbean mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=STRUM attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=PoolNameSTRUM/attribute attribute name=URLjdbc:cloudscape:rmi://localhost:1088/STRUM/attribute attribute name=JDBCUser/attribute attribute name=Password/attribute /mbean ... _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jsp EJB's
Accessing EJB's directly in JSP is strongly discouraged, however if you are going to do this in a JSP you will have to include the home and remote classes in the WEB-INF/lib or WEB-INF/classes directory for them to be found. I would actually suggest using a java bean to encapsulate the calls minimally. It just gets ugly with all those imports and code in a jsp. Al jasper produces : Class org.jboss.docs.interest.Interest not found in import. Where can we set the classpath to include our EJB's jar/ear??? -- Application Developer Eurisko A.E. 9 106 71 : +301 3633362 : +301 3633074 e-mail: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Help
Well first off make sure you do not have hardcoded your provider url as t3://. Secondly... if you are using ejb-ref in your web.xml (i assume you are) make sure you have a jboss-web.xml to map the ejbs into the enc. lastly any ejb-ref in the ejb-jar.xml will require a corresponding entry in a jboss.xml in the jar file also. Al - Original Message - From: sharath To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 2:18 AM Subject: [JBoss-user] Help Hi all, Iam working on an application that uses EJBs and JSPs. Im using JDK1.3.Till recently we were using BEA Weblogic but now want to change over to JBoss.I did as told in documentation and am able to get the jsp pages which do not call a bean. But iam getting an error as soon as the server has to serve a jsp page which calls an EJB.Please advise to me as to what all steps should i takefor thisand why is this error coming.?? I have deployed an ear file in jboss/deploy directory. Awaiting reply, regards Sharath
Re: [JBoss-user] DataSource
your lookup is wrong. assuming you have a resource reference in your web.xml and a mapping in jboss-web.xml then you should be able to lookup the datasource with... DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/mysql); Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 6:46 AM Subject: [JBoss-user] DataSource Please clairfy something for me. This doesn't work in my JSP: InitialContext ctx = new InititalContext(); ok here DataSource ds = (DataSource)ctx.lookup(jdbc/mysql); fails Could someone clarify why? Are servlets the only 'proper' way to get at my database source identified in jboss.jcml? I can get at it by going directly to the driver, but thta seems to defeat the purpose of specifying the data source in the .jcml file. Thanks, r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] ejb-ref's needed?
When you have ejb-ref's you will also need a jboss-web.xml (for the war file) and possibly jboss.xml if you have ejb-ref's in your bean jars. Al - Original Message - From: G.L. Grobe To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:09 PM Subject: [JBoss-user] ejb-ref's needed? If I put the ejb-ref tag in, I get errors when the war loads upon initialization of JBoss. If I leave it out, it loads successfully. But still doesn't work once I browse the servlet. I get 'ejb not bound' errors. It's been suggested to me both ways and I just wanted to get a more concrete answer ona servlet that does a lookup to an ejb in the web.xml file. TIA
Re: [JBoss-user] DataSource
import javax.sql.DataSource; - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:05 PM Subject: Re: [JBoss-user] DataSource At 07:15 AM 7/8/01 -0400, you wrote: your lookup is wrong. assuming you have a resource reference in your web.xml and a mapping in jboss-web.xml then you should be able to lookup the datasource with... DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/mysql); Al I must be missing an import of some kind: org.apache.jasper.JasperException: Unable to compile class for JSP/usr/jboss2/tomcat/work/localhost_8080%2Fj2ee/_0002ftestMysql_00032 _0002e jsptestMysql2_jsp_3.java:80: Class DataSource not found. DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/mysql); ^ r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] validation and setErrorHandler?
The sun DTD is very picky about order in the web.xml, check that first. Al - Original Message - From: G.L. Grobe To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 6:48 PM Subject: [JBoss-user] validation and setErrorHandler? After seeing the jbosstest examples, I was able to get my servlet lookups to ejb's working, but with the following output. (btw - thnxs). ... [Default] JBoss 2.2.2 Started in 0m:45s[EmbeddedTomcatSX] Warning: validation was turned on but an org.xml.sax.ErrorHandler was not[EmbeddedTomcatSX] set, which is probably not what is desired. Parser will use a default[EmbeddedTomcatSX] ErrorHandler to print the first 10 errors. Please call[EmbeddedTomcatSX] the 'setErrorHandler' method to fix this.[EmbeddedTomcatSX] Error: URI=null Line=39: Element "ejb-ref" does not allow "ejb-link" here. If I remove the ejb-link from the ejb-ref section in the web.xml, then the war will not successfully load or i'll get'ejb not bound' errors. And Im not clear on having to use thesetErrorHandler method. Also, is validation a big hit in performance when in use? If so, I'll just turn it off after development I guess (however that's done). Adv(thnxs)ance
Re: [JBoss-user] Help! - Can EJB inherit from normal classes? Packaging with normal classes?
i would refactor honestly. its probably too much of a pain to try and keep these classes in the inheritance structure of an ejb. you can read some examples of how to inherit things in the RMH book. But its mostly aimed at new development. Since the bean instantiation class implements entityBean you could have it extend your class, so now you have implementation in the instantiation, however now you have to synchronize the remote interface, which already extends EJBObject, so you are stuck putting all the method signatures in there anyway. its still going to take a pretty decent amount of work since you are going to have to check all your classes to ensure you are not doing something funky in the implementation class, or something outright disallowed. With all the time spent going through the code I would just refactor it anyway, rather than try to make it work in EJB. Al Hello, I've a question on inheritence in EJB. As I'm working on the adaption of an existing Java framework, I have to convert many normal Java classes to EJB. But I'm not sure what to do with the inheritence. Someone in the list suggested I let the RemoteInterface inherit from some super interface and let the BeanClass inherit from the super implementation. This way, if a type of the super interface is expected, then an EJB RemoteInterface can be returned, which looks quite reasonable to me, so I was trying to do just that. But the problem is, I didn't seem to be able to compile because I cann't have any constructor in the BeanClass (O'Reilly book), which I do have in the original class that the bean should substitute:-( I know, normlly the stuff in the constructor is done in the ejbCreate, but in my case, I have invokation of super() in the constructor, which is of course bad for EJB. But it didn't work even if I don't use the super() but move the init code from super class to the bean, compiler simply says it cann't deal with the constructor in the super class:-( Now I'm wondering, is it that I've done something wrong or is such thing not possible by definition? Anyone with experience here, comments are heartily welcome! Also, another question would be: If the purpose of an EJB is to substitute some normal class, should I put it in it's own package, or should I leave it in the original package? If I put it in a new package, then many protected access modifier has to be cracked open to public in the original package, which seems hairy to me. But I don't know whether it's possible/feasible to package EJBs with the normal classes and make them one big jar, will the app server have any problem with it? The problems are quite urgent and I'm looking forward to your reply! Many thanks in advance! regards ZHU Jia ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] what is jboss-web.xml
you have to link your ejb-refs in jboss.xml to their jndi name. (also resource refs, etc) jboss-web.xml does similar things in web apps. - Original Message - From: G.L. Grobe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 01, 2001 5:29 PM Subject: [JBoss-user] what is jboss-web.xml Why does auto deploy suggest I use the jboss-web.xml file. I don't know this file nor can I find any docs on it. I've got a session that calls an entity and they are both packaged in the same ejb.jar file and run on the same JBoss server instance. So I've used the ejb-link tag inside the ejb-ref's in my ejb-jar.xml file and dismissed any use of jboss.xml, but jboss-web.xml?. I've included the two bean descriptor sections from ejb-jar.xml and the error output. [Auto deploy] Linking ejb-ref: ejb/com.neuroquest.cais.ejb.session.initBuild.InitBuildHome to JNDI name: null [Auto deploy] javax.naming.NamingException: ejb-ref: ejb/com.neuroquest.cais.ejb.session.initBuild.InitBuildHome , expected jndi-name in jboss-web.xml - snip of ejb-jar.xml -- session ejb-nameInitBuild/ejb-name ejb-classcom.neuroquest.cais.ejb.session.initBuild.InitBuildBean/ejb-clas s homecom.neuroquest.cais.ejb.session.initBuild.InitBuildHome/home remotecom.neuroquest.cais.ejb.session.initBuild.InitBuild/remote session-typeStateful/session-type transaction-typeContainer/transaction-type ejb-ref ejb-ref-nameejb/Build/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.neuroquest.cais.ejb.entity.build.BuildHome/home remotecom.neuroquest.cais.ejb.entity.build.Build/remote ejb-linkBuild/ejb-link /ejb-ref /session entity ejb-nameBuild/ejb-name ejb-classcom.neuroquest.cais.ejb.entity.build.BuildBean/ejb-class homecom.neuroquest.cais.ejb.entity.build.BuildHome/home remotecom.neuroquest.cais.ejb.entity.build.Build/remote persistence-typeBean/persistence-type prim-key-classcom.neuroquest.cais.ejb.entity.build.BuildPK/prim-key-class reentrantFalse/reentrant /entity snip of ejb.jar.xml (More error output from JBoss...) [Container factory] Deploying Account [Container factory] Deploying Build [Container factory] Deploying ConfigBuild [Container factory] Deploying DBaseFetch [Container factory] Deploying ConfigTools [Container factory] Deploying InitBuild [Bean Cache] Cache policy scheduler started [Container factory] Deployed application: file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acais-1.0.e ar [J2EE Deployer Default] Starting module acais-web.war [Auto deploy] deploy, ctxPath=/acais, warUrl=file:/u/public/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/acai s-1.0.ear/web1003/ 2001-07-01 05:32:09 - ContextManager: Adding context Ctx( /acais ) [Auto deploy] AbstractWebContainer.parseWebAppDescriptors, Begin [Auto deploy] addEnvEntries [Auto deploy] linkResourceRefs [Auto deploy] linkEjbRefs [Auto deploy] Linking ejb-ref: ejb/com.neuroquest.cais.ejb.session.initBuild.InitBuildHome to JNDI name: null [Auto deploy] javax.naming.NamingException: ejb-ref: ejb/com.neuroquest.cais.ejb.session.initBuild.InitBuildHome , expected jndi-name in jboss-web.xml [Auto deploy] at org.jboss.web.AbstractWebContainer.linkEjbRefs(AbstractWebContainer.java:359 ) ... TIA ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] servlets vs. EJB
yes, but using the 1 entity bean = 1 database table is not in general in my experience the best architecture in the world. entity beans are designed to represent business entities, and such entities are rarely modeled in one database table. Take the classic and ubiquitous example of a customer. Every client I have ever been to has had this modeled in at least 3 tables... a person table, an address table, and a phone table. so now I would instantiate multiple beans for the person object, but it is only a single object. What I really want is a single bean to represent a customer. so now I am stuck using either a bmp entity bean or using some other methodology to represent these relationships. Now with EJB 2.0 so close to finished there may very well end up being a solution in the CMR fields, but in the current specs I think the scalable vs simple debate still stands. It is, as you say a learning curve and in general Junior developers are going to find it easier to use JDBC in servlets than to use entity beans. - Original Message - From: Fred Loney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 11:37 AM Subject: Re: [JBoss-user] servlets vs. EJB I find it puzzling that the trade-off is often cast as EJB = scalable vs. JDBC = simple. Maybe it's me, but I find that for quick development autogenerating a CMP descriptor by hitting the Enter key vs. hard-coding pages of SQL statements is no contest. Granted, there is a learning curve to surmount. Programmers comfortable with two-tier, single-threaded JDBC find containers, stubs and lifecycles a bizarre distraction. That is, until that 10th concurrent user hits the database... -- Fred Loney Spirited Software, Inc. [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] cgi
the thing to remember here is that weblogic is several containers... its an EJB container, a servlet/jsp container and it also does HTML. (and jsp, and such) OTOH jboss doesnt concern itself with any of the web containers. it is, for the most part and to newbies can be viewed mostly as, an EJB container. The web containers used, whether they be tomcat or jetty, or some other structure including apache, are not within its domain. Sure the integration with tomcat and jetty bring JBoss much closer to the grail of jboss-tomcat-apache but JBoss itself is primarily an EJB container. Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 1:59 PM Subject: Re: [JBoss-user] cgi At 12:31 PM 6/29/01 -0500, you wrote: That's really a question for the Tomcat list. It would certainly be possible to build a servlet that runs a CGI script, Yes, it sounds like the WebLogic setup is closer to the jboss-tomcat-apache grail that gets asked about from time to time. r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] servlets vs. EJB
lol. I agree. developers of course would be perfectly happy if everything was in a single table, with everything set to allow nulls :) And im not sure the native vs ODBC ever got solved. native is still faster, but hey anything beats punch cards... Don't want to count the times I had to redo something because a punch card was lost or placed out of order. lol. Al - Original Message - From: Fred Loney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 3:51 PM Subject: Re: [JBoss-user] servlets vs. EJB Actually, I agree. In fact, my experience is that clients tend to have such a complicated data model that is hard to do anything with any technology. The unstated premise of a CMP vs. JDBC comparison is that CMP is an option. There are good reasons why CMP might not be an option, in which case the comparison doesn't apply. There is an apt parallel for those of us who have been in the business too long. Identical arguments were raised in the native db preprocessor vs. ODBC debate 10+ years ago--too slow, too complicated, too restrictive, too hard to learn. Time will tell. There are two constants, however: 1) it pays to use simple data models 2) developers don't heed (1) Allen fogleson wrote: yes, but using the 1 entity bean = 1 database table is not in general in my experience the best architecture in the world. entity beans are designed to represent business entities, and such entities are rarely modeled in one database table. Take the classic and ubiquitous example of a customer. Every client I have ever been to has had this modeled in at least 3 tables... a person table, an address table, and a phone table. so now I would instantiate multiple beans for the person object, but it is only a single object. What I really want is a single bean to represent a customer. so now I am stuck using either a bmp entity bean or using some other methodology to represent these relationships. Now with EJB 2.0 so close to finished there may very well end up being a solution in the CMR fields, but in the current specs I think the scalable vs simple debate still stands. It is, as you say a learning curve and in general Junior developers are going to find it easier to use JDBC in servlets than to use entity beans. - Original Message - From: Fred Loney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 11:37 AM Subject: Re: [JBoss-user] servlets vs. EJB I find it puzzling that the trade-off is often cast as EJB = scalable vs. JDBC = simple. Maybe it's me, but I find that for quick development autogenerating a CMP descriptor by hitting the Enter key vs. hard-coding pages of SQL statements is no contest. Granted, there is a learning curve to surmount. Programmers comfortable with two-tier, single-threaded JDBC find containers, stubs and lifecycles a bizarre distraction. That is, until that 10th concurrent user hits the database... ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] entity beans name = database tables name??
actually CMP beans do not have to be named the same as the table, but you would need a jaws.xml to override it if it wasnt. Al - Original Message - From: Carlos Ferrão [EMAIL PROTECTED] To: jboss ml [EMAIL PROTECTED] Sent: Friday, June 29, 2001 8:53 PM Subject: [JBoss-user] entity beans name = database tables name?? Hi List, Thank you for your help with my problem with tables. I changed the entity bean name to auth and it is working. I didn't know that the name of entity beans needed to be the same as my tables in my database. I was accessing my db with the following code in my session bean: try { listlogin_connection = getDBConnection(java:/comp/env/jdbc/library); file://jndi namespace for db listlogin_statement = listlogin_connection.prepareStatement(select login from auth); listlogin_records = listlogin_statement.executeQuery(); while(listlogin_records.next()) { ...//get values from fields Although my session is CMP, I think this is a direct way to access my db and it should never use the entity bean. Why is it used anyway? Do I really have to change the name of my entity beans to the name of my database tables?? Best Regards, Carlos Ferrao ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Keeping cmp beans in synch
Do you remove it by calling the database or the remove() of the entity bean? if the former... look at your default standardjboss.xml and change the commit option from the default of A. This presumes that the ejb has exclusive access to the database. you want either B (caching but non exclusive access) or C (non caching state loaded at the beginning of each transaction) al - Original Message - From: Chris Tragas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 1:06 AM Subject: [JBoss-user] Keeping cmp beans in synch Hi. This might be a silly question but i'll ask anyhow: How do i keep my entity beans in synch (so to speak) if the data the bean is mapped to is updated in the datasource by another application or process ? what i'm experiencing is this: I use entity beans to cerate records in a dabatabse; my bean creates a record with pk_id = 1; then i remove the record from the database and initialise my sequence class back to 1 so when i call my bean.create i expect it to create a record with pk_id 1 again; but when i do this i get all sorts of ejbexcpetions errors; this leads me to believe that i'm upsetting the caching of jboss; can anyone point me in the right direction as far as what i am doing wrong; thanks. Chris Tragas - [EMAIL PROTECTED] - www.atomicmedia.com - ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Is there BMP sample?
you would still use a datasource... well unless you just want around the whole transaction, connection pooling of the container... I cant imagine why. I can whip together a quick simple example if you havent found what you need yet... email me direct Al - Original Message - From: Boris Garbuzov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 3:50 PM Subject: [JBoss-user] Is there BMP sample? Is there any documentation article with BMP example? Any BMP is database specific so I do not use JAWS or datasources, but write write a SQL with specific data types? I would like to use MySQL. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Is there BMP sample?
heh. No problem vincent. in all this i need to finish up my section of the manual on oracle. its been a busy two weeks 8sigh*isnt that always the case. ill bang out what i have this evening to you. Al - Original Message - From: Vincent Harcq [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 3:52 AM Subject: RE: [JBoss-user] Is there BMP sample? Hi, Can you send it to me, I wanted to add a small chapter on BMP to the docs basically to explain how to use datasource. I'll put your name and you will become famous :) Thanks. Vincent. -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de Allen fogleson Envoye : jeudi 28 juin 2001 9:11 A : [EMAIL PROTECTED] Objet : Re: [JBoss-user] Is there BMP sample? you would still use a datasource... well unless you just want around the whole transaction, connection pooling of the container... I cant imagine why. I can whip together a quick simple example if you havent found what you need yet... email me direct Al - Original Message - From: Boris Garbuzov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 3:50 PM Subject: [JBoss-user] Is there BMP sample? Is there any documentation article with BMP example? Any BMP is database specific so I do not use JAWS or datasources, but write write a SQL with specific data types? I would like to use MySQL. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Strange Behavior When DataSource goes down.
every time i have seen a hang on startup with the DS binding it was because either a) the driver wasnt available to Jboss b) The driver wasnt available to jboss. I have actually seen a driver mysteriously disappear from the lib/ext dir. (i think some moron deleted the jar lol) and had this problem. Al - Original Message - From: danch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 8:11 PM Subject: Re: [JBoss-user] Strange Behavior When DataSource goes down. Ferguson, Doug wrote: We are seeing jboss hang when the datasource goes down and we cannot restart jboss becuase it hangs on the datasource binding. This is terrible because we have implemented within our beans but it can't work becuase jboss is hanging. Implemented what within your beans? I agree that this is really bad behavior. I'll start looking at the pool code and see if I can come up with something. -danch ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Access control
it would just be a mess if you had to have method permissions for separate users, and not very dynamic at all. thats what roles are for. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 8:48 PM Subject: Re: [JBoss-user] Access control On Wed, Jun 27, 2001 at 07:02:05PM -0400, Allen fogleson wrote: fortunately yes. Why is this fortunate? Cheers Bent D -- Bent Dalager - [EMAIL PROTECTED] - http://www.pvv.org/~bcd powered by emacs ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Key generation by random numbers
A similar technique is to do something like concat your content, then use the string.hashCode function to get a hashcode. fairly well distributed, easily repeatable... etc etc. :) Al - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 9:28 AM Subject: RE: [JBoss-user] Key generation by random numbers Well... I use similar technique for generating unique IDs, but I utilize the MD5 hash function. It is believed that it provides enough uniqueness. The only problem is that you cannot use the long as primary key field (in my case I use String). But you may convert 128-bit digest into 2x64-bit longs. It has similar pros and cons, however the max value is now 2^128 which is quite large number :). Regards, Roman. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 26. Juni 2001 14:54 To: jboss Subject: [JBoss-user] Key generation by random numbers As a follow-up to the debate on how to get auto-increment primary keys: Is it feasible to use a random number generator to generate primary keys? I don't really need my records to have steadily increasing keys and my number of records will presumably be much smaller than the size of my value space (4 billion? depending on data type for prim-key). So if I do something along the following when making a new record; boolean created = false; do { Long key = generateRandomLong(); created = ejb.create(key, contents); } while (!created); (here, ejb.create() takes the primary key of the new record as its first param and returns true if success, false if not success) My theory is that most of the time, the creation will succeed on the first attempt, based on the assumption that number of records is insignificant compared to the value space of Long. Pros: I don't need to do manual synchronisation with a central key-generating bean. I don't need to do DB-specific calls to get it to generate for me. Cons: Unpredictable time use for creation. Unusable if number of records becomes significant compared to value space of Long. I am assuming also that the creation of a random Long is a fast process. Cheers Bent D -- Bent Dalager - [EMAIL PROTECTED] - http://www.pvv.org/~bcd powered by emacs ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Can custom finder methods return java.util.Vector
You can return a Vector, in practice we have found it easier to return a Collection, but since it subclasses (indirectly) Collection a Vector can be returned. Al - Original Message - From: Anoop [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 3:43 PM Subject: [JBoss-user] Can custom finder methods return java.util.Vector Hi, Can ejb finder methods return java.util.Vector As for the ejb specification it has to return either the primary key class or a collection of primary keys. Can Vector be its return type, as Vector implements java.util.List which in turn extends java.util.Collection, can finder method return any of the sub classes of Collection or it has to be only the Collection interface? Thanks, Anoop. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Sun J2EE to jBoss
You can reuse the ejb-jar.xml deployment descriptor if that is what you are asking. However, if you are asking about the specific j2eeRI.xml files, then no. Using BMP you shouldn't have too many problems or need to create extra files, other than potentially a jboss.xml to handle security. Al - Original Message - From: Ralph Jensen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 26 Jun 2001 13:41:06 +0800 Subject: [JBoss-user] Sun J2EE to jBoss Reply-To: [EMAIL PROTECTED] Deployment descriptor Can I re-use the ejb-jar.xml produced by Sun's deployment tool ( minus the JMS related code ) ? For later: Using jbossMQ, is it possible to create JMS Topics and Queues without restarting the server? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Using java beans in finder methods
sure... why not. lol. Do you mean does it automatically create the finders for you? No, but finders can be overridden (even in CMP beans) in the implementation class. Al - Original Message - From: Eduardo Bastos Leite [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 2:25 PM Subject: [JBoss-user] Using java beans in finder methods Does jboss suport the use of javabeans as parameters for cmp finder methods, like what happens with Inprise's App Server?? If it does, how it works?? Thanks in Advance, Eduardo B. Leite [EMAIL PROTECTED] _ Oi! Você quer um iG-mail gratuito? Então clique aqui: http://registro.ig.com.br/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] FREE LOADERS
I agree. There is still plenty of work that can be done on the documentation. Tobias is heading up a great effort to bring it up to compliance with 2.2 but we will soon be into 2.4 and 3.0 and will need more work there again. There could be more tutorials on how to actually use JBoss (im working on one now that goes from a basic HTML page deployed to JBoss-tomcat/jboss-jetty to actually calling session and entity beans) There is a world of work left and I think it is better to keep the information abut JBoss centralized here at Jboss. I think of it like SCC anywhere else. once it is all over the place, with no mediated checkin and checkout, who knows if the documentation you are reading is valid? Al - Original Message - From: marc fleury [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 4:07 PM Subject: [JBoss-user] FREE LOADERS Whatever you guys are looking for, what saddens me is that you want to hop on the boat with the first desconocido who comes along rather than invest that energy in the JBoss website and book. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Sun J2EE to jBoss
dang i missed that... thanks Dan. Sometimes what you do out of habbit you just forget heh Al - Original Message - From: danch (Dan Christopherson) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 4:40 PM Subject: Re: [JBoss-user] Sun J2EE to jBoss Allen fogleson wrote: You can reuse the ejb-jar.xml deployment descriptor if that is what you are asking. However, if you are asking about the specific j2eeRI.xml files, then no. Using BMP you shouldn't have too many problems or need to create extra files, other than potentially a jboss.xml to handle security. Al You may also need jboss.xml to map your bean's expected datasource name (java:comp/env/jdbc/MyDataSource) to a resource-manager that names the global JNDI name for the datasource (java:/SomeDataSource). Gotta get that in the docs with an example! -danch ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] CMP example of primitive key using int
Can you include the code. I assume you are wrapping the int primary key in the primary key class, like RMH does in the book? Al - Original Message - From: Hiep Luong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 2:01 PM Subject: [JBoss-user] CMP example of primitive key using int I've been trying to get the cabinbean example in the RMH Enterprise JavaBeans book to work. This example has a primary key that is primitive int. The way they code it is by creating a cabinPK class which goes into the prim-key-class element in the deployment descriptor with a corresponding primkey-field element. It compiled but when I ran this, the table gets created but no primary key constraint is created in oracle but no exceptions either. Beans are created just fine and I see data in the table BUT when I try to retrieve the bean by using findbyprimarykey method I get No such entry! exception always. Has anyone successful got this to work? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] create(), ejbCreate() and id
if not db independent. I freely admit we do this all the time. we dont do it in the ejbCreate... we do it before calling create, but same difference. recently i had to write some components (really a set of beans/tags/jsps) that would work on (potentially) several databases... it was a little more difficult :) Al - Original Message - From: danch (Dan Christopherson) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 10:06 AM Subject: Re: [JBoss-user] create(), ejbCreate() and id You can in limited ways: you're quite free to get a value from a sequence (Postgres or Oracle) within your ejbCreate code. I believe this is generally a pretty good comprimise. -danch ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] getEJBHome(): NoInitialContextException
uhmmm why are you getting the home again? you already have the home. - Original Message - From: Boris Garbuzov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 2:42 PM Subject: [JBoss-user] getEJBHome(): NoInitialContextException I am just playing with EJB API in JBoss. I successfully created an entity bean and ran its business methods, but can not get home. Can you give me any suggestions? -client console- java.lang.reflect.UndeclaredThrowableException: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646) client code Properties env = new Properties(); env.setProperty(java.naming.factory.initial, org.jnp.interfaces.NamingContextFactory); env.setProperty(java.naming.provider.url, localhost:1099); env.setProperty(java.naming.factory.url.pkgs, org.jboss.naming); Context jndiContext = new InitialContext (env); String location = cartEjb/OrderEntity; Object boundObject = jndiContext.lookup (location); OrderHome home = (OrderHome) PortableRemoteObject.narrow (boundObject, OrderHome.class); OrderRemote orderRemote = home.create (sessionId, customerName, cartRemote); ... // business methods run fine EJBHome gotHome = orderRemote.getEJBHome(); // here it fails ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] primitive primary key description
technically an rmi/iiop type... serializeable class. Long would work... long wont. - Original Message - From: Vinay Menon To: [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 3:33 PM Subject: Re: [JBoss-user] primitive primary key description Culprit is prim-key-typelong/prim-key-type [the one you have flagged]. Needs to be Java classes I believe. Vinay - Original Message - From: Boris Garbuzov Sent: Saturday, June 23, 2001 8:06 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] primitive primary key description Sorry for not digging into DTDs first. I heard, to make primary key primitive, one has to change tag prim-key-class to prim-key-type, but it does not work. But it does not work. What is a solution? - ejb-jar.xml - cmp-fieldfield-namecreationTime/field-name/cmp-field primkey-fieldcreationTime/primkey-field !-- can we have primary key to be a primitive? -- prim-key-typelong/prim-key-type --server log - [Container factory] org.jboss.ejb.DeploymentException: Error in ejb-jar.xml for Entity Bean OrderEntity: expected one prim-key-class tag ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] More Newbie Questions
off hand I would say the second line is a narrowing from javax.rmi.PortableRemoteObject it should say session = (Session)PortableRemoteObject.narrow(InitialContext().lookup((java:comp/env /mail/MyMail), Session.class); Al - Original Message - From: Hunter Hillegas [EMAIL PROTECTED] To: JBoss 2 [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 6:37 PM Subject: [JBoss-user] More Newbie Questions I've got another newbie question. I perused the Javadoc and couldn't find an answer... In the JBoss docs, in the JavaMail section there is some sample code... One part is like this: try { session = (Session)new InitialContext().lookup(java:comp/env/mail/MyMail); InitialContext().lookup((java:comp/env/mail/MyMail), Session.class); } The second line won't compile. What does it do? I tried to figure it out based on the JNDI docs but I'm at a loss. Thanks, Hunter ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Mail list volume - victim of it's own success?
Actually how to connect JBoss to oracle is in the docs. I just went through it and it all appears to be current. Al - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: JBoss User [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 11:34 PM Subject: [JBoss-user] Mail list volume - victim of it's own success? The following has been tossed out before, but I thought I would raise it again anyway. We are currently at about 200 messages/day on this mailing list. I learn a great deal from these messages - I currently have 253 saved for future reference. I hopefully also help out a little bit. But lately I'm feeling like I'm losing the battle to stay on top of this list. As JBoss gets more popular, the volume is likely to continue to grow until no one can keep up with it. How would the group feel about any or all of the following? I will of course bow to the group consensus (or the powers that be) and adjust my reading habits as necessary. (1) Split the list according to major product subsystems - jms, db, connector, security, core, samples, etc. This would allow us to diligently follow those subsystems where we have some expertise and can therefore contribute, and just skim the others. (2) Switch to newsgroups so we can have retained threads of conversation. (3) Ask people to volunteer to contribute some time and effort on one of the subsystems split off in (1). These volunteers would be responsible for folding in as much material as possible from the mail list/newsgroup into the documentation. I have experience in the database area, and I've personally answered the question How do I configure Jboss to connect to Oracle? at least a dozen times in the last 2 months. I would gladly take the time to put this into the documentation once and for all to be done with that particular question. I personally think this item is the most important, and that if we do it well, the volume on the list should start to decrease. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Apache+Tomcat+JBoss
There is a JBoss-Jetty bundle... you dont need tomcat if you have jetty. it is also a servlet/jsp container Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 24, 2001 12:41 PM Subject: Re: [JBoss-user] Apache+Tomcat+JBoss At 11:14 AM 6/24/01 +0100, you wrote: You might want to consider Jetty (which is a pure Java HTTP Server and Servlet Container) and has been integrated intravm with JBoss. All I need is a JBoss-Tomcat-Jetty bundle and I'll start using it. r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Composite Primary Key and CMP.
create a custom primary key class then define the primary key fields... al - Original Message - From: Devraj Mukherjee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: JBoss List Serve [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 1:36 AM Subject: [JBoss-user] Composite Primary Key and CMP. Hi all, I am trying to create a CMP Entity Bean where I need to define a combination of more than one field as the primary key for the table, I was wanting to know how do we define this in the deployment descriptors. Thank you. Regards, Devraj ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] jsp only
The advantage of the ear file is setting the context root of course but other than that I agree a war file would work fine. Al - Original Message - From: Tahir Awan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 22, 2001 10:01 AM Subject: RE: [JBoss-user] jsp only you better just create the .war file as there is no need to have .ear file. Tahir -Original Message- From: Richard Bottoms [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 4:49 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] jsp only Can someone do a simple JSP only app deployed using an .EAR file. I want to deploy an .EAR file with only JSP pages in it, no calls to EJB's or page redirects. Thanks, r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Using remote ejb inside of a webapp w/Jetty
you do that in the jboss-web.xml. it looks like so ejb-ref ejb-ref-nameenv/ejb/hello/ejb-ref-name jndi-namehello/jndi-name /ejb-ref you put the jboss-web.xml in the WEB-INF directory with your web.xml file. al - Original Message - From: Jason Dillon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 22, 2001 6:50 PM Subject: [JBoss-user] Using remote ejb inside of a webapp w/Jetty Can someone explain the exact steps (files to configure and so on) that are requried to use a remote ejb inside of a .war file running inside of Jetty. I am assuming that I need an ejb-ref in the web.xml, but how do I map a reference to a ref-jndi-name ? --jason ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] closing PreparedStatements
also I have always closed things in reverse order.. resultset, preparedstatement, connection. it may or may not matter depending on the drivers i guess, but better safe than sorry. amazingly ihave seen problems with oracle and closing connections before resultsets and prepared statements. at least that is all we could ever figure out the problem was. al - Original Message - From: danch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 21, 2001 10:02 AM Subject: Re: [JBoss-user] closing PreparedStatements Tim Yates wrote: Wotcha! That's what I did. Sorry for not supplying the implementation for that helper. 'ere it is. public static void close( Connection c, PreparedStatement s, ResultSet r ) { try { if( c != null ){ c.close(); } if( s != null ){ s.close(); } if( r != null ){ s.close(); } } catch( SQLException e ){ throw new EJBException( ExtendedJDBC: close: + e.getMessage() ); } } You should probably also put a try ... catch block around each close, otherwise it's vaguely possible that an exception thrown by one close method could cause you to not close another object or two. -danch ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Urgent: storing vector in the database
Your dba is going to hate you...In general I can think of very few reasons to store an object in the database. I would suggest something like a command pattern to handle the situation of not knowing what the array contains. unless you have a limitless assortment of possibilities. you can use the command pattern to pass the array around till you find the appropriate entity bean to store it. likewise on the other side of things to return one to the client. I guess it is a matter of opinion but I dont store objects in a blob unless I absolutely have to. al - Original Message - From: Igor Rabinovich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 21, 2001 11:06 AM Subject: RE: [JBoss-user] Urgent: storing vector in the database I did not define any new sql type for vector. Vector is java.lang.Object. I don't have any problems with vector but with array which vector class contains. I can read the Vector object from the database, but the vector size is 0 and data array of vector is empty. I try not to use any sql statements, but only CMP. I did some research and my major problem is how to store array of any type in the database with CMP. Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Allen fogleson Sent: Wednesday, June 20, 2001 5:05 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Urgent: storing vector in the database what sql type are you using? blob? in general I wouldnt serialize a vector to a data table. I would populate a vector (actually probably an array list... ) from sql results. Al - Original Message - From: Igor Rabinovich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 7:41 PM Subject: [JBoss-user] Urgent: storing vector in the database Hi ! My entity bean member variable is Vector type. I'm adding elements to the vector and storing in the database. I can load vector and its element from the database. But when I restart Application server I can load only empty vector of size 0. All data get lost. I'm using JBOSS and MySQL with CMP. What the problem??? Igor ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Please, please , please
ill jar this all up as soon as i get t the machine i did the tutorial on. al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 1:57 PM Subject: [JBoss-user] Please, please , please Would someone send an example set of files for simple hello or anything else with the deployable .ear file, and all the sources jar'd in the directory structure you used to compile it. I've been up for two days and I'm sure I'm missing some minute thing. I am working with vanilla installs of the jboss-tomcat bundle. I get things to compile, so I'm sure the problem is in the .xml files. I'm getting successful deployments in some cases and see only the directory instead of the app running. Or the app runs and I get null pointer exception. Or other assoretd weirdness. If I can get a .ear that works and the exact tree to create it I think I'll get this down. Thanks, r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] hello.ear example: Servlet works OK, but not JSP
in my example everything was mapped to the default context (/). so the helloServlet class is mapped to /hello. http://localhost:8080/hello calls the servlet class helloServlet to see a JSP invoked try calling http://localhost:8080/ the included jsp index.jsp is mapped as a welcome file, so that when you access that url you should see the same example as if you called the servlet. This is because ALL the jsp does is forward to /hello Al - Original Message - From: Richard Kasperowski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 3:29 PM Subject: [JBoss-user] hello.ear example: Servlet works OK, but not JSP Allen Fogleson's hello example from June 16 is a nice tutorial and works well enough. I'm having a problem with it, though. This URL works fine: http://localhost:8080/hello It maps directly to the servlet. These URLs don't work: http://localhost:8080/hello/ http://localhost:8080/hello/index.jsp They result in Not Found 404. Using a .ear file as in Allen's example, how do I get JBoss+TomCat to handle things that aren't servlets? Thanks, -- Richard Kasperowski (mailto:[EMAIL PROTECTED]) Tel: 617-576-1552, Fax: 617-576-2441 http://www.altisimo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Please, please , please
it is all in the deployment descriptors... first web.xml the relevent parts first to map the servlet servlet servlet-namehello/servlet-name servlet-classsimple.helloServlet/servlet-class /servlet servlet-mapping servlet-namehello/servlet-name url-pattern/hello/url-pattern /servlet-mapping this names out helloServlet.class hello, then maps ALL calls to /hello to that servlet so http://localhost:8080/hello results in a call to the helloServlet.class. now... welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list tells us that our welcome files... most people think of index.html as being the welcome file the welcome file is index.jsp. so... IF we had a directory hello that contained index.jsp then http://localhost:8080/hello/ would result in that index.jsp showing. however we dont have that directory. now the application.xml first we need to tell about our web application module web web-uriwebapp.war/web-uri context-root//context-root /web /module here we map this web application to / so a call to http://localhost:8080/ will result in our index.jsp showing. if you want to map to hello then change the context-root//context-root to context-root/hello/context-root then to see JUST the servlet you would call it like this http://localhost:8080/hello/hello and to see the index.jsp you would call http://localhost:8080/hello/ Hope that clears up some things. Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 5:26 PM Subject: Re: [JBoss-user] Please, please , please At 01:33 PM 6/20/01 -0700, you wrote: How could there be a simpler HelloWorld ?? :) :) It's not just the code compiling, it's understanding how the thing works. For instance I now know that I don't need to manually change the server.xml file to deploy applications. But I still don't know why /hello works, and hello/ or /hello/index.jsp does not. A tar'd example with all the directories in place eliminates mistakes of directory structure and shows the requirement to get servlet.class into WEB-INF/classes. But, I still don't know if there is a way to undeploy an app in the same way that all needed files are deployed. Seems like an application server would have a remove feature in place or on the improvements list. When I first started using Apache to manage sites I was just as lost in the beginning. But, the docs on Apache covered every single line in httpd.conf. Once I got the server up I could experiment with what would break/improve it. As I mentioned in an earlier post, I would love to learn every quirk and optimization in JBoss-Tomcat. But, what I really need is to get it to serve up pages right now, which is 25% of what I need to accomplish. A JDBC-MySQL 'hello world' would solve another %25 of what I need. How about a 'hello-world' for sending email? Last, a How-to on hot-swapping applications would be good. I need to know if I can send people to an error page if an app has been removed for instance? I'm sure this info is in docs or newsgroups some where but I don't always have time for marathon learning binges. Many folks just need a webserver/app server to out send out HTML, merge data, maintain apps, and send email. Four 'hello-world' examples and were happy. Why it works is a matter for another time. Just give beginners examples that work with a completely vanilla install and we can improve our knowledge over time. How this benefits the creators of JBoss is we can roll out JBoss Apps on just about anything that will run Apache. That starts to make JBoss ubiquitous and opens the door to high level consulting and EJB component libraries. Hell I'd pay now for a 1-2-3 setup for a MySQL/JDBC connectivity EJB installer. It's trading 'work right now' for time to learn later. As a matter of fact some of my partners are kicking around the idea of a stripped down Red Hat distro that comes up with Apache, MySQL JDBC, JBoss-Tomcat and management console ready to go. Just add Sun's JDK/JSDK. I'm running my tests on a Pentium 166 with 32 megs of RAM. It's a junker machine, but everything works just fine. Can you imagine providing WebLogic-like functionality to webmasters in a $50 package that will run on anything? Thanks for all the help and on behalf of the newbies, I swear I'll reach back and help once I've got the hang of things. r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] hello.ear example: Servlet works OK, but not JSP
the problem here if you have not changed the ear is that I use the default context not /hello see my earlier message to Richard on how to change the context Al - Original Message - From: Richard Kasperowski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 5:03 PM Subject: Re: [JBoss-user] hello.ear example: Servlet works OK, but not JSP Gabriel Mihalache wrote: Using a .ear file as in Allen's example, how do I get JBoss+TomCat to handle things that aren't servlets? Do you have the /lib/tools.jar from your JDK in you classpath? You need it to compile JSPs! Yeah, that would emit a different error message. The Java compiler is there and works fine: I can use the TomCat JSP examples with no problem. -- Richard Kasperowski (mailto:[EMAIL PROTECTED]) Tel: 617-576-1552, Fax: 617-576-2441 http://www.altisimo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Urgent: storing vector in the database
what sql type are you using? blob? in general I wouldnt serialize a vector to a data table. I would populate a vector (actually probably an array list... ) from sql results. Al - Original Message - From: Igor Rabinovich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 7:41 PM Subject: [JBoss-user] Urgent: storing vector in the database Hi ! My entity bean member variable is Vector type. I'm adding elements to the vector and storing in the database. I can load vector and its element from the database. But when I restart Application server I can load only empty vector of size 0. All data get lost. I'm using JBOSS and MySQL with CMP. What the problem??? Igor ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] How to set the classpath to run the InterestClient sample
just call it without the .class if you call it with .class java is looking for a class called class in the package InterestClient Al - Original Message - From: Christine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 21, 2001 12:13 AM Subject: [JBoss-user] How to set the classpath to run the InterestClient sample Hi, I am using JBOSS 1.2.2 on WIN2000. I followed the documentation to run the test client from the directory the InterestClient was compiled.: java -classpath c:\jboss_dist\client\jboss-client.jar;c:\jboss_dist\client\jbosssx-client.ja r;c:\jboss_dist\client\jnp-client.jar InterestClient.class however, i am getting: Exception in thread main java.lang.NoClassDefFoundError: InterestClient/class Could any tell me how i should set the classpath? thanks -- Jia (Christine) Li Department of Computer Science University of Calgary Tel: 403-2207140 (O) ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JMS - javax.jms.QueueConnectionFactory not bound
Natalie, It looks like the connectionQueue is not being created in JBoss... are you sure you have created a Queue there? Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ng, Natalie Sent: Tuesday, June 19, 2001 5:43 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] JMS - javax.jms.QueueConnectionFactory not bound Hi all, I am new to JBoss so forgive me if this has been covered before. I have an application that uses JMS within an EJB (not message driven bean). I ported the application from JRun to JBoss and I got the following error: [WfStubQueueMgr] javax.naming.NameNotFoundException: javax.jms.QueueConnectionFactory not bound [WfStubQueueMgr]at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:245) [WfStubQueueMgr]at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) [WfStubQueueMgr]at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) [WfStubQueueMgr]at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) [WfStubQueueMgr]at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349) [WfStubQueueMgr]at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333) [WfStubQueueMgr]at javax.naming.InitialContext.lookup(InitialContext.java:350) ... snip ... The application was working fine under JRun. I do not have a jboss.xml file, and I lookup the queue factory as follows: Properties env = new Properties(); env.setProperty(java.naming.factory.initial, org.jnp.interfaces.NamingContextFactory); env.setProperty(java.naming.provider.url, localhost:1099); env.setProperty(java.naming.factory.url.pkgs, org.jboss.naming); InitialContext context = new InitialContext(env); final QueueConnectionFactory factory = (QueueConnectionFactory) context.lookup(QueueConnectionFactory.class.getName()); Any idea on what I need to do to get this working? Thanks. regards, Natalie ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Who can send me a sample about security in jboss
there is a good example of complete security in jboss 2.2.2 here www.jboss.org/documentation/HTML/ch11s83.html Al - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 19, 2001 9:42 PM Subject: [JBoss-user] Who can send me a sample about security in jboss hi,all: I know how to write the assembly descriptor in ejb-jar, define some security-role-ref and method-permission but I don't know what to do next. In weblogic, I can define security-role in other xml file, but how to do in jboss. Is there any examples about this? I can not understand the manual of jboss very clearly. thanks all. _ [×ã²»³ö»§ ÇáËÉÉÏÍø] ÉÏÍøרÓúţº95963£¬Óû§Ãû/ÃÜÂ룺263 Ìػݾ«Æ·¿Õµ÷ÂòÓÖËÍ http://shopping.263.net/hotsale/aircondition/index.asp ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] quick tutorial
Hmmm well I think you could include them in the lib directory, it isnt platform independent then, but it should work in JBoss. (I havent tested that) Those classes do have to be available to the client, be it an application client or a web client, so they should be in the war file. I deployed the example on weblogic 6 and didnt get any errors, I havent tested any other containers though. Al - Original Message - From: Matthew Devaney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 18, 2001 7:25 AM Subject: RE: [JBoss-user] quick tutorial Hi, Thanks for the example Al, but is there anyway to get it working without including the ejb home and remote classes inside the WAR file?. The reason for wanting to do this is that I've been given to understand that doing so can cause class loader exceptions when using the ear file in other containers. This is due to the container trying to load the same class twice (once from the EJB, once from the war file) So far my attempts at something like this at JBoss 2.2.2 have all met with classNotFound exceptions within the jsp page during compile time - however it seemed to work without problems at JBoss 2.2.1. Thanks, Matt -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Manual suggestions
there is a servlet... helloServlet mapped to /hello Al - Original Message - From: Saint-Martin Cecile [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 18, 2001 10:19 AM Subject: RE: [JBoss-user] Manual suggestions I read your mail after sending mine, so sorry. Your example is interesting, it will be perfect if there were a servlet :) SAINT-MARTIN Cecile [EMAIL PROTECTED] -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de Allen fogleson Envoyé : lundi 18 juin 2001 15:29 À : [EMAIL PROTECTED] Objet : Re: [JBoss-user] Manual suggestions hmmm when you say a full app do you mean with security? I wrote up a simple ear app and posted it here. it has servlet, jsp and a session bean. I could expand on that (And really the write up was rather quick so not 100% great docs :) Al ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] is there a t3:// for JBoss
t3 is the weblogic specific wire protocol. switch to straight RMI. Even better, if you are using the JBoss/tomcat or JBoss/jetty package you dont even need to populate your initialcontext call. Im not a big fan of that method anyway, since you end up tying your app to a single container... al - Original Message - From: Scott Bermon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 18, 2001 3:17 PM Subject: [JBoss-user] is there a t3:// for JBoss We are porting an application to JBoss from Weblogic. When we connect to the Weblogic server the, PROVIDER_URL was t3://localhost:7001. What is the equivalent in JBoss? Where is this set? Thanks -Scott ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] newbie stuff jboss vs. simple classes
take a look at the J2EE blueprints on java.sun.com thats a good start. Although i disagree with their implementation of Data Access Objects, It is a good start on EJB. you should never be just dropping classes around. A good design phase up front will save you a lot of issues later, such as scalability, performace, etc. Al - Original Message - From: Gabriel Mihalache To: [EMAIL PROTECTED] Sent: Monday, June 18, 2001 4:44 PM Subject: [JBoss-user] newbie stuff jboss vs. simple classes Hi! I'm developing a simple site using Tomcat with JSP and Servlets. JSP uses JavaBeans wrote as classes, put in the WEB-INF folder. Why and where should a j2ee sollution be used instead of just droping classes around? I've just downloaded jboss because I want to know more about beans. Any good docs?
Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan
Actually from a specification point the only thing required to support userTransaction is the session EJB. container providers --may-- chose to allow access to the Usertransaction object outside of a session EJB but it is not transportable accross vendors. It would seem that even the specification would want you to keep that logic in the Session EJB, and not move it from that tier. That would in general cover the why :) Al - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 1:49 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan And the moment you put business logic in something else but EJB, you need to control transactions which takes us back to my original question to Marc Fleury. When does JBOSS plan to support the use of UserTransaction from a VM that is not running JBOSS? Marc seems to discourage this usage in one reply, so my second question is why? Thanks. Anh - Original Message - From: Allen fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 10:25 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan well not necessarily just EJB... although i would put most of it there. probably 99% of it would be in session EJB. I would use limited servlets for business logic. mostly i would do JSP -- Servlet --- EJB views controllers model/business logic Al - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 12:53 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Basically, you are telling me to move all business logic from APP to an EJB. I just don't believe it is always desirable to keep all business logic within EJBs. I don't think a business layer necessarily has to consist of EJBs alone. Anh - Original Message - From: David Jencks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 8:52 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Hi, Ok, this is a slightly different question than the one I thought you were asking, and as you say, 2pc is not relevant. Here are my thoughts on your proposed design: 1. I assume that you do not want to hold transactions open while waiting for human input. If you need to for some reason, you are apt to be in trouble under high load as all those open transactions consume server resources for unknown and long periods of time. 2. I like to think of the architecture of applications like this, in 5 layers. presentation layer (what do I see)--- jsp presentation manager (workflow control, what do I see next) servlet service subsystem (business logic, data manipulation) -session ejb model subsystem (data model, system state) ---entity ejb persistence subsystem -(jdbc, db) I find this really clears up most of my questions about where to put code, and makes changes much simpler and more local. In this framework, I haven't found a case where knowledge of transactions need to get above the business logic layer. I would be curious to know if you have an example where this is appropriate. Thanks david jencks On 2001.06.16 21:07:20 -0400 Phan Anh Tran wrote: Let's forget the 2PC stuff for now...Here is a scenaro: [APP/VM-1] - [EJB-1,EJB-2,...EJB-n/JBOSS/VM2] -JDBC- [DataStore-1] Each method of each of the EJBs forms a transaction by themselves if noone else issues explicit transaction control a la begin,commit,abort. APP takes on this role. APP decides the set of EJBs' methods will form 1 transaction. Same problem, replace APP with say a servlet running in a Servlet Container in a different VM and you still need the solution where it is possible to obtain a transaction from a separate VM. Sure, you could move the all the APP transaction control into one single method of one single EJB...but that's not always desirable, I believe... Anh - Original Message - From: David Jencks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 11:34 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Hi, I think the advice to stay away from distributed transactions is universal design advice. Basically using distributed transactions just about guarantees bad performance, as resources get tied up waiting for the 2pc to make its way to all those other
Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan
Actually I looked it up again, in the EJB spec it says only session beans (with bmt) however the J2EE spec says it should be available to servlets and JSP pages. So I guess the question of when will it be available outside of Session EJB is valid :) - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 3:30 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Are you talking about the JTS/JTA or the EJB specification? Thanks. Anh - Original Message - From: Allen fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 11:25 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Actually from a specification point the only thing required to support userTransaction is the session EJB. container providers --may-- chose to allow access to the Usertransaction object outside of a session EJB but it is not transportable accross vendors. It would seem that even the specification would want you to keep that logic in the Session EJB, and not move it from that tier. That would in general cover the why :) Al - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 1:49 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan And the moment you put business logic in something else but EJB, you need to control transactions which takes us back to my original question to Marc Fleury. When does JBOSS plan to support the use of UserTransaction from a VM that is not running JBOSS? Marc seems to discourage this usage in one reply, so my second question is why? Thanks. Anh - Original Message - From: Allen fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 10:25 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan well not necessarily just EJB... although i would put most of it there. probably 99% of it would be in session EJB. I would use limited servlets for business logic. mostly i would do JSP -- Servlet --- EJB views controllers model/business logic Al - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 12:53 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Basically, you are telling me to move all business logic from APP to an EJB. I just don't believe it is always desirable to keep all business logic within EJBs. I don't think a business layer necessarily has to consist of EJBs alone. Anh - Original Message - From: David Jencks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 8:52 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Hi, Ok, this is a slightly different question than the one I thought you were asking, and as you say, 2pc is not relevant. Here are my thoughts on your proposed design: 1. I assume that you do not want to hold transactions open while waiting for human input. If you need to for some reason, you are apt to be in trouble under high load as all those open transactions consume server resources for unknown and long periods of time. 2. I like to think of the architecture of applications like this, in 5 layers. presentation layer (what do I see)--- jsp presentation manager (workflow control, what do I see next) servlet service subsystem (business logic, data manipulation) -session ejb model subsystem (data model, system state) ---entity ejb persistence subsystem -(jdbc, db) I find this really clears up most of my questions about where to put code, and makes changes much simpler and more local. In this framework, I haven't found a case where knowledge of transactions need to get above the business logic layer. I would be curious to know if you have an example where this is appropriate. Thanks david jencks On 2001.06.16 21:07:20 -0400 Phan Anh Tran wrote: Let's forget the 2PC stuff for now...Here is a scenaro: [APP/VM-1] - [EJB-1,EJB-2,...EJB-n/JBOSS/VM2] -JDBC- [DataStore-1] Each method of each of the EJBs forms a transaction by themselves if noone else issues explicit transaction control a la begin,commit,abort. APP
Re: [JBoss-user] undeploy
you can just delete the ear from the deploy directory and it will be undeployed automatically Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 1:10 PM Subject: [JBoss-user] undeploy So the next obvious question. How do you undeploy the Hello package? Thanks, r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] quick tutorial
After seeing the question arise so many times about how to bind an EJB to the env/ejb/nameofbean context I have put together a quick tutorial to show that. the two included files are the complete ear file that does this, and a text file explaining what is happening. I didnt get into how to actually use ant, or create jar files, but if there is a call for that I can do that also. Hope this helps some people. Al Simple Hello World Jboss Tutorial The purpose of this tutorial is to give a simple example of calling session EJB from a servlet. Step 1: Create the EJB We will create a simple stateless session ejb, with a single method sayHello. First let us create the home interface as follows, and save it as simple/helloHome.java package simple; import java.rmi.*; import javax.ejb.*; public interface helloHome extends EJBHome { public helloRemote create() throws RemoteException, CreateException; } then we will create the remote interface which allows us to acces the sayHello method on our instantiated ejb in the container. Name this file helloRemote.java package simple; import java.rmi.*; import javax.ejb.*; public interface helloRemote extends EJBObject { public String sayHello() throws RemoteException; } finally we will create our bean class and name it simple/hello.java package simple; import java.rmi.*; import javax.ejb.*; public class hello implements SessionBean { private SessionContext sessionContext; public void ejbCreate() { } public void ejbRemove() { } public void ejbActivate() { } public void ejbPassivate() { } public void setSessionContext(SessionContext context) { sessionContext = context; } public String sayHello() { return Hello World!; } } now we will create the deployment descriptor for this ejb. Save this file as META-INF/ejb-jar.xml ?xml version=1.0 encoding=Cp1252? !DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd' ejb-jar enterprise-beans session ejb-namehello/ejb-name homesimple.helloHome/home remotesimple.helloRemote/remote ejb-classsimple.hello/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /session /enterprise-beans assembly-descriptor container-transaction method ejb-namehello/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar finally we will create the session.jar which contains all our EJB information. Since this is a simple example I did not use ant to make the project. I use Jbuilder 4, and simply made archives. You should create a jar file that contains the following structure session.jar - META-INF - ejb-jar.xml - simple - helloHome.class - helloRemote.class - hello.class this completes the EJB creation phase. Step 2: Create the web application This web application will be very simple, consisting of a single JSP file, and a servlet. The intent here is to keep it very simple so that the user can understand what is going on. First let us create a simple index.jsp this file will simply use a jsp:forward ... / call to forward the remote user to the hello servlet. It looks like the following. %@ page language=java % jsp:forward page=/hello / name this file index.jsp next we will create our servlet. The servlet will get an initial context, and use our hello bean. This file should be saved as simple/helloServlet.java package simple; import java.io.*; import java.util.*; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import javax.servlet.*; import javax.servlet.http.*; import simple.*; public class helloServlet extends HttpServlet { private static final String CONTENT_TYPE = text/html; /**Initialize global variables*/ public void init(ServletConfig config) throws ServletException { super.init(config); } /**Process the HTTP Get request*/ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } /**Process the HTTP Post request*/ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { InitialContext ctx = null; response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); out.println(html); out.println(head); out.println(titleSimple Hello/title); out.println(/head); out.println(body); out.println(h1Simple Hello World Call/h1); try { //Lets get our context ctx = new InitialContext(); //then do the lookup on the home object Object o = ctx.lookup(java:comp/env/ejb/hello); helloHome home =
Re: [JBoss-user] disregards XML comments
is the datasource listed in jboss-auto.jcml? this file is created by jboss, but you can comment out the lines there, or delete the entire file and then it should wrk. Al - Original Message - From: Boris Garbuzov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 7:39 PM Subject: [JBoss-user] disregards XML comments Hello, Larry and all those who can explain. I added some potential datasource to my tomcat/jboss.jcml file. Since database is not yet created, I commented out the tag, but I still see the followith message on console as if it disregards my comments: - [mySQL] Starting [mySQL] XA Connection pool mySQL bound to java:/mySQL !-- Larry Budnick [EMAIL PROTECTED], [EMAIL PROTECTED] -- !-- mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=mySQL attribute name=PoolNamemySQL/attribute attribute name=DataSo urceClassorg .opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=Properties/attribute attribute name=URLjdbc:mysql://209.53.249.186:3306/ForJBoss/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUseradministrator/attribute attribute name=MaxSize10/attribute attribute name=Passwordboradmin/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean -- ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] quick tutorial
Just trying to help out. There are some holes, for instance no security at all is used. but it shows the basics of calling an EJB from a servlet. Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 9:04 PM Subject: Re: [JBoss-user] quick tutorial At 03:33 PM 6/16/01 -0400, you wrote: After seeing the question arise so many times about how to bind an EJB to the env/ejb/nameofbean context I have put together a quick tutorial to show that. the two included files are the complete ear file that does this, and a text file explaining what is happening. You are the man. r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] quick tutorial
assuming a default installation with no changes to the jboss-tomcat install and assuming you are accessing from the computer running jboss. once it deploys you should be able to call it just like this... http://localhost:8080/ or you can call the servlet directly http://localhost:8080/hello Al - Original Message - From: Richard Bottoms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 1:02 AM Subject: Re: [JBoss-user] quick tutorial At 10:05 PM 6/16/01 -0400, you wrote: Just trying to help out. There are some holes, for instance no security at all is used. but it shows the basics of calling an EJB from a servlet. Al I got everything compiled and the .war/.ear files done and the Hello.ear file is deploying successfully. Now assume a vanilla jboss-tomcat install. Do I have to do anything with the index.jsp or helloServlet.class files, or change any config files to make the example work as laid out with http://urltoboss:8080. I'm not sure from the example what to change exactly, but I'm getting close. Thanks, r.b. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan
well not necessarily just EJB... although i would put most of it there. probably 99% of it would be in session EJB. I would use limited servlets for business logic. mostly i would do JSP -- Servlet --- EJB views controllers model/business logic Al - Original Message - From: Phan Anh Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 17, 2001 12:53 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Basically, you are telling me to move all business logic from APP to an EJB. I just don't believe it is always desirable to keep all business logic within EJBs. I don't think a business layer necessarily has to consist of EJBs alone. Anh - Original Message - From: David Jencks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 8:52 PM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Hi, Ok, this is a slightly different question than the one I thought you were asking, and as you say, 2pc is not relevant. Here are my thoughts on your proposed design: 1. I assume that you do not want to hold transactions open while waiting for human input. If you need to for some reason, you are apt to be in trouble under high load as all those open transactions consume server resources for unknown and long periods of time. 2. I like to think of the architecture of applications like this, in 5 layers. presentation layer (what do I see)--- jsp presentation manager (workflow control, what do I see next) servlet service subsystem (business logic, data manipulation) -session ejb model subsystem (data model, system state) ---entity ejb persistence subsystem -(jdbc, db) I find this really clears up most of my questions about where to put code, and makes changes much simpler and more local. In this framework, I haven't found a case where knowledge of transactions need to get above the business logic layer. I would be curious to know if you have an example where this is appropriate. Thanks david jencks On 2001.06.16 21:07:20 -0400 Phan Anh Tran wrote: Let's forget the 2PC stuff for now...Here is a scenaro: [APP/VM-1] - [EJB-1,EJB-2,...EJB-n/JBOSS/VM2] -JDBC- [DataStore-1] Each method of each of the EJBs forms a transaction by themselves if noone else issues explicit transaction control a la begin,commit,abort. APP takes on this role. APP decides the set of EJBs' methods will form 1 transaction. Same problem, replace APP with say a servlet running in a Servlet Container in a different VM and you still need the solution where it is possible to obtain a transaction from a separate VM. Sure, you could move the all the APP transaction control into one single method of one single EJB...but that's not always desirable, I believe... Anh - Original Message - From: David Jencks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 11:34 AM Subject: Re: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan Hi, I think the advice to stay away from distributed transactions is universal design advice. Basically using distributed transactions just about guarantees bad performance, as resources get tied up waiting for the 2pc to make its way to all those other machines or vms not once but twice. If at all possible, if you need things to happen on several machines, use transactional messaging (jms, jbossmq) to break the work up into pieces that can be all done on one machine + 1 resource manager + 1 message to the next machine. I don't know what jboss/jbossmq actually does in this scenario, however with a db and a message que as your transactional resources the db (the slow part) could use 1pc: 1. prepare message commit 2. 1pc on db 3. commit message. This should be roughly as fast as 1pc to the db, since jbossmq is running in the same vm as the rest of jboss. I learned the most about this subject from the (pre ejb) book High Performance Client Server by Loosley and Douglas, isbn 0-471-16269-8 david jencks On 2001.06.16 12:57:44 -0400 Phan Anh Tran wrote: We are at design time for a real system. Your suggestion don't use it is that due to JBOSS specific implementation issues or is it a universal design advice? Do you have a copy of Vlada talk? Thanks. Anh - Original Message - From: marc fleury [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 3:24 AM Subject: RE: [JBoss-user] Obtaining a transaction from outside JBoss in another VM Plan yes anatoly ackerman finished an
RE: [JBoss-user] Newbie question about clustering
right now clustering is not available in JBoss. As for the client, well they would see nothing different they would still make the call to the webserver normally, and some device (software or hardware) would decide which node would handle the call. whether sessions are tied to a single server or are available on all the app servers is up to the appserver. Some servers do this with stateful session beans, others do not. Or so I am told. The only case of clustering I have worked with personally is one where it was an all or nothing failover node, so we were not worried about sessions persisting and such. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia Sent: Wednesday, June 13, 2001 2:36 AM To: jbossuser Subject: [JBoss-user] Newbie question about clustering Hi all, can someone explain to me the basic concept about clustering? I mean I know approximately what and why it is, but I'm interested in the details. For example if I have a cluster of EJB AppServer, how does the client make the call and how is the session maintained with the cluster? Can one session spawn across several servers? And how does the cluster realize the load balancing? We use JBoss now as our EJB platform, but both general tips and JBoss specific ones are welcome. Also, some pointers to resource in the web would be highly appreciated. Many thanks in advance! ZHU Jia ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] manual
Title: RE: [JBoss-user] manual Its not? i dunno, be amazed at how much one can glean from the source, I would say in general for a developer that understands it the source would be the ultimate docs. Sure we all like pretty, fluffy docs that answer our question instantly, but if something isn't covered, people ask here, or go to the source. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ivan BolcinaSent: Wednesday, June 13, 2001 7:00 AMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] manual Very amusing...haha. The source is not ultimate docs. Maybe in world of '60s. -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 9:10 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] manual So I see three options here. 1. Take the 10k your saving and write 10k worth of docs. 2. Send 10k to JBoss and we'll write 10k worth of docs. 3. Read the ultimate docs(the source) and save 10k less the hours it takes you. - Original Message - From: "Ivan Bolcina" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 11:03 PM Subject: RE: [JBoss-user] manual I TOTALLY AGREE. BAD DOCUMENTATION MIGHT BE DEATH OF JBOSS. PLEASE DO EXAMPLES. WHY PEOPLE PAY 10K FOR COMMERCIAL EJB SERVERS? BECAUSE OF DOCUMENTATION! IT'S EASY! -Original Message- From: Boris Garbuzov [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 6:57 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] manualHello to all JBoss gurus and peers. The user manual is not very smooth and I can not find complete example description on deployment of full J2EE application with web client part. I do not see such samples shipped with the product too. Any other JBoss-Tomcat specific resources for novice are appreciated. Boris. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JDB and JBoss
you are debugging the implementation class, so you place break points on the implementation class of the bean, not the home or remote in general. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Francesco MarchioniSent: Wednesday, June 13, 2001 3:48 AMTo: [EMAIL PROTECTED]Subject: [JBoss-user] JDB and JBoss Hi JBoss Users, I'd like to know if anybody has attempted to use JDB with JBoss. I have tried to launch JBoss with -Debug flags but then I don't know what to do once I have attached to the VM with JDB. How can I put a breakpoint on a certain method of an EJB? I have no idea what class name I can point to... the remote interface,the stub...or what ? Thanks Francesco
RE: [JBoss-user] manual
Title: RE: [JBoss-user] manual I think Randy commented on it, but I have found the docs on JBoss to be better than Orion. Im not complaining about either product, I use both. as with him, right now I would have a hard time reccommending Orion for production use. I would have some difficulties depending on the client for JBoss, but whereas Orion is related to documentation issues, JBoss would only be because of clustering. Which I am sure will be up to speed soon, so that will remove that condition. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of François CharoySent: Wednesday, June 13, 2001 9:06 AMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] manual I agree and this is the only doc that is always up to date and on which you can rely. BTW, i find the jboss doc ok. Most of the stuff that is not in the doc is in the EJB spec (or in the code ultimately) :) François PS: I would like also to support the idea of having a WikiWiki like page on Jboss. Htat would be easier to use and to contribute to than the mailing list archives - Original Message - From: Allen Fogleson To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 2:09 PM Subject: RE: [JBoss-user] manual Its not? i dunno, be amazed at how much one can glean from the source, I would say in general for a developer that understands it the source would be the ultimate docs. Sure we all like pretty, fluffy docs that answer our question instantly, but if something isn't covered, people ask here, or go to the source. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ivan BolcinaSent: Wednesday, June 13, 2001 7:00 AMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] manual Very amusing...haha. The source is not ultimate docs. Maybe in world of '60s. -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 9:10 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] manual So I see three options here. 1. Take the 10k your saving and write 10k worth of docs. 2. Send 10k to JBoss and we'll write 10k worth of docs. 3. Read the ultimate docs(the source) and save 10k less the hours it takes you. - Original Message - From: "Ivan Bolcina" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 11:03 PM Subject: RE: [JBoss-user] manual I TOTALLY AGREE. BAD DOCUMENTATION MIGHT BE DEATH OF JBOSS. PLEASE DO EXAMPLES. WHY PEOPLE PAY 10K FOR COMMERCIAL EJB SERVERS? BECAUSE OF DOCUMENTATION! IT'S EASY! -Original Message- From: Boris Garbuzov [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 6:57 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] manual Hello to all JBoss gurus and peers. The user manual is not very smooth and I can not find complete example description on deployment of full J2EE application with web client part. I do not see such samples shipped with the product too. Any other JBoss-Tomcat specific resources for novice are appreciated. Boris. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] manual
Actually in reading my reply it suddenly hit me as wrong We are planning on using JBoss in a production system, but it is not one that will currently need clustering. since we wrote everything to spec it should deploy on any app server if that need should arise before HA stuff is solid in JBoss. Just wanted to clarify :) Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Allen Fogleson Sent: Wednesday, June 13, 2001 10:22 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] manual I think Randy commented on it, but I have found the docs on JBoss to be better than Orion. Im not complaining about either product, I use both. as with him, right now I would have a hard time reccommending Orion for production use. I would have some difficulties depending on the client for JBoss, but whereas Orion is related to documentation issues, JBoss would only be because of clustering. Which I am sure will be up to speed soon, so that will remove that condition. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of François Charoy Sent: Wednesday, June 13, 2001 9:06 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] manual I agree and this is the only doc that is always up to date and on which you can rely. BTW, i find the jboss doc ok. Most of the stuff that is not in the doc is in the EJB spec (or in the code ultimately) :) François PS: I would like also to support the idea of having a WikiWiki like page on Jboss. Htat would be easier to use and to contribute to than the mailing list archives - Original Message - From: Allen Fogleson To: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 2:09 PM Subject: RE: [JBoss-user] manual Its not? i dunno, be amazed at how much one can glean from the source, I would say in general for a developer that understands it the source would be the ultimate docs. Sure we all like pretty, fluffy docs that answer our question instantly, but if something isn't covered, people ask here, or go to the source. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ivan Bolcina Sent: Wednesday, June 13, 2001 7:00 AM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] manual Very amusing...haha. The source is not ultimate docs. Maybe in world of '60s. -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 9:10 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] manual So I see three options here. 1. Take the 10k your saving and write 10k worth of docs. 2. Send 10k to JBoss and we'll write 10k worth of docs. 3. Read the ultimate docs(the source) and save 10k less the hours it takes you. - Original Message - From: Ivan Bolcina [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 11:03 PM Subject: RE: [JBoss-user] manual I TOTALLY AGREE. BAD DOCUMENTATION MIGHT BE DEATH OF JBOSS. PLEASE DO EXAMPLES. WHY PEOPLE PAY 10K FOR COMMERCIAL EJB SERVERS? BECAUSE OF DOCUMENTATION! IT'S EASY! -Original Message- From: Boris Garbuzov [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 12, 2001 6:57 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] manual Hello to all JBoss gurus and peers. The user manual is not very smooth and I can not find complete example description on deployment of full J2EE application with web client part. I do not see such samples shipped with the product too. Any other JBoss-Tomcat specific resources for novice are appreciated. Boris. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Old jserv with JBoss'
I suspect it crshed because the new methods are not available in the old JServ package. Try compiling it using the old API and deploying it that way, it should work. Assuming you have everything there you should still be able to do lookups. I haven't of course tried this. best bet would really be to upgrade to the latest versions (stable) of tomcat. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Wednesday, June 13, 2001 9:57 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Old jserv with JBoss' Is it possible to use old jserv (now tomcat) to run servlets that are clients to EJB JBoss remote objects?? That´s because I have a system in production (web-centric) using jserv/apache/JSDK2.0/IBMJava2-1.3 and I made a new servlet accessing EJB objects. But the httpsession methods getValue and putValue are deprecated (in the new Servlet API in which i compiled the servlet), and when i put it to run it didn´t recognize the method getProperties (new method por getValue()). I tried to put the new Servlet API, but it crashed the Jserv. I indeed have to use new tomcat??? Please help... Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Auth.conf question
yes, it is in the docs by the way, just search the docs for JAAS and you will find it there that the other entry is used when no others match. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Gerry Duhig Sent: Wednesday, June 13, 2001 10:42 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Auth.conf question I think read once that the other entry in auth.conf is used if the domain of a request does not match any other. Is that correct? I can't find where I read it! Does that mean that servlets that have no domain specified would be authenticated through this entry? Gerry ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Old jserv with JBoss'
you can place servlets in a war with no problem. the classes are packaged in WEB-INF/classes. I will place the simple deployment descriptor below. what you really want is to use the servlet tags in the deployment descriptor to tell your web application where they are. the example I will use is a simple hello servlet. lets say the class is com.crunchy.servlets.HelloServlet to deploy this you can have a deployment descriptor like this note the deployment descriptor is called web.xml and is also in the WEB-INF directory. ?xml version=1.0 encoding=ISO-8859-1? web-app servlet servlet-nameHelloServlet/servlet-name servlet-classcom.crunchy.servlets.HelloServlet/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern//url-pattern /servlet-mapping /web-app Now any request to http://host/ will result in a call to the helloservlet. Hope this helps some. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Wednesday, June 13, 2001 1:58 PM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Old jserv with JBoss' I need use Jserv because tomcat just works with war archiver (am I wrong?) and not with servlets in directories like was in Jserv. I don´t use JSP´s (wasn´t available that time), instead I use static pages with dinamic tags that I change on the fly, and the system is already in production. I would be too much work to change everything to JSP... And is the Jserv compatible with the API´s of JBoss client At 12:59 13/06/01 -0400, you wrote: I suspect it crshed because the new methods are not available in the old JServ package. Try compiling it using the old API and deploying it that way, it should work. Assuming you have everything there you should still be able to do lookups. I haven't of course tried this. best bet would really be to upgrade to the latest versions (stable) of tomcat. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Wednesday, June 13, 2001 9:57 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Old jserv with JBoss' Is it possible to use old jserv (now tomcat) to run servlets that are clients to EJB JBoss remote objects?? That´s because I have a system in production (web-centric) using jserv/apache/JSDK2.0/IBMJava2-1.3 and I made a new servlet accessing EJB objects. But the httpsession methods getValue and putValue are deprecated (in the new Servlet API in which i compiled the servlet), and when i put it to run it didn´t recognize the method getProperties (new method por getValue()). I tried to put the new Servlet API, but it crashed the Jserv. I indeed have to use new tomcat??? Please help... Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] The method return values in the home interface must be of valid types for RMI/IIOP.
but you could have the business methods in an interface and implement the interface. then you have something like +-+ +-+ | businessint | | EJBObject | +-+ +-+ | | | | | Methods | | | +-+ +-+ ^ ^ | | | | | | +-+--+ | | ++ | Remote | ++ || || ++ Where businessint is an interface that must be implemented and has the business methods in it, and of course EJBObject is extended. This also means your implementation class can implement businessint, and you are usually sure that all the methods in the remote interface are in the implmentation class. Your point is still very valid though. the implementation class must return either a PK class, or a Collection, and in the errors it looks like it is not. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Wednesday, June 13, 2001 2:04 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] The method return values in the home interface must be of valid types for RMI/IIOP. Your Remote interface can´t extend anything but javax.ejb.EJBObject. I got this error when i try to put the bussiness methods in a diferent interface, which the remote one would extend. At 13:17 13/06/01 -0400, you wrote: I'm a new JBoss user trying to debug my code with respect to this warning message at deploy time. I've tried making the remote interface, Bicycle, extend Serializable, but the warning doesn't go away. What am I doing wrong? - [Verifier] Bean : BicycleBean Method : public abstract Bicycle create() throws CreateException, EJBException, RemoteException, SQLException Section: 9.2.8 Warning: The method return values in the home interface must be of valid types for RMI/IIOP. [Verifier] Bean : BicycleBean Method : public abstract Bicycle findByPrimaryKey(Integer) throws FinderException, RemoteException, EJBException Section: 9.2.8 Warning: The method return values in the home interface must be of valid types for RMI/IIOP. - Thanks, -- Richard Kasperowski (mailto:[EMAIL PROTECTED]) Tel: 617-576-1552, Fax: 617-576-2441 http://www.altisimo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Servlets in tomcat out of war file
create the war file, and assuming you are running jboss with tomcat or jetty, just drop it into the jboss/deploy directory. That will deploy the war file including any included servlets. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Tuesday, June 12, 2001 6:07 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] Servlets in tomcat out of war file is there a manner to deploy my servlet out of a war archive??? like it was in the Jserv time At 16:39 12/06/01 -0300, you wrote: I have a linux with IBM JVM Java 2 1.3 will it work with JBoss 2.2.1??? At 19:08 12/06/01 +0200, you wrote: Hello Ole, Tuesday, June 12, 2001, 4:26:44 PM, you wrote: OH P.S: IMHO enterprise beans do _not_ have OH their right place in the JBoss core OH server. It would be better if this was in OH the contrib module. yeah, i agree. lgpl is a bit of a weird license for a bean that just increments a counter. :) OH ___ OH JBoss-user mailing list OH [EMAIL PROTECTED] OH http://lists.sourceforge.net/lists/listinfo/jboss-user -- Best regards, Christophmailto:[EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Deploying Multiple applications?
Yes you can do this. You should be able to deploy them by copying the jar file (or war or ear) to the jboss/deploy directory. Jboss will then autodeploy the application. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stephen Oakes Sent: Tuesday, June 12, 2001 7:30 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] Deploying Multiple applications? Please excuse the naive questions - I'm still pretty new to all this EJB stuff. Is it actually possible to deloy more than one application (or, to be more precise, more than one package), each with its own META-INF directory and xml files? The reason I am asking is that whenever I try to deploy a package, JBoss says it is deploying it, but it actually re-deploys an existing package. I'll try to be clearer. I deploy A.jar. No problems. Then I try to deploy B.jar. JBoss says deploying B.jar, but subsequent messages reveal that it is deploying all the EJBs from A.jar. Any ideas? Stephen Oakes senior developer - [EMAIL PROTECTED] - a t o m i c m e d i a Leading Partners Online Level 1 / 216 City Road Southbank, Melbourne, Vic 3006 Australia. +61 3 9695 5777 phone +61 3 9695 5700 fax - www.atomicmedia.com - ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Oracle Autocommit?
I know im so embarrassed I wasnt thinking when I sent that and after it went out I was like... noo that isnt right. Ohh well. :) Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of danch Sent: Monday, June 11, 2001 3:19 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Oracle Autocommit? Allen Fogleson wrote: However you don't start a new transaction... if I recall the spec correctly then a requiresnew will throw an exception if you are already in a transaction. No, it suspends the caller's transaction, creates a new one, then commits/rollsback as appropriate. -danch ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] run_with_tomcat.sh doesn't work?
This was covered earlier... I think its the same problem anyway. It looks like you arent connected to the internet and its attempting to validate the XML files against the DTD's on suns site. Take out the !DOCTYPE lines, change them to a local DTD, or I think there is a new Jboss now where the validation was done against a local host copy. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jm Seigneur Sent: Monday, June 11, 2001 5:17 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] run_with_tomcat.sh doesn't work? Hello, I downloaded JBoss-2.2.2_Tomcat-3.2.2. I changed my environment JBOSS_HOME, TOMCAT_HOME, CLASSPATH. I started JBoss with its run.sh and it worked. I have tried run_with_tomcat.sh : JBoss hangs a long time after ContextManager: Adding context Ctx( /jboss) Then there is java.net.ConnectionException: Connection timed out After a while, JBoss starts but tomcat-test doesn't run and the overall process takes more than 9 minutes. Below there is a snapshot of what I get. Can someone help me? Thanks, Jm JBOSS_CLASSPATH=:/tmp/jm/jdk1.3.1/lib/tools.jar:run.jar:../lib/crimson.jar jboss.home = /tmp/jm/JBoss-2.2.2_Tomcat-3.2.2/jboss Using JAAS LoginConfig: file:/tmp/jm/JBoss-2.2.2_Tomcat-3.2.2/jboss/conf/tomcat/auth.conf Using configuration tomcat [Info] Java version: 1.3.1,Sun Microsystems Inc. [Info] Java VM: Java HotSpot(TM) Server VM 1.3.1-b24,Sun Microsystems Inc. [Info] System: Linux 2.4.2-2,i386 [Shutdown] Shutdown hook added [Service Control] Registered with server [Service Control] Initializing 25 MBeans [Webserver] Initializing [Webserver] Initialized [Naming] Initializing [Naming] Initialized [JNDIView] Initializing [JNDIView] Initialized [Transaction manager] Initializing [Transaction manager] Initialized [JAAS Security Manager] Initializing [JAAS Security Manager] Initialized [JDBC provider] Initializing [JDBC provider] Loaded JDBC-driver:org.hsql.jdbcDriver [JDBC provider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver [JDBC provider] Initialized [Hypersonic] Initializing [Hypersonic] Initialized [InstantDB] Initializing [InstantDB] Initialized [DefaultDS] Initializing [DefaultDS] Initialized [Container factory] Initializing [Container factory] Initialized [EmbeddedTomcatSX] Initializing [EmbeddedTomcatSX] Initialized [JBossMQ] Initializing [JBossMQ] Initialized [DefaultJMSProvider] Initializing [DefaultJMSProvider] Initialized [StdJMSPool] Initializing [StdJMSPool] Initialized [J2EE Deployer Default] Initializing [J2EE Deployer Default] Initialized [Auto deploy] Initializing [Auto deploy] Initialized [RARDeployer] Initializing [RARDeployer] Initialized [ConnectionManagerFactoryLoader] Initializing [MinervaNoTransCMFactory] Initialized [ConnectionManagerFactoryLoader] Initializing [MinervaSharedLocalCMFactory] Initialized [ConnectionManagerFactoryLoader] Initializing [MinervaXACMFactory] Initialized [ConnectionFactoryLoader] Initializing [BlackBoxDS] Initialized [JMX RMI Adaptor] Initializing [JMX RMI Adaptor] Initialized [JMX RMI Connector] Initializing [JMX RMI Connector] Initialized [Mail Service] Initializing [Mail Service] Initialized [Service Control] Initialized 25 services [Service Control] Starting 25 MBeans [Webserver] Starting [Webserver] Codebase set to http://Kenya:8083/ [Webserver] Started webserver on port 8083 [Webserver] Started [Naming] Starting [Naming] Starting jnp server [Naming] Started jnpPort=1099, rmiPort=0, Client SocketFactory=null, Server SocketFactory=null [Naming] Naming started on port 1099 [Naming] Started [JNDIView] Starting [JNDIView] Started [Transaction manager] Starting [Transaction manager] Started [JAAS Security Manager] Starting [JAAS Security Manager] JAAS.startService, cachePolicy=null [JAAS Security Manager] JAAS.startService, SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@299561 [JAAS Security Manager] Started [JDBC provider] Starting [JDBC provider] Started [Hypersonic] Starting [Hypersonic] Database started [Hypersonic] Started [InstantDB] Starting [Hypersonic] Server 1.4 is running [Hypersonic] Press [Ctrl]+[C] to abort [InstantDB] XA Connection pool InstantDB bound to java:/InstantDB Enhydra InstantDB - Version 3.26 [InstantDB] The Initial Developer of the Original Code is Lutris Technologies Inc. Portions created by Lutris are Copyright (C) 1997-2001 Lutris Technologies, Inc. All Rights Reserved. [InstantDB] Started [DefaultDS] Starting [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS [DefaultDS] Started [Container factory] Starting [Container factory] Started [EmbeddedTomcatSX] Starting [EmbeddedTomcatSX] Starting EmbeddedTomcatSX 2001-06-11 09:46:04 - ContextManager: Adding context Ctx( /examples ) 2001-06-11 09:46:04 - ContextManager: Adding context Ctx( /admin ) [EmbeddedTomcatSX] Starting tomcat. Check logs/tomcat.log for error messages 2001-06-11 09:46:04 - ContextManager: Adding context Ctx( ) 2001-06-11 09:46:04 - ContextManager:
RE: [JBoss-user] Unable to call an EJB from a Servlet
Title: Unable to call an EJB from a Servlet make sure you include the Home and remote interface classes in your classpath, and you should get it with no problem. Al. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Muthiah PalaniappanSent: Monday, June 11, 2001 6:58 AMTo: '[EMAIL PROTECTED]'Subject: [JBoss-user] Unable to call an EJB from a Servlet Hi, I have deployed a simple Hello World Bean and it is working perfectly when I use a java app. to connect to the bean. But in the same way if I try to connect to the bean using a servlet or a JSP, it is not working. I am using JBoss2.2 with Tomcat. This is the server side error I am getting (unwanted part of the error messages has been removed for clarity) - Package ejb.session.helloworld not found in import. import ejb.session.helloworld.*; Thanks Regards, Muthiah.
RE: [JBoss-user] how do I access simple html pages in a war file
ugh... not easily... but it could be done like so ServletContext sCtx = String realPath = sCtx.getRealPath(path of resource); then load the resource using whatever and do your thing. I would ask why do it this way, but im sure there must be some reason. in either case you are going to have to use a servlet or jsp as the controller in order to make the changes... Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Monday, June 11, 2001 8:08 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] how do I access simple html pages in a war file I´m not using JSP, instead I made a class that changes dinamic tags (like #dinTag) on static pages at run time. How do I access this static pages at run time? Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] howto for a webapp.
Here is the basic structure you want. someEJBs.jar - this is a jar file with your ejbs in it +com |---+company |---+package |---+ejb |---*.class +META-INF |---ejb-jar.xml |---jboss.xml |---jaws.xml the last two files are optional. web-app.war +jsps +any other resource directories +WEB-INF |---+lib |---*.jarjars to include in classpath +classes |---*.class your servlet classes +web.xml +jboss-web.xml optional your ear file will look like this application.ear +someEJBs.jar +web-app.war +META-INF |---application.xml Here is an example web.xml for you which maps several jsp files and includes security ?xml version=1.0 encoding=ISO-8859-1? web-app servlet servlet-namesitereports/servlet-name display-namesitereports/display-name descriptionNo Description/description jsp-file/site/reports.jsp/jsp-file /servlet servlet-mapping servlet-namesitereports/servlet-name url-pattern/site/reports/url-pattern /servlet-mapping servlet servlet-namemessagepost/servlet-name display-namemessagepost/display-name descriptionNo Description/description jsp-file/user/messagePost.jsp/jsp-file /servlet servlet-mapping servlet-namemessagepost/servlet-name url-pattern/user/messagePost/url-pattern /servlet-mapping servlet servlet-namemanager/servlet-name display-namemanager/display-name descriptionNo Description/description jsp-file/restricted/manager.jsp/jsp-file /servlet servlet-mapping servlet-namemanager/servlet-name url-pattern/restricted/manager/url-pattern /servlet-mapping servlet servlet-namedownload/servlet-name display-namedownload report/display-name descriptionNo Description/description jsp-file/restricted/downloadReport.jsp/jsp-file /servlet servlet-mapping servlet-namedownload/servlet-name url-pattern/restricted/downloadReport/url-pattern /servlet-mapping servlet servlet-namestatus/servlet-name display-namestatus report/display-name descriptionNo Description/description jsp-file/restricted/status.jsp/jsp-file /servlet servlet-mapping servlet-namestatus/servlet-name url-pattern/restricted/status/url-pattern /servlet-mapping servlet servlet-namestatusController/servlet-name display-namestatus Controller/display-name descriptionNo Description/description jsp-file/restricted/statusController.jsp/jsp-file /servlet servlet-mapping servlet-namestatusController/servlet-name url-pattern/restricted/statusController/url-pattern /servlet-mapping servlet servlet-namebysite/servlet-name display-nameby Site/display-name descriptionNo Description/description jsp-file/restricted/bysite.jsp/jsp-file /servlet servlet-mapping servlet-namebysite/servlet-name url-pattern/restricted/bysite/url-pattern /servlet-mapping servlet servlet-namebydate/servlet-name display-nameby date/display-name descriptionNo Description/description jsp-file/restricted/bydate.jsp/jsp-file /servlet servlet-mapping servlet-namebydate/servlet-name url-pattern/restricted/bydate/url-pattern /servlet-mapping servlet servlet-namebysitedate/servlet-name display-nameby Sitedate/display-name descriptionNo Description/description jsp-file/restricted/bysitedate.jsp/jsp-file /servlet servlet-mapping servlet-namebysitedate/servlet-name url-pattern/restricted/bysitedate/url-pattern /servlet-mapping servlet servlet-namediscussion/servlet-name display-namediscussions/display-name descriptionNo Description/description jsp-file/user/discussion.jsp/jsp-file /servlet servlet-mapping servlet-namediscussion/servlet-name url-pattern/user/discussion/url-pattern /servlet-mapping servlet servlet-namechartall/servlet-name display-namechart all/display-name descriptionNo Description/description jsp-file/restricted/chartall.jsp/jsp-file /servlet servlet-mapping servlet-namechartall/servlet-name url-pattern/restricted/chartall/url-pattern /servlet-mapping servlet servlet-nameapproveUsers/servlet-name display-nameapprove Users/display-name descriptionNo Description/description jsp-file/restricted/approveUsers.jsp/jsp-file /servlet servlet-mapping
RE: [JBoss-user] Problems to install JDBC driver
is the jar file in your jboss/lib/ext directory? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Marie RajonSent: Monday, June 11, 2001 9:29 AMTo: [EMAIL PROTECTED]Subject: [JBoss-user] Problems to install JDBC driver Hi, I am using JBOSS with Cloudscape and I have difficulties to install the JDBC Drivers. I copied the RmiJdbc.jar file in the lib/ext directory of JBOSS and I add COM.cloudscape.core.RmiJdbcDriver in the jboss.jcml configuration file, but jboss doesn't want to load it when it starts ... Could you help me and tell me what I did wrong? Thank you very much Marie Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] how do I access simple html pages in a war file
well JSP is a servlet really, so the same methodology will work -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Monday, June 11, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] how do I access simple html pages in a war file At 09:05 11/06/01 -0400, you wrote: ugh... not easily... but it could be done like so ServletContext sCtx = String realPath = sCtx.getRealPath(path of resource); then load the resource using whatever and do your thing. I would ask why do it this way, but im sure there must be some reason. in either case you are going to have to use a servlet or jsp as the controller in order to make the changes... I have a kind of old system made when there weren´t JSP pages, just servlets. So i want to reuse this functionality. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Monday, June 11, 2001 8:08 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] how do I access simple html pages in a war file I´m not using JSP, instead I made a class that changes dinamic tags (like #dinTag) on static pages at run time. How do I access this static pages at run time? Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Authentication problems in JBoss-2.2.2/Tomcat-3.2.2 (env not bound)
we are using the DatabaseLogin for our security. And it works fine. As Greg did we added the jboss-web.xml and also added the extra property Andrew spoke of. Additionally we had to change auth.conf so it had an entry for our security domain. It was then just a simple matter of adding servlet mappings for the protected resources. (mostly JSP's) Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Merrill Sent: Monday, June 11, 2001 12:17 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Authentication problems in JBoss-2.2.2/Tomcat-3.2.2 (env not bound) Andrew- I followed Scott's tutorial but met with success. Essentially, the tutorial led me to do two simple things: 1. Add a jboss-web.xml to my war describing the security-realm 2. Define users.properties and roles.properties and place them in jboss/conf/tomcat After doing these two things, I was able to authenticate secure url patterns successfully. -Greg --- Andrew H. Blom [EMAIL PROTECTED] wrote: I've followed Scott Stark's tutorial to incorporate JAAS-based security for both servlets and ejb beans into my application. Everything was pretty straightforward, and seems to be working, for the most part; when I try to access the protected servlets I'm prompted to log in. But like Greg Merrill, when I actually try to log in, I get javax.naming.NameNotFoundException: env not bound. I'm using the JBoss-2.2.2/Tomcat-3.2.2 bundle on win98. As far as I know, I'm following the tutorial to the letter. I've defined the security domain security-domainjava:/jaas/risk/security-domain in both the jboss-web.xml file and the jboss.xml file. I've also double-checked the jboss.jcml file. The mbean which configures the JaasSecurityManagerService already existed in the original file, but didn't include the attribute described in Scott's tutorial: attribute name=SecurityProxyFactoryClassNameorg.jboss.security.SubjectSecurityProxy Factory/attribute so I added that too. These definitions are accepted at jboss startup time, as the log shows: [Configuration] DEBUG SecurityManagerClassName set to org.jboss.security.plugins.JaasSecurityManager in Security:name=JaasSecurityManager [Configuration] DEBUG SecurityProxyFactoryClassName set to org.jboss.security.SubjectSecurityProxyFactory in Security:name=JaasSecurityManager but I still get the env not bound exception. Is there something I'm missing that anyone can see? It's perfectly possible that I'm doing something stupid, since I'm basically a newbie with both tomcat and jboss, but I've been over and over the guide and can't see what I'm doing wrong ... Thanks, Andrew - Andrew H Blom [EMAIL PROTECTED] NetZero Platinum No Banner Ads and Unlimited Access Sign Up Today - Only $9.95 per month! http://www.netzero.net ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] javax.naming.NameNotFoundException: jdbc not bound
Scott what is the actual lookup you are performing? it should appear as InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(jdbc.atalk); Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Bermon Sent: Monday, June 11, 2001 3:05 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] javax.naming.NameNotFoundException: jdbc not bound I know that this question has been asked a few times, but none of the responses that I've read have got me through this. I'm running the jBoss with Embedded Tomcat: [EmbeddedTomcatSX] Starting [EmbeddedTomcatSX] Starting EmbeddedTomcatSX 2001-06-11 01:28:56 - ContextManager: Adding context Ctx( /examples ) 2001-06-11 01:28:56 - ContextManager: Adding context Ctx( /admin ) [EmbeddedTomcatSX] Starting tomcat. Check logs/tomcat.log for error messages 2001-06-11 01:28:56 - ContextManager: Adding context Ctx( ) 2001-06-11 01:28:56 - ContextManager: Adding context Ctx( /test ) 2001-06-11 01:28:57 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-06-11 01:28:57 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 [EmbeddedTomcatSX] OK [EmbeddedTomcatSX] Started I've added the resource tag to my web.xml within the war file that contains the servlet that connects to the database: web-app resource-ref res-ref-namejdbc.atalk/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Lookup Datasource from Javabeans. Possible?
Ill paste some code below. but in short you can do a couple things. 1) look it up in the global namespace 2) look it up in the web apps namespace. if you deploy it all, then use a web browser to go to http://yourserver:8082 you will see a JNDIView area. click on that, then find the list button and click it to see your JNDI namespaces. That is where you can see what the DS is bound to. Here is my code to do lookups, and the appropriate entries in the jboss.jcml file. sql = select distinct user_t.username, download_t.download_date, + download_t.download_type from user_t, download_t where + user_t.user_pk = download_t.user_fk order by download_t.download_type desc; try { InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:/pagescreamerDS); Connection con = ds.getConnection(); PreparedStatement ps = con.prepareStatement(sql); ResultSet rs = ps.executeQuery(); while(rs.next()) { site= rs.getString(1); date= rs.getDate(2).toString(); version = rs.getString(3); } } catch(Exception e) { . . . } here is my jboss.jcml entry for this DS mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=OracleDB attribute name=PoolNamepagescreamerDS/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=Properties/attribute attribute name=URLjdbc:oracle:thin:@localhost:1521:pgs/attribute attribute name=GCMinIdleTime120/attribute attribute name=JDBCUseruser/attribute attribute name=MaxSize10/attribute attribute name=Passwordpassword/attribute attribute name=GCEnabledfalse/attribute attribute name=InvalidateOnErrorfalse/attribute attribute name=TimestampUsedfalse/attribute attribute name=Blockingtrue/attribute attribute name=GCInterval12/attribute attribute name=IdleTimeout180/attribute attribute name=IdleTimeoutEnabledfalse/attribute attribute name=LoggingEnabledfalse/attribute attribute name=MaxIdleTimeoutPercent1.0/attribute attribute name=MinSize0/attribute /mbean This will bind the DS to java:/pagescreamerDS which you should see on startup. You could also bind it in your deployment descriptor in a resource-ref entry. The you should be able to look it up with java:comp/env/resource-ref-name-in-deployment-descriptor. I think the main problem here is that under BEA you were used to copying the servlet into the classpath, and not deploying it as a web application, whereas in jboss(with embedded tomcat or jetty) you deploy a web application or an enterprise archive. its not as simple as just copying a servlet class, unless you deploy the whole web app un-jarred. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Edward Wang Sent: Monday, June 11, 2001 9:46 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible? How can you access DataSource from a servlet? I tried but only got a NameNotFoundException. I listed all the JNDI names within the Context, it didn't contains the JNDI name of my DataSource I saw that JBoss bound it to at the startup, like java:/oraceDS. Did you do just as those who deploy any servlet in an WAR then in an EAR? I used Weblogic before for more than one year, and I found, and you will find too, it's really very convenient in this case of matters. You should code as you like, in Servlet, in JSP, or even in an Application, then just run it, for a servlet/jsp, you need only copy the compiled .class file to the SERVLET_CLASSES directory. Then you got it! I use JBoss just because it's free. For our customer need a cheap one than weblogic, it's too expensive! But I never imagined JBoss is so frustrating... - Original Message - From: Allen Fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 09, 2001 1:10 AM Subject: RE: [JBoss-user] Lookup Datasource from Javabeans. Possible? Hmm I have no problem accessing the DataSource from a servlet, or JSP. There is at least one good reason to do this, taking advantage of connection pooling without having to write your own pool. Someone else reccommended against it (if i interpreted correctly) but I see no reason to NOT use the DataSource. This is what making the application portable is about. imagine that i have to do the traditional class.forName(driver).newInstance(); DriverManager.. EVERY time I want to go to the DB? then if the DB changes I now have to change all that code. Even with a properties file this is more painful than simply change the DataSource definition once. (Admittedly there should be at most 2 changes using a properties file method.) but 6 months down the road when someone else is doing the maintenance of your code will they remember to make the change? Al -Original
RE: [JBoss-user] Deploying Jive in JBOSS 2.2.1 Jetty 3.1.RC4
I posted a message earlier that talked about ear and war files... you can use that to set up your war file. war files deploy on tomcat or jetty so it should work the same in either container. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig Johannsen Sent: Monday, June 11, 2001 11:32 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] Deploying Jive in JBOSS 2.2.1 Jetty 3.1.RC4 I need some advice on how to deploy Jive in the Jboss-Jetty combo. I can see from previous emails that Lionel built a jive.war file and put it in jboss\deploy. But he is using Tomcat with Jboss. Is that also the best way to do it with Jboss-Jetty? I'm a total beginner with respect to deployment, so I need fairly detailed advice. I tried just copying the .jsp files to jetty\docroot\jsp and adding the .jar files to my JBOSS_CLASSPATH and it almost worked. It simply could not find my jive.properties file, which I put in jetty\webapps\jetty\WEB-INF\classes, though its complaint was about the path parameter in the file. Renaming the file to junk.properties resulted in exactly the same message, so I suspect it is a bogus message. Has anyone successfully deployed Jive in Jboss-Jetty? Any help would be greatly appreciated. -- Craig ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Problems in working with another EJB jar file
Zeon I assume you are not getting a naming exception here, so Quite likely the home and remote class files are not available to your client (travel agent session bean). You will have to include those in your jar file for the session bean. You don't need the implementation classes. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of OptimaSent: Sunday, June 10, 2001 2:38 AMTo: [EMAIL PROTECTED]Subject: [JBoss-user] Problems in working with another EJB jar file Greetings all, I tried to play with the TravelAgent example in Monson-Haefel¡¦s EJB book on JBoss 2.2.1 and Win2K. It¡¦s a session bean calling another entity bean named Cabin, but not in the same .jar
RE: [JBoss-user] EmbeddedTomcat, JNDI and Classloader
have you tried doing a lookup into the global namespace? does that work? Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sven Kuenzler Sent: Sunday, June 10, 2001 3:56 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] EmbeddedTomcat, JNDI and Classloader I am trying to deploy the Cocoon 2 XML publishing framework with JBoss 2.2.2/Tomcat 3.2.2. This works quite well, except for one issue that I like to have explained. When trying to lookup an EJB from a Cocoon XML page ala home = new InitialContext().lookup(java:comp/env/ejb/ContactHome); I get an 'env not bound' exception. I found out that some classloader hack in the Cocoon Servlet causes this problem. In order to support a large variety of servlet containers, Cocoon deploys a Classloader of its own. Essentially, it does something like cl = Thread.currentThread().getContextClassLoader(); try{ Thread.currentThread().setContextClassLoader(new URLClassLoader({}, cl ...) ... (Actually, it is a subclass of URLClassLoader, but it does not change the main behaviour of Sun's implementation). When removing this hack from the Cocoon servlet, everything works again. So, why is the env context not visible when using a different class loader? Please note that this new loader has Tomcat's original AdaptiveClassLoader as its parent. As I said, I can painlessly remove this hack as I don't use features like XSLT extensions. But what would you suggest to someone how needs this class loader hack and still wants to do JNDI lookups? Thanks, Sven ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JBoss w/ embedded Tomcat
look under $jboss_home/jboss/tmp/deploy/default if you deployed it by putting it in the $jboss/jboss/deploy directory if you put it in $jboss/tomcat/webapps then there should be a directory in there. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Hiep Luong Sent: Friday, June 08, 2001 1:54 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] JBoss w/ embedded Tomcat I just configured JBOSS with Tomcat embededd and auto deploy of the tomcat-test.ear works fine. The question I have is where are the from the tomcat files from the war file after deployment under JBOSS. I looked for them under Tomcat_home/webapps but nada. Nothing under Jboss either. I am used to modifying my servlets in the expanded directory under webapps and it would be a pain to have to create an ear file every time I make a change during development. thanks, Hiep ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Oracle Autocommit?
However you don't start a new transaction... if I recall the spec correctly then a requiresnew will throw an exception if you are already in a transaction. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Aakash Chopra Sent: Sunday, June 10, 2001 3:09 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Oracle Autocommit? Thanks for the response! I think you hit it right on. I have foreign key constraints in tableY for pkz. But why is the problem showing up as a hang (of sorts) and associated time outs? Shouldn't I get a nested SQL exception of some sort? I had #6 set to RequiresNew because I wanted the EbeanYs to get persisted without regard to what is happening/has happened in the parent transaction. The question that begs to be asked is: Why the fk constraints? The answer: I wasn't thinking far enough in advance when I was designing the tables. Thinking about the whole thing again, I am willing to change #6 to Required but I'd still like to know why it did not work with RequiresNew. When I set #6 to just Required, everything gets created correctly. I'm not sure why though? Thanks for the help! Buzz Hi, I have no ideas if this is what is causing the problems you are experiencing, however... If I was designing the db for this, and if I understand you correctly, I would have tableZ for EbeanZ, with pk pkz and tableY for EbeanY, with pk pky, and foreign key pkz from tableZ. Now, in transaction 1 you insert a new record in tableZ, with a brand new pk value. Before committing, you start transaction 2 and try to add some records to tableY, with the new pkz value you just got. This value in tableZ is not visible to transaction2, transaction 1 hasn't committed yet. So you would get a fk violation. Why does (6) need to be RequiresNew? All this being said, it might be helpful to know which driver you are using and the configuration files. Autocommit is always already set to false. David Jencks On 2001.06.09 19:24:03 -0400 Aakash Chopra wrote: Hi all, After hours of going through the JBoss-user Archives, I'm still unclear as to exactly what is going on with regard to JBoss's interaction with Oracle, Transactions, and autocommit. Here is my particular problem: 1. methodA1() in a Session Bean (SBeanA) is responsible for creating a particular type of CMP Entity Bean (EBeanZ). 2. EBeanZ and all member methods are Container Transaction Managed set to: trans-attributeRequired/trans-attribute. 3. SBeanA and all member methods are Container Transaction Managed set to: trans-attributeRequired/trans-attribute. 4. methodA1() in SBeanA calls methodA2() in the same bean (SBeanA). 5. methodA2() is responsible for creating another type of CMP Entity Bean (EBeanY). 6. EBeanY and all member methods are Container Transaction Managed set to: trans-attributeRequiresNew/trans-attribute. 6.1. There is a 1 to many relationship between EBeanZ and EBeanY respectively. 7. Everything works until I get to #5. That is, the following message is generated in the log files upon attempting to persist/create EBeanY instances (note the first line of output is caused by a system.out in the ejbCreate method of EBeanY): [EBeanY] ejbCreate: Attempting to create: SCULE for owner: 100160 [SBeanA] Transaction XidImpl [FormatId=257, GlobalId=buzzwin2//7, BranchQual=] timed out. status=STATUS_ACTIVE [SBeanA] Transaction XidImpl [FormatId=257, GlobalId=buzzwin2//8, BranchQual=] timed out. status=STATUS_ACTIVE That's it. No more info, although I still have to set db logging when I find the correct property/flag. Does anyone have any ideas about what is going on, and how I have to fix it. If this has to do with autocommit, do I need to modify the jboss code to setAutoCommit(false)? Thanks in advance for any suggestions / help. Buzz ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Help !! Dynamic User Authentication with JBoss
There is some documentation on the included JBOSS login modules, one of which is org.jboss.security.plugins.samples.LdapLoginModule Admittedly I have not tried this one in JBOSS 2.2.2 with the new JAAS security mechanism. Mostly because we have a custom login module that uses LDAP and DB. (I know sounds silly, but the client wanted roles in the DB, and login from LDAP. DONT ask me why they were the client :) So we have our logins authenticated against the LDAP, and we authorize from the roles in the DB. http://www.jboss.org/documentation/HTML/ch09s17.html Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Binoy Sent: Friday, June 08, 2001 1:23 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Help !! Dynamic User Authentication with JBoss Well actually i would want to facilitate addition of more Users for a role in the LDAP server and same being taken care by the JBoss.. So the security / authentication policy should only depend on the roles and the respective users that exist or might come into existance for a particular DN in LDAP server and not be depending on the deployement descriptor.. (imho) it could be achieved (i think !!).. but with my limited knowledge.. I dont know how ;-)... so the Quest still continues ;-) cheers and thanks Binoy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Help with HTTPS
URLConnection is not enough for SSL.. you will have to use the javax.net.ssl package to handle this. This is not really JBoss not connecting, or tomcat (or whatever servlet container you are using) but a matter of a HttpURLConnection is not inherently Secure. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nithin Bose Sent: Friday, June 08, 2001 2:34 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Help with HTTPS I am trying to connect to a https server ( weblogic) running on my machine from JBoss using a servlet (HttpURLConnection) -Original Message- From: Guy Rouillier [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 11:38 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Help with HTTPS Please explain what you are trying to accomplish. https is a web protocol, and JBoss is not a web server. - Original Message - From: Nithin Bose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 12:07 AM Subject: [JBoss-user] Help with HTTPS Hi, Can anyone please help me as to what all configurations need to be done to use https with JBoss. I have jsse.jar, I am unable to set the system properties it specifies. Is there any other way of doing it?? Thanks Nithin ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] NullPointerException in XAPoolDataSource.java:165
unless there was a definition somewhere of OracleDS already i suppose. I have mistakenly done that before :) and the second pool (on a different DB) wouldnt bind to JNDI. I agree that you should then get a naming exception though. (agreeing before it is pointed out) Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Guy Rouillier Sent: Friday, June 08, 2001 2:47 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] NullPointerException in XAPoolDataSource.java:165 Something is not right there. OracleDB and OracleDS are just text strings - they should both work. - Original Message - From: David Filiatrault [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 3:50 AM Subject: Re: [JBoss-user] NullPointerException in XAPoolDataSource.java:165 Guy: your example worked. The difference that made it work was the specification of OracleDB rather than OracleDS. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Help with HTTPS
Are you talking about https between a webclient and the web server? or using tunneling jnp over https to access JBOSS? Jboss itself is just a container. Sure it has integrated Tomcat or Jetty, but to use HTTPS between a remote web browser and the web server (whatever one you choose to use) would be a web server issue. As an aside we use apache with SSL connecting to JBoss/tomcat. There are some fairly extensive tutorials on the openssl site and the apache site about doing this. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nithin Bose Sent: Friday, June 08, 2001 12:08 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Help with HTTPS Hi, Can anyone please help me as to what all configurations need to be done to use https with JBoss. I have jsse.jar, I am unable to set the system properties it specifies. Is there any other way of doing it?? Thanks Nithin ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] OutOfMemoryError
in the jvms just because a system has memory does not mean that the JVM will take it. Most jvm's start with some standard min and max stack size. and when that max stack size is reached you get the java.lang.OutOfMemoryError. You can increase your stack size with the standard java -Xms1M -Xmx64M where 1 and 64 are the min and max stack sizes to use in mb (in this case). Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nicolai P Guba Sent: Friday, June 08, 2001 4:53 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] OutOfMemoryError *ouch* Hmmm, left the server overnight, came back next morning and ran the client against it. Not sure whether I am able to accurately pinpoint why the system thinks it is out of memory... :( npg@raphael:~$ free total used free sharedbuffers cached Mem:255332 253244 2088 0 0 153308 -/+ buffers/cache: 99936 155396 Swap: 497972 0 497972 [User] TRANSACTION ROLLBACK EXCEPTION:unable to create new native thread; nested exception is:java.lang.OutOfMemoryError: unable to create new native thread [User] java.lang.OutOfMemoryError: unable to create new native thread [User] at java.lang.Thread.start(Native Method) [User] at sun.rmi.transport.DGCClient$EndpointEntry.init(DGCClient.java:218) [User] at sun.rmi.transport.DGCClient$EndpointEntry.lookup(DGCClient.java:190) [User] at sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:108) [User] at sun.rmi.transport.LiveRef.read(LiveRef.java:267) [User] at sun.rmi.server.UnicastRef2.readExternal(UnicastRef2.java:57) [User] at java.rmi.server.RemoteObject.readObject(RemoteObject.java:203) [User] at java.lang.reflect.Method.invoke(Native Method) [User] at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2213) [User] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1410) [User] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) [User] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) [User] at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.readExternal(GenericProxy .java:166) [User] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.readExternal(HomeProxy.java: 265) [User] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212) [User] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) [User] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262) [snip] -- Nicolai P Gubahttp://www.gnu.org http://www.frontwire.com mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] GSM: +44 (0)7909 960 751 DDI: +44 (0)20 7368 9708 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Lookup Datasource from Javabeans. Possible?
Hmm I have no problem accessing the DataSource from a servlet, or JSP. There is at least one good reason to do this, taking advantage of connection pooling without having to write your own pool. Someone else reccommended against it (if i interpreted correctly) but I see no reason to NOT use the DataSource. This is what making the application portable is about. imagine that i have to do the traditional class.forName(driver).newInstance(); DriverManager.. EVERY time I want to go to the DB? then if the DB changes I now have to change all that code. Even with a properties file this is more painful than simply change the DataSource definition once. (Admittedly there should be at most 2 changes using a properties file method.) but 6 months down the road when someone else is doing the maintenance of your code will they remember to make the change? Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Edward Wang Sent: Friday, June 08, 2001 4:15 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible? If the JBoss/Tomcat pack even doesn't allow my servlet to access Datasource, then why would I use JBoss but not JRun or something else? For that, I have to write an EJB for every little piece of SQL I want to execute in my DB in my servlet. Is that too inconvient? - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 2:16 PM Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible? See numerous messages in the archives on this subject. The connection pool is meant to be used by EJBs running within JBoss, not by external clients. Won't work - connections are set up within a JVM context, and your external client is in another JVM. I don't know if there is some hack to make this work with the integrated packages (JBoss+Tomcat or JBoss+Jetty), but even if you can you shouldn't. - Original Message - From: Edward Wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 9:44 PM Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible? Seems impossible. When I was trying to connect to a Datasource that I saw was bound to java:/instantDB by JBoss at the startup in my servlet. But the following error was reported: Connection error:javax.naming.NameNotFoundException: InstandDB not bound Does this mean that? Edward - Original Message - From: Dexter Legaspi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 9:57 PM Subject: Re: [JBoss-user] Lookup Datasource from Javabeans. Possible? yes! --- Tim Yates [EMAIL PROTECTED] wrote: Is it possible to lookup the Datasource from my JavaBeans? I use direct SQL to improve performance in several methods, and wondered if I could use the connection pool from my BMP beans... Cheers. Tim. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user $²®--$²®¶º~z?ÿ²¢y·²-Sþ² ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user $²®$²®¶º~zÛiÿùb²Û,¢êÜyú+éÞ·ùb²Û?+-wèþ6è²Ë¬ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] ./conf directory location
if you are working on unix (or *nix, which it looks like) why bother with the big configuration change? just use a symbolic link to the conf directory. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 08, 2001 8:11 AM To: JBoss Subject: [JBoss-user] ./conf directory location Sorry I repost the same question bur got any working answer. I need to separe the JBOSS_HOME directory and the JBOSS_HOME/conf directory in two different places (the first one is p.ex. /usr/local/jboss-2.2.1 and the second is /home/user/cvs/jboss/conf/myconf) Is it possible ? or do I checkout my jboss configuration from cvs directly in JBOSS_HOME/conf ? Thanks Gianni winmail.dat
RE: [JBoss-user] Something in crimson that is hard coded and trying to lookup java.sun.com
its validating the XML document Take out the !Doctype line and you wont get the error, or you can place the DTD's on your own site and reference them there. Al -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lionel SiauSent: Thursday, June 07, 2001 8:35 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] Something in crimson that is hard coded and trying to lookup java.sun.com Hi guys, the crimson parser is trying to resolve the java.sun.com hostname inside!!! (Auto deploy] java.net.UnknownHostException: java.sun.com This shouldn't be correct. Many of us do development on our laptops and standalones and this completely renders it unusable. Can we pls pls get this thing fixed? (Is there a crimson update that bypasses this?) Another guy also reported the same thing for his tomcat-test.ear(which I also encountered also). Lionel [Auto deploy] Watching D:\jboss\deploy[Auto deploy] Auto deploy of file:/D:/jboss/deploy/jive.war[J2EE Deployer Default] Deploy J2EE application: file:/D:/jboss/deploy/jive.war[J2EE Deployer Default] Create application jive.war[J2EE Deployer Default] inflate and install module jive.war[Container factory] Deploying:file:/D:/jboss/tmp/deploy/Default/jive.war[Container factory] Deployed application: file:/D:/jboss/tmp/deploy/Default/jive.war[J2EE Deployer Default] Starting module jive.war[Auto deploy] deploy, ctxPath=/jive, warUrl=file:/D:/jboss/tmp/deploy/Default/jive.war/web1001/2001-06-08 07:41:30 - ContextManager: Adding context Ctx( /jive )[Auto deploy] java.net.UnknownHostException: java.sun.com[Auto deploy] at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)[Auto deploy] at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2723)[Auto deploy] at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1154)[Auto deploy] at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488)[Auto deploy] at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)[Auto deploy] at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)[Auto deploy] at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:179)
RE: [JBoss-user] EJB Integration with existing Java Framework - Urgent!
exactly... although now that I read my reply, I can see where it could be read differently. Certainly an EJB cannot create threads, etc etc. but dependent objects could, or just simple classes instantiated in the EJB... I also agree with somone elses logic of as long as the class doesnt mind being passivated... thats what the callback methods are for though. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Grim Shieldsson Sent: Friday, June 08, 2001 4:54 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] EJB Integration with existing Java Framework - Urgent! However the IO/thread classes can use EJB's.. just not the other way around. I'm thinking that they are going to have to refactor their software a bit to use EJB's. --- Kar YEOW [EMAIL PROTECTED] wrote: I believe you can't use thread or IO either directly or indirectly. As these are resource controlled by the Container. If they are used without the Container's knowledge, the Container will not be able to manage them. eg opened file and unterminated thread etc etc... Kar - Original Message - From: Allen Fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 12:08 AM Subject: RE: [JBoss-user] EJB Integration with existing Java Framework - Urgent! Threads and IO are prohibited in an EJB, there is nothing to stop a separate class from using IO and threads, and having those classes be used within the EJB. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia Sent: Thursday, June 07, 2001 7:05 AM To: jbossuser Subject: [JBoss-user] EJB Integration with existing Java Framework - Urgent! 2. Some of our java files need threads and file IO, and the EJBs should call them. I don't know if this can be a problem because threads and file IO are forbidden in EJB. Also I think I have to put the existing files in an archive and place them into the lib dir of JBoss, right? But where's the best place for resources this library itself needs, like conf files, graphics etc.? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user = Grim Shieldsson (James A Barrows) Acting Chieftain of Clan StormWolf Barbarian Freehold Alliance Oppurtunity doesn't knock. It only presents itself after you kick down the door. --Kyle Chandler __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] RE: JBoss-user digest, Vol 1 #711 - 10 msgs
Gubahttp://www.gnu.org http://www.frontwire.com mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] GSM: +44 (0)7909 960 751 DDI: +44 (0)20 7368 9708 --__--__-- Message: 9 Date: Fri, 8 Jun 2001 01:53:56 -0700 (PDT) From: Grim Shieldsson [EMAIL PROTECTED] Subject: Re: [JBoss-user] EJB Integration with existing Java Framework - Urgent! To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] However the IO/thread classes can use EJB's.. just not the other way around. I'm thinking that they are going to have to refactor their software a bit to use EJB's. --- Kar YEOW [EMAIL PROTECTED] wrote: I believe you can't use thread or IO either directly or indirectly. As these are resource controlled by the Container. If they are used without the Container's knowledge, the Container will not be able to manage them. eg opened file and unterminated thread etc etc... Kar - Original Message - From: Allen Fogleson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 08, 2001 12:08 AM Subject: RE: [JBoss-user] EJB Integration with existing Java Framework - Urgent! Threads and IO are prohibited in an EJB, there is nothing to stop a separate class from using IO and threads, and having those classes be used within the EJB. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia Sent: Thursday, June 07, 2001 7:05 AM To: jbossuser Subject: [JBoss-user] EJB Integration with existing Java Framework - Urgent! 2. Some of our java files need threads and file IO, and the EJBs should call them. I don't know if this can be a problem because threads and file IO are forbidden in EJB. Also I think I have to put the existing files in an archive and place them into the lib dir of JBoss, right? But where's the best place for resources this library itself needs, like conf files, graphics etc.? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user = Grim Shieldsson (James A Barrows) Acting Chieftain of Clan StormWolf Barbarian Freehold Alliance Oppurtunity doesn't knock. It only presents itself after you kick down the door. --Kyle Chandler __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ --__--__-- Message: 10 From: Burkhard Vogel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] EntityBean CreateException with Oracle8i Date: Fri, 8 Jun 2001 10:55:10 +0200 Reply-To: [EMAIL PROTECTED] Hi, this NPE is usually caused by an illegal URL/user/pwd combinition, use a tool to verify your settings, check wether you have sufficient priviledges to create tables (by issuing a create table statement) and good luck, there are numerous posts regarding oracle problems, search the archive (via jboss.org link) Burkhard - Original Message - From: Joshua Zhao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 07, 2001 4:50 PM Subject: [JBoss-user] EntityBean CreateException with Oracle8i Following the guide in http://www.jboss.org/documentation/HTML/ch11s44.html, I have been able to run the examples from Richard Monson-Haefel's book Enterprise JavaBeans (Chap4). In this case, I used the default DB (Hypersonic). However, if I switch to Oracle8i, following the instructions from Chapter 5. Customizing JAWS (http://www.jboss.org/documentation/HTML/ch05.html) and others (JDBC driver, jboss.jcml, and etc.), I get the following exception when I try to invoke com.titan.cabin.Client_1. javax.ejb.CreateException: Could not create entity:java.lang.NullPointerException at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno wn Source) at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248) at $Proxy0.create(Unknown Source) at com.titan.cabin.Client_1.main(Client_1.java:27) Any hints/comments would be greatly appreciated! Joshua Zhao FYI. I am using JBoss-2.2.1_Tomcat-3.2.1 with Windows NT workstation environment. Below are what I have done for using Oracle8i: 1. Installed classes12.zip into the lib\ext directory; 2. Modified jboss.jcml as follows: mbean code=org.jboss.jdbc.JdbcProvider name=DefaultDomain:service=JdbcProvider attribute name=Driversorg.hsql.jdbcDriver
RE: [JBoss-user] Can String be mapped to CLOB in Oracle8i using CMP?
we use blobs for Strings... you could use a clob I suppose but I believe (havent tried it) you would have to put the string in a char array. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia Sent: Thursday, June 07, 2001 6:41 AM To: jbossuser Subject: [JBoss-user] Can String be mapped to CLOB in Oracle8i using CMP? For technical reasons cann't try it out for myself right now, has someone done this? regards ZHU Jia ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] EJB Integration with existing Java Framework - Urgent!
Threads and IO are prohibited in an EJB, there is nothing to stop a separate class from using IO and threads, and having those classes be used within the EJB. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ZHU Jia Sent: Thursday, June 07, 2001 7:05 AM To: jbossuser Subject: [JBoss-user] EJB Integration with existing Java Framework - Urgent! 2. Some of our java files need threads and file IO, and the EJBs should call them. I don't know if this can be a problem because threads and file IO are forbidden in EJB. Also I think I have to put the existing files in an archive and place them into the lib dir of JBoss, right? But where's the best place for resources this library itself needs, like conf files, graphics etc.? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Packaging
Below is a sample ejb-jar.xml that has several beans in it, both session and entity. Al ?xml version=1.0 encoding=Cp1252? !DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd' ejb-jar descriptionPageScreamer Central Message Beans/description display-nameMessages/display-name enterprise-beans session ejb-namemessageController/ejb-name homecom.crunchy.ejb.session.messageControllerHome/home remotecom.crunchy.ejb.session.messageController/remote ejb-classcom.crunchy.ejb.session.messageControllerBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type ejb-ref ejb-ref-nameejb/messageThread/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.crunchy.ejb.entity.MessagethreadTHome/home remotecom.crunchy.ejb.entity.MessagethreadT/remote ejb-linkmessageThread/ejb-link /ejb-ref ejb-ref ejb-ref-nameejb/forum/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.crunchy.ejb.entity.ForumTHome/home remotecom.crunchy.ejb.entity.ForumT/remote ejb-linkforum/ejb-link /ejb-ref ejb-ref ejb-ref-nameejb/message/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.crunchy.ejb.entity.MessageTHome/home remotecom.crunchy.ejb.entity.MessageT/remote ejb-linkmessage/ejb-link /ejb-ref /session entity ejb-namemessageThread/ejb-name homecom.crunchy.ejb.entity.MessagethreadTHome/home remotecom.crunchy.ejb.entity.MessagethreadT/remote ejb-classcom.crunchy.ejb.entity.MessagethreadTBean/ejb-class persistence-typeBean/persistence-type prim-key-classcom.crunchy.ejb.entity.MessagethreadT_PK/prim-key-class reentrantFalse/reentrant /entity entity ejb-nameforum/ejb-name homecom.crunchy.ejb.entity.ForumTHome/home remotecom.crunchy.ejb.entity.ForumT/remote ejb-classcom.crunchy.ejb.entity.ForumTBean/ejb-class persistence-typeBean/persistence-type prim-key-classcom.crunchy.ejb.entity.ForumT_PK/prim-key-class reentrantFalse/reentrant /entity entity ejb-namemessage/ejb-name homecom.crunchy.ejb.entity.MessageTHome/home remotecom.crunchy.ejb.entity.MessageT/remote ejb-classcom.crunchy.ejb.entity.MessageTBeanBMP/ejb-class persistence-typeBean/persistence-type prim-key-classcom.crunchy.ejb.entity.MessageT_PK/prim-key-class reentrantFalse/reentrant /entity /enterprise-beans assembly-descriptor container-transaction method ejb-namemessageController/ejb-name method-name*/method-name /method trans-attributeSupports/trans-attribute /container-transaction container-transaction method ejb-nameforum/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction container-transaction method ejb-namemessageThread/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction container-transaction method ejb-namemessage/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Sent: Thursday, June 07, 2001 7:52 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Packaging How i execute the xml maker app that documentation refers??? How do I pack 2 beans in one ejb-jar.xml??? Emerson Cargnin TRE-SC Setor de Desenvolvimento Tel: (48) 251-3700 - Ramal 3134 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Deploy Error : jboss trying to connect to java.sun.com ?
remove your !DOCTYPE lines from your xml deployment descriptors, or point them to an internal version of the DTD. If you just remove them you will potentially receive warning messages later from tomcat, and the document wont validate, but it will work. That is what we were doing, now we point it at an internal DTD. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Brimley, David: CSFB ECM Sent: Thursday, June 07, 2001 5:55 AM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] Deploy Error : jboss trying to connect to java.sun.com ? Hi I'm sure this is a dumb first timers question.I've scanned thru the online docs and read thru the email archive but find nothing to help me, also please accept my apologies if this is not the correct place to be sending such enquiries I'm trying to boot up my JBoss 2.2.2/Tomcat Server 3.2.2 on my Windozzz NT4 Workstation, I'm using run_with_tomcat.bat The default ear is not deploying correctly, it looks as if JBoss is trying to reach java.sun.com ??? This machine is on an internal network with no direct route to the Internet and I get the following error. [Container factory] Deployed application: file:/H:/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/tomcat-test.ear [J2EE Deployer Default] Starting module tomcat-test.war [Auto deploy] deploy, ctxPath=/jboss, warUrl=file:/H:/JBoss-2.2.2_Tomcat-3.2.2/jboss/tmp/deploy/Default/tomcat-tes t.ear/web1001/ [Auto deploy] java.net.UnknownHostException: java.sun.com [Auto deploy] at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035) [Auto deploy] at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2723) [Auto deploy] at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1154) [Auto deploy] at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488) [Auto deploy] at org.apache.crimson.parser.Parser2.parse(Parser2.java:304) [Auto deploy] at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) [Auto deploy] at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:1 79) [Auto deploy] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:161) [Auto deploy] at org.jboss.tomcat.naming.JbossWebXmlReader.contextInit(JbossWebXmlReader.java :52) [Auto deploy] at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491) [Auto deploy] at org.jboss.tomcat.TomcatEntry.initContext(TomcatEntry.java:144) [Auto deploy] at org.jboss.tomcat.EmbeddedTomcatServiceSX.performDeploy(EmbeddedTomcatService SX.java:117) [Auto deploy] at org.jboss.web.AbstractWebContainer.deploy(AbstractWebContainer.java:178) [Auto deploy] at java.lang.reflect.Method.invoke(Native Method) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [Auto deploy] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:431) [Auto deploy] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:178) [Auto deploy] at java.lang.reflect.Method.invoke(Native Method) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [Auto deploy] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358) [Auto deploy] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221) [Auto deploy] at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:332) [Auto deploy] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93) [Auto deploy] at java.lang.reflect.Method.invoke(Native Method) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [Auto deploy] at org.jboss.util.ServiceControl.start(ServiceControl.java:97) [Auto deploy] at java.lang.reflect.Method.invoke(Native Method) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [Auto deploy] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [Auto deploy] at org.jboss.Main.init(Main.java:217) [Auto deploy] at org.jboss.Main$1.run(Main.java:121) [Auto deploy] at java.security.AccessController.doPrivileged(Native Method) [Auto deploy] at org.jboss.Main.main(Main.java:117) [Auto deploy] java.net.UnknownHostException: java.sun.com [Auto deploy] at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035) [Auto deploy] at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2723) [Auto deploy] at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1154) [Auto deploy] at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488) [Auto deploy] at
RE: [JBoss-user] notifying multiple users of a change
you wouldnt necessarily have to use a MDB, although I believe JMS is probably a decent solution for this. At least a low coding overhead. you could have each client subscribe to some topic, and have JMS publish to that topic whenever data is changed. No real need for a MDB here. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nicolai P Guba Sent: Thursday, June 07, 2001 10:21 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] notifying multiple users of a change Suppose I have a multitude of EJB clients connecting to a jboss server. One client changes some data displayed in the other clients. How do I notify other clients that a change occurred so that they can display the update? My guess would be MDB. -- Nicolai P Gubahttp://www.gnu.org http://www.frontwire.com mailgo:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] GSM: +44 (0)7909 960 751 DDI: +44 (0)20 7368 9708 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] DB pool without specified username/password.
Why dont you just set the pool up normally, then use the datasource.getConnection(String user, String Password) to connect as a named user? It's probably not the most efficient mechanism, but it should work. Assuming your drivers support the mechanism. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nicolai P Guba Sent: Thursday, June 07, 2001 12:43 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] DB pool without specified username/password. HP == Heikki Paajanen [EMAIL PROTECTED] writes: HP Hi Is it possible to create DB pool without giving username and HP password beforehand ? So you can use DataSource connecting run HP time with some username and password... HP Or is there a way to do it without pool or direct jdbc code ? I've never managed to get a mySQL connection pool going without having to provide at least a password. I am not sure wether this is a bug or a feature. Maybe a different connection pool would provide such feature? -- Nicolai P Gubahttp://www.gnu.org http://www.frontwire.com mailgo:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] GSM: +44 (0)7909 960 751 DDI: +44 (0)20 7368 9708 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] DEAR JBOSS USERS
It can't? We are using it in an application that has both CMP and BMP entity beans and they work fine. Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Faisal Abdallah Sent: Thursday, June 07, 2001 4:39 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] DEAR JBOSS USERS Dear Jboss users I am interested in hearing your experience with Jboss . I ve been using it since jboss2.0 update ...nd few improvements have occurred since .Till now it seems to me that IT can't, even, carry out the simplest EJB tasks such as finder methods( ByPrimarykey(),findAll( ) and Collection findBy...( ) Hope I can hear your views so I can try another decent EJB server many thinks ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Sample EJBs using ANT
its not specific to JBoss but there is a great little tutorial that uses entity beans and Ant (with Orion Server) at http://www.jollem.com/orion-cmp-primer/ Al -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of john cooney Sent: Tuesday, June 05, 2001 1:15 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] Sample EJBs using ANT I was wondering if someone could post to me, or to the list, a few sample Entity EJBs with deployment descriptors and directions on how to compile/deploy with ANT. Thanks John. ([EMAIL PROTECTED]) _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user