RE: [JBoss-user] BLOB
Hi, > Well, I wonder if it can work, I could find no way in the jdbc spec to > create a new blob! So maybe you could read the picture but I > don't know > how JAWS could insert a new row. I hope I'm wrong, please > tell me how. Well... In case of Firebird 0.9.4 + InterClient 1.6 this works for me. I just have a mapping java.lang.Object -> BLOB -> BLOB and its works fine. I have find no createBlob() method in JDBC specs, but nobody prevents st = con.prepareStatement("INSERT INTO (blobcol) VALUES(?)"); st.setBytes(myBlobData); to work correctly (and because this works in case of InterClient's implementation I believe that JAWS uses this way of setting BLOB data). And I completely agree with you that this behaviour is completely implementation dependent, so one have to check it before using in live configuration. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] auto deploy not working on linux
probably your Linux box does not allow connection to sun.com, the place where DTDs are located. Either allow HTTP connection there, or place DTDs in file system and change the DTD URLs in the .xml files. Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 2 WEEKS EVICTION NOTICE
1 vote for mailing list. 1 vote for replicating list in forum and vice versa. Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Re: Tomcat vs. Apache web server and JBoss
> Thanks for your response. Just to add one more item, our > deployment platform > in Windows NT and 2000. jdk1.3. Have no experience with Windows for the live system, however, my development platform is Win2k :) > So, what you are saying is that JBoss_Tomcat can coexist with > Apache without any headaches? I presume that you will have > to configure Apache into the mix some how. E.g. Tell Tomcat to > just do the JSP/Servlet processing and leave the presentation > to Apache. Where do you do the configurations? Apache can be tied with Tomcat using the mod_jk Apache module. Depending on your Apache you have either just plug it in (in case of "modular" Apache), or recompile the Apache if you have all modules built in. I have no experience using Apache on Windows, so I cannot tell how to plug mod_jk there. mod_jk module can be found in the same directory where the Tomcat distribution is located. In case of Windows this is http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/bin/win32/i38 6/ mod_jk "howto" can be found at http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html After installing the mod_jk, configuration is trivial: in mod_jk.conf you have to add following strings: JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 where, ajp13 is the name of the worker (name can be arbitrary to certain extent :)) from the worker.properties file (it is automatically generated by Tomcat, you have just to copy it somewhere and remove unnecessary lines like contexts that you do not want to put online). The site should be served by Apache, that means that port 80 (or any you choose for the site) is served by Apache, the Tomcat usually should not be accessible outside. You can, for example, block the outside connection on Tomcat's port on firewall, or just remove the the HttpConnectionHandler from the Tomcat server.xml and check if the Ajp12ConnectionHandler or Ajp13ConnectionHandler (preffered) are enabled (also should not be accessible from outside). I have no idea how to configure ports and routing in Windows, so I'd put firewall anyway. Few hints: - ajp12 is an old protocol used in mod_jserv, Tomcat with mod_jk should use the ajp13 (highly recommended), even the ajp12 is supported and seems to be configured by default in Tomcat. - on NT you can put Apache, Tomcat and mod_jk as services, try to look for docs on http://jakarta.apache.org. - if you use some other extensions for JSPs (for example .myjsp :)), be sure that this is also included in mod_jk.conf Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Enabling JAWS debug
> I tried to enable debug so I can see more detailed info > about what is failing but to no avail. Seeting the > true did not do anything. (Did it in every > jawsXXX.xml file I have). Any ideas? Where did you check for output? It shouldn't appear on console, only in server.log file. Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Tomcat vs. Apache web server and JBoss
Hi, > I use JBoss2.2.2+Tomcat3.2.2 (for JBoss as my EJB container > and Tomcat as my > JSP and Servlet container). I have a lot of static content > such as HTML > files, images, etc. which need to be served as well. Do I > need an external > web server such as Apache for serving the static content? > What are the +/- > of using Tomcat for everything vs. Apache for some of the > stuff? Would some > one please provide me some guidance? I hope there are some > documents which > talk about this. We have developed a site with quite high load on the static content and much more lower load on the active content (JSPs, etc.). Currently we have load approx. 3-5 requests per second (up to 10 mln. page hits per month) on static content and approx. 1 request per minute (:-)) on JSPs (usually login, change profile info, etc.). JSPs talk to JBoss. In this case we do have almost all CPU dedicated to apache processes (sometimes up to 100 apache processes). Tomcat's JVM "eats" approx. 0.15% CPU (JBoss is running on another host, same 0.15% CPU). So, this configuration is pretty nice if you have high amount of static content, basically static site, with some active areas (user account management, etc.). We did not try to put Tomcat's built in authentication, rather used Apache. So, summary is the following Apache vs. Tomcat: + Apache serves static content much more better than Tomcat :) + Somebody reported that Tomcat stalls at approx. 40 simultaneous requests. + Linux usually treat 100 apache better then one JVM with 100 threads inside (my personal opinion, no serious tests were made); I have no idea about Solaris and Windows. - In Apache+Tomcat configuration seems that you cannot use the Tomcat built-in authentication (and therefore intergration with JBoss on JAAS), at least I do not know that. - If served static content depends on some dynamic data (public content for all, public and protected for logged users), you hardly can use Apache (however, I may be wrong, maybe mod_jk does have so tight integration, but I do not expect it to). Personally, I would use Apache anyway, even for delivery of images, JSP can determine what image to include and what not to include, Apache will just deliver the stream. Also, with mod_jk you can load balance multiple Tomcats, however, beware that sessions are local to Tomcat. Hope this helps. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Taking backups
> I am not burdened with legacy software and I am doing a design from > scratch so I can pretty much make all the decisions. I want to make > sure I do it properly from the start :-) So, you can try the Firebird (InterBase) database. Because of the versioning mechanism, you can do backups when others are working with database. Check the http://www.ibphoenix.com to get more information. >From my experience, it performs quite well with daily backup invoked by the cron daemon. Best regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Interbase??
Hi, > I've tried to add this to jboss.jcml : > > > name="Properties">../conf/default/interbase.properties I think this is the problem that causes exception > > Be sure that you have the JDBC driver declared in the jboss.jcml and interclient.jar in the lib/ext directory. In jboss.jcml you have to put the interbase.interclient.Driver into the JdbcProvider bean: interbase.interclient.Driver My Interbase datasource declaration is the following. You do have to include the user name and password here, as it is required by InterClient JDBC driver. InterBaseDB org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l jdbc:interbase://potato/mnt/data/jboss.gdb SYSDBA masterkey false 10 Also be sure that in standardjaws.xml or jaws.xml in your .jar file you do have the following entry: java:/InterBaseDB I think you can use your InterbasePool name, however I didn't try to put it in my configuration. > with interbase.properties : > > user=mylogin > password=mypwd I think you don't need that file. This is instantdb specific thing I think. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] CMP entity bean "load balancig"
> You _might_ also want to turn on the JAWS 'select for update' option I think this will not work for Interbase (that I'm using at present time), because, as far as I know, Interbase being optimistic from the roots does not have such option. Pessimistic locking is obtained by the explicit UPDATE command. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] CMP entity bean "load balancig"
> I think this would be really cool too, however the events I am talking > about are I think an interbase specific feature - I think > Borland has a > patent on them, although I don't know the details. Can other > db's notify > you when rows change? What other sources of events are you > considering? > > I guess you could have instances of jboss broadcast commit/change > notifications to all the other clustered jbosses? I think we can have some kind generic cache multicast, notifying about events. I've implemented similar approach for Tomcat session update multicasting, and prototype works pretty nice. At the begining we can just have an event that invalidate the cached item, if some multicast event comes. > Are you thinking jms? I was thinking of adding something to the jca > firebird driver I am writing that would notify the cache more or less > directly. Do you need any help in this? I thin I can invest some time into the development... Best regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMP entity bean "load balancig"
Hi! I'm thinking about putting two JBoss instancess to access one single database to achive some kind of load balancing on the JBoss side (HTTP requests will go to a hardware load balancer, that in trun will forward them to two different Tomcats, each of them connected to its own JBoss). The question is: Does JBoss persistence manager (namely JAWS) checks if the record in database was changed by a third party, even if no transaction conflict occur? Such situation is possible when JBoss 1 commits and leaves the entity bean activated, then JBoss 2 updates that very entity bean and commits, and then JBoss 1 tries to read data from that entity bean. Can JBoss 1 detect changes in the database and will it reload the bean state? Regards, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] When to use PortableRemoteObject.narrow?
Check mail archives. Shortly: you have to use narrow(...) always (if only you're not completely sure that you will not ever use RMI/IIOP). Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
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
RE: [JBoss-user] JBuilder compilation bug ???
Hi, > In remote interface of my entity bean I declare toString > function throws > RemoteException, but get error in compilation. > > //Company.java > > public interface Company extends javax.ejb.EJBObject { > > public String toString() > throws RemoteException; > } > > // error > "Company.java": Error #: 462 : > method toString() in interface > com.filonet.filosafe.server.ejb.company.Company cannot > override method > toString() in class java.lang.Object, overridden > method does not throw > java.rmi.RemoteException at line 10, column 19 > > It's strange because of I can compile it with Sun's JDK 1.3.0_02 I would say, that _this_ is strange. This violates the Java language specification. You cannot override method and _add_ exceptions to its signature. This is because, if some of the code that uses your superclass has no try/catch clause, your exception will go up and so on. So, what you do, is _not_ legal. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] PortableRemoteObject.narrow
> When should I use PortableRemoteObject.narrow, and when should I not. If you use RMI/IIOP (Borland Application Server) then you need to "narrow" your classes, if you're only using RMI (JBoss), you can omit this. However, personally, I would include this code in all of my context lookups, because it increases the application portability. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Urgent: storing vector in the database
Hi! > Since JAWS just uses .equals to check if a field needs to be updated, > you should be able to write a Collection whose .equals method does a > 'deep' compare. If you do this, remember to implement > hashCode similarly > (not really needed by JAWS, but it's always a good practice to have > equals and hashCode match behavior) Thanks a lot! Now I do understand the problem I had :) And one more question (I'm just curious): Where does JAWS get the previous state of my bean? Does this mean that my beans are versioned? Best regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] problems with server with 2 network cards
Hi, > there really was java.naming.provider.url=localhost, so i > changed it to > 212.172.122.17, but still the same Check the jboss.properties. there's a configuration for the RMI dynamic classloading. I'm not sure if this is a case, but you can try. By default it is (I think so): java.rmi.server.hostname=localhost java.rmi.server.codebase=http://localhost:8080/ Also, use the "netstat -a" to see if JBoss is listening on particular network interface or on all of them (you will see either interface IP, or *:* for any interface). Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] problems with server with 2 network cards
What's in the jndi.properties in JBoss conf/? I think you have to put the java.naming.provider.url=212.172.122.17 instead of java.naming.provider.url=192.168.0.100 or java.naming.provider.url=localhost > -Original Message- > From: Patrick Buchinger [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 22. Juni 2001 11:21 > To: Jboss (E-mail) > Subject: [JBoss-user] problems with server with 2 network cards > > > hi everybody! > > i have a server with 2 network cards in it, one is connecting to the > internal network (let's say ip=192.168.0.100) and one is > connecting to > the internet (let's say ip=212.172.122.17). > the os of the server is linux (kernel 2.2.16). the server also is the > gateway from the internal network to the world (using NAT). > > now the problem is, when i try to connetct to jboss from outside the > internal network (to ip 212.172.122.17), i always get a > NoRouteToHostException to host 192.168.0.100!!??!!! > is this a jboss problem or a server configuration problem? > has someone > ever made such a configuration successfully run with jboss? > > the server is our development server, but our customer wants > to test the > application from outside, so i need this configuration to work. > > please help me! > > thank you very much, > > patrick > > > ___ > 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
Hi, > >true >false >false >false >300 >false > I would move your false from the into your that has Vector field. I hardly believe that you want to switch off tuned updates for _all_ CMP beans... This is nice feature and works almost all the time. There is more generic question that I would like to ask the JAWS developers: Is there any possibility to use the tuned updates with the entity bean, whose field changes only _internal_ state, and this field _must_ be updated in the database? I tried the isModified() method, but it seems to work only for BMP entity beans. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Jboss and RMI problem on Solaris
Hi! I had similar problem with JBoss, however, I had quite sophisticated packet filtering there. So, I had to enable the communication between both hosts (both were running Solaris). Also I had to add the localhost to the /etc/hosts.equiv file. Maybe this will help in your case too. If such file does not exist, just create it by yourself. > -Original Message- > From: Bhavin Patel [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 21. Juni 2001 18:43 > To: [EMAIL PROTECTED] > Subject: [JBoss-user] Jboss and RMI problem on Solaris > > > hi friends, > > we r running jboss2.2 on solaris and tomcat on linux. the > scenario is as > under. our naming service is on port 8080 on solaris and rmi > is at 1099 > on linux. > > problem: > we are calling a remote method on RMIObject(running on tomcat on > linux) from Session Bean(on JBoss on Solaris). we are able to lookup > the RMI object from session bean, but when we try to call any > method on > that object , the jboss shows following error. > > > [SessionBeanA] from session Bean java.rmi.ConnectException: > Connectio > n refused to host: 127.0.0.1; nested exception is: > java.net.ConnectException: Connection refused > [SessionBeanA] java.rmi.ConnectException: Connection refused to > host: 127.0.0.1; nested exception is: > java.net.ConnectException: Connection refused > [SessionBeanA] java.net.ConnectException: Connection refused > [SessionBeanA] at java.net.PlainSocketImpl.socketConnect(Native > Method) > [SessionBeanA] at > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320) > [SessionBeanA] at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133) > [SessionBeanA] at > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120) > [SessionBeanA at java.net.Socket.(Socket.java:273) > [SessionBeanA] at java.net.Socket.(Socket.java:100) > any idea? it's very urgent.. > Note: also we r runnig jboss/tomcat configuration > successfully when our > both servers r running on linux..but when we moved Jboss on > Solaris, we > got the above erro. Is there any problem running Jboss on solaris? > thanks in advance, > bhavin patel > > > > > > > > ___ > 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 it possible to have something "cached" in EJB without storing it in the DB?
Hi! > As far as I understand, there's no way to cache states across sessions > in EJB, right? Then how can I accomplish this: > We have some chained Java objects to be converted into EJBs, and these > objects perform quite costly operations. But the data these operations > return should only be temporary > so it wouldn't really make sense to model it in the DB. For > the sake of > performance, we put the data in a buffer and use a flag to > check whether > the condition has changed, and only > recalculate the whole thing if there's any change. But with EJB, I > cann't really hold a buffer in the bean because I don't have > any control > over the life cycle of the bean:-( > Well, to rephrase my question, is there some way to retrieve > some cached > state from EJB without resort to persistent storage? > Any hint or tip will be highly appreciated and many thanks in advance! What do you think about stateful session beans? For example, if you take the stateful session bean, you have the conversational state. Having the big cache you can expect that your bean will remain in memory. At least, when the bean is to be removed from the cache, you'll get a passivation event (ejbPassivate). And you can start your calculations on activation (ejbActivate) or creation (ejbCreate). Also I do not see any problem with storing buffer content in serialized form into some database record. If you say that calculations are costly, then storing data in DB will not be so costly, probably even less than 1% of the total execution time. Reards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [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??? Switch of the tuned updates for this bean. I had the same problems with the HashMap. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] API for JBoss
Hi, > I have an exemple of bean managed entity bean, using > javax.sql.Datasource, javax.sql.DataSource is the right interface. It is the standard J2EE interface and is in the JBoss classpath. Docs on JBoss are available at http://jboss.org/documentation/HTML/index.html Sources are available at http://jboss.org/cvs.jsp Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Proper shutdown under Linux
Somewhere on the JBoss mailing list I've found shell scripts to start/stop JBoss on RH. I use Solaris and had to change them slightly. However, I do not remember the link to the original script, so here's my version. file /etc/init.d/jboss #!/bin/sh # Source function library.#. /etc/rc.d/init.d/functions #SET THE FOLLOWING LINE TO YOUR JAVA_HOMEJAVA_HOME=/usr/local/java #SET THE FOLLOWING LINE TO YOUR CORRECT JBOSS_HOMEJBOSS_HOME=/opt/jboss PATH=${PATH}:${JBOSS_HOME}/bin:${JAVA_HOME}/bin:${JAVA_HOME}/jre/binexport PATH #IF YOU NEED SPECIAL CLASSES IN YOUR CLASSPATH#AT STARTUP, ADD THEM TO YOUR CLASSPATH HERE#export CLASSPATH= RETVAL=0 # See how we were called.case "$1" in start) cd $JBOSS_HOME/bin echo -n "Starting jboss daemon: " $JBOSS_HOME/bin/jboss start & ;; stop) echo -n "Stopping jboss daemon: " $JBOSS_HOME/bin/jboss stop ;; restart) echo -n "Restarting jboss daemon: " $0 stop sleep 20 $0 start ;; esac file /opt/jboss/bin/jboss #!/bin/sh JBOSS_HOME=/opt/jbossJAVA_HOME=/usr/java JAVACMD=$JAVA_HOME/bin/java # Minimal jar file to get JBoss started.CLASSPATH=$CLASSPATH:$JBOSS_HOME/bin/run.jarCLASSPATH="$CLASSPATH:$JBOSS_HOME/lib/crimson.jar" #next line for jBoss_FINAL-2.0#CLASSPATH="$CLASSPATH:$JBOSS_HOME/lib/jdbc2_0-stdext.jar"#CLASSPATH="$CLASSPATH:$JBOSS_HOME/lib/jboss-jaas.jar" JBOSS_OPTS=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImplJBOSS_OPTS="$JBOSS_OPTS -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl" # Add the tools.jar file so that Tomcat can find the Java compiler.CLASSPATH="${CLASSPATH}:$JAVA_HOME/lib/tools.jar" #if [ "${SPYDERMQ_HOME}X" != "X" ] ; then# if [ -x $SPYDERMQ_HOME ] ; then# echo "Adding jar files in ${SPYDERMQ_HOME}/lib to CLASSPATH"# CLASSPATH="$CLASSPATH:${SPYDERMQ_HOME}/lib/spydermq.jar"# CLASSPATH="$CLASSPATH:${SPYDERMQ_HOME}/lib/jms.jar"# CLASSPATH="$CLASSPATH:${SPYDERMQ_HOME}/lib/jnpserver.jar"# else# echo "SPYDERMQ_HOME is set, but is an invalid directory"# fi#fi if [ "$1" = "start" ] ; then shift $JAVACMD $JBOSS_OPTS -classpath $CLASSPATH org.jboss.Main > /dev/null 2>&1 & echo $! > /var/run/jboss.pidelif [ "$1" = "stop" ] ; then shift kill -15 `cat /var/run/jboss.pid` rm -rf /var/run/jboss.pidelif [ "$1" = "run" ] ; then shift $JAVACMD $JBOSS_OPTS -classpath $CLASSPATH org.jboss.Main tomcat "$@"else echo "Usage:" echo "jboss (start|run|stop)" echo " start - start jboss in the background" echo " run - start jboss in the foreground" echo " stop - stop jboss" exit 0fi -Original Message-From: Laurens Fridael [mailto:[EMAIL PROTECTED]]Sent: Mittwoch, 20. Juni 2001 10:44To: Jboss-UserSubject: [JBoss-user] Proper shutdown under Linux Hi, I'm using RedHat Linux 6.2. I can start JBoss in the background by running "run.sh &". However, I cannot properly kill it. I can only kill the parent process (run.sh) by issuing "kill -9 pid". This abruptly terminates JBoss without invoking its shutdown procedure. (I'm not seeing the shutdown commands in the server.log.) Under Windows I can achieve a clean shutdown by ^C-ing in the Window. However sending an interrupt (^C) or quit signal under Linux using "kill -2" or "kill -3" doesn't work at all. Help me out please. How can I properly shutdown JBoss under Linux? I'm using IBM's JDK 1.3 if that matters. Regards -Laurens
RE: [JBoss-user] Help! Jboss 2.2.2 / Interbase 6.01 / Interclient 2.0 / Jdk1.3
> > > Jboss 2.2.2 with Tomcat 3.2.2 > > > Interbase 6.01 (Solaris) > > > Interclient 2.0 > > > Jdk1.3 (sun) I had problems using the original InterBase with Firebird InterClient with the same exception. I'm not sure if that was the incompatibility of both products, maybe just some problems with configuration. However, I switched to FireBird 0.94 p1 (there's a build on SourceForge) + InterClient 1.6 (recompiled myself). Now everything is ok. Maybe this will help you... ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] distributing an application
Hi, > My question is: How do we start with that with JBOSS How > can we 'find' beans deployed in a JBOSS on another computer > and use them ?? Start the JBoss on one of the computers. You have to check the jndi.properties in the JBoss config, and replace the localhost with the normal IP address/host name in the java.naming.provider.url property where the JBoss is running. The same should be done in your client environment (depending on how you initialize the initial context). Check the JDBC url if it points to the database server instead local host, check your JSP engine if it tries to connect to the JBoss host for JNDI lookups (the property above). Seems that's all... Regards, Roman P.S. I have two machines: one running the JBoss + database (InterBase), other's running Tomcat. Both have Apache with mod_jk that connects to the Tomcat, and load balancer that sends requests to both Apache instances. It runs well. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] In-browser Java applet client to jBoss?
Hi, Here's my ideas to the last issue: > 4. Is this just a bad idea in general, and should a > rich-client applet > be communicating via HTTP and a Servlet (and perhaps XML or SOAP), as > opposed to RMI directly? If you use standard RMI, you expose your, probably sensible, data to the packet sniffer unles you make RMI use the HTTPS connection (not sure if this is possible in standard RMI implementation). I would use the XML/SOAP solution with encrypted content. But that's just my opinion. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP - jboss and interbase
Hi, I've found the problem with your bean, but before some InteBase history. InterBase uses the optimistic concurency control. To avoid locking on _reads_, it uses very interesting approach: records are not updated directly, rather they are versioned using the transaction id (maybe this is not strictly true, but your transaction id is related to the version of the record you see). So, when two transaction start, each of them see the most relevant version of the record. For example, when transaction A starts, and then transaction B starts, they see the same version of the record because no modification vere made since transaction start (here we assume the default transaction isolation, "read_commited"). Now user1 modifies the record in the transaction A. In order to achive the serializability of the results, InterBase instead of placing the lock on the record, just creates the version of the same record for the transaction A and modifies it. Whithin the transaction A, user1 sees the modified version of the record. However, user2 within the transaction B sees the *old* version of the record. When user1 commits the transaction A, the *new* record version is saved into the database, and on the subsequent select in the transaction B user 2 will see the modification. If user2 modifies the same record in the transaction B, then we have the _write_ conflict, that results in rollback for one of the transactions (depends on the time of commit, i think). So, how does it relates to your situation? You open the connection (and implicitly start the transaction) in the AccountEJB.setEntityContext method, and return the connection to the pool in the AccountEJB.unsetEntityContext method (implicitly performing the commit). So, between the setEntityContext and unsetEntityContext invocations you do have *the same* transaction. Then if you open some external tool (JDBCExplorer, IBConsole, etc.) and look into the table, you do see the *old* version of the record (because your commit was not performed). (However I wonder why you see that record at all, but maybe this is something that I miss in the versioning). I modified your code to obtain the connection before the statement execution and to close the connection right after statement execution and everything works fine. Also, con.commit() works too. I'm not sure if this is correct behaviour of the JBoss, because I would expect that commit on connection happens when the normal commit is executed on the bean. I'm using CMP, so I do not have problems with commit, because JAWS performs commit for me. So you need to think on the commit/rollback issue in case of BMP. I'm not guru in this topic, so ask somebody else. Best regards, Roman P.S. I also made slight changes in your jboss.xml - I removed the tag, because there were the reference to the "Standard CMP EntityBean", while you, probably, should use the "Standard BMP EntityBean", however I was not sure about this and let JBoss choose the right persistence manager itself. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Running on Solaris
I would replace the $JBOSS_CLASSPATH with the ${JBOSS_CLASSPATH} in the right side of expression... -Original Message-From: Dan Bratton [mailto:[EMAIL PROTECTED]]Sent: Donnerstag, 14. Juni 2001 18:55To: [EMAIL PROTECTED]Subject: RE: [JBoss-user] Running on Solaris edit your 'run_with_tomcat.sh' file and change the line that reads: export JBOSS_CLASSPATH=$JBOSS_CLASSPATH:$JAVA_HOME/lib/tools.jar to read: JBOSS_CLASSPATH=$JAVA_HOME/lib/tools.jar:$JBOSS_CLASSPATH that should take care of it for you db -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David A. PalmerSent: Thursday, June 14, 2001 10:13 AMTo: [EMAIL PROTECTED]Subject: [JBoss-user] Running on Solaris We are trying to run on Solaris. We keep getting the follwing message when running with tomcat. Jboss by itself starts fine. Any idea? root >> run_with_tomcat.sh./run_with_tomcat.sh: JBOSS_CLASSPATH=:/programs/j2sdk1_3_1/lib/tools.jar: is not an identifier Thanks David Palmer
RE: [JBoss-user] HELP - jboss and interbase
and what does your server.log say about this? usually when you have all debug turned on, you have all the statements that are executed by JAWS. Check if there are your update statements. Another way of debugging is to use the HypersonicSQL DB. It generates nice .sql file with all executed commands. In one of my cases there was: UPDATE ; ROLLBACK; And that helped my to find out the problem with the transaction declaration in ejb-jar.xml Regards, Roman. > -Original Message- > From: Radomir Kubala [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 15. Juni 2001 10:16 > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] HELP - jboss and interbase > > > Hi, > > my problem is solved. I checked my configuratin again. I had bad > configuration, I'm sorry. > > Now I have new problem. When I run example under the j2ee > server, it's ok. > Under the jboss the new values of balance wasn't updated in > database. There > are still zero. > > > rado > __ > ___ > 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] httprequest fired twice
Are requests the same? I suspect that IE first asks whether the content had been changed (if it wasn't changed, it will deliver local cached copy), and if the content had been changed, it will sent the right request to get the page. > Yes, I have this problem aswell. Don't know if its a bug in IE or in > Tomcat, but i would guess IE as both Netscape/Mozilla and Opera works > fine. > > > > On 14 Jun 2001 19:30:19 +0800, Jee-Meng Ang wrote: > > Just wondering whether anyone faced the problem of Jboss / Tomcat > > combination firing two HTTPRequest events from MS Internet Explorer? > > > > Regards, > > Jee Meng. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Customer Finders in CMP ejb
Hi, Sorry, for incomplete post (incidentally hit "send"). > > > > > >JamalSecurity >AR_SECURITY >false > > security_id_ > SECURITY_ID > > > username_ > USERNAME > > > password_ > PASSWORD > > > > findByUsernamePassword > username_ = {0} AND password_ = {1} So, as far as I know, persistence manager does not parse your "where" clause, just substitutes parameters. This means you have to put the real column names, "USERNAME" and "PASSWORD", not bean fields. > > > > > > > >OraclePool >Oracle8 > > > Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Customer Finders in CMP ejb
> > > >JamalSecurity >AR_SECURITY >false > > security_id_ > SECURITY_ID > > > username_ > USERNAME > > > password_ > PASSWORD > > > > findByUsernamePassword > username_ = {0} AND password_ = {1} ^^ ^ Persistence manager does not parse the > > > > > > > >OraclePool >Oracle8 > > > > > Thank you very much for your help. > > Regards, > Jamal. > > > ___ > 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 - jboss and interbase
Hi, I think JAWS uses another scheme for obtaining connection (right, danch?): Class.forName("interbase.interclient.Driver"); // force the JDBC driver to be loaded Connection con = DriverManager.getConnection("jdbc:interbase://localhost/c:/prj/cerpsejb/data /cerps.gdb", "sysdba", "masterkey"); Can you check this scheme? and maybe you can send your complete jboss log file to the list or privately ([EMAIL PROTECTED])? Regards, Roman > -Original Message- > From: Radomir Kubala [mailto:[EMAIL PROTECTED]] > Sent: Mittwoch, 13. Juni 2001 09:32 > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] HELP - jboss and interbase > > > Hi, > > my connection parameters are ok. I use the same interclient. > I seted debug > to true in standardjaws.xml. I got the same error message. > > When I changed mmakeConnection() : > > DataSource ds = new interbase.interclient.DataSource(); > > ((interbase.interclient.DataSource) ds).setServerName > ("localhost"); > ((interbase.interclient.DataSource) ds).setDatabaseName > ("c:/prj/ceprsejb/data/ceprs.gdb"); > ((interbase.interclient.DataSource) ds).setDataSourceName > ("Ceprs"); > ((interbase.interclient.DataSource) ds).setPortNumber (3060); > ((interbase.interclient.DataSource) ds).setNetworkProtocol > ("jdbc:interbase:"); > ((interbase.interclient.DataSource) ds).setRoleName (null); > > con = ds.getConnection("SYSDBA", "masterkey"); > > it ran ok. > > Rado > > (I'm sorry for my language, I don't speak very well) > > > >Well... check your connection parameters, try to connect to > your >database > >using something JDBC specific (for example, simple java > class or you can > >download a trial of JDataStore with developer license, and > they do have > > >more > >or less nice tool - JDBC Explorer), be sure that you use the same > >interclient.jar as your jboss uses and the same connection > parameters. > > >Also check if the JAWS debug is turned on (true in > >standardjaws.xml). > > __ > ___ > 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] HELP - jboss and interbase
> I have not any interclient exception in my server.log file. Ok, but you do have the Minerva exceptions there: > [EJB] TRANSACTION ROLLBACK EXCEPTION:Unable to connect to database. > org.opentools.minerva.jdbc.xa.XAPoolDataSource; nested exception is: > javax.ejb.EJBException: Unable to connect to database. > org.opentools.minerva.jdbc.xa.XAPoolDataSource > [EJB] javax.ejb.EJBException: Unable to connect to database. > org.opentools.minerva.jdbc.xa.XAPoolDataSource Well... check your connection parameters, try to connect to your database using something JDBC specific (for example, simple java class or you can download a trial of JDataStore with developer license, and they do have more or less nice tool - JDBC Explorer), be sure that you use the same interclient.jar as your jboss uses and the same connection parameters. Also check if the JAWS debug is turned on (true in standardjaws.xml). Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] HELP - jboss and interbase
according to exception stack trace, jboss is not able to obtain connection to database. however, more usefull is information in the jboss log file: %JBOSS_HOME%/logs/server.log. There you should see an exception from InterClient, that is usually more expressive. Also, you probably should remove the comma (",") before the driver name in jboss.jcml. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Interbase 6 problem
What kind of exception did you get on server side? Can you include mapping here? And, for sure, storing date in String should not be the problem, as long as JAWS is able to parse it. Also, I would suggest to use VARCHAR sql type instead of CHAR (JAWS may have problems to parse the empty spaces). > -Original Message- > From: Belli Andrea [mailto:[EMAIL PROTECTED]] > Sent: Mittwoch, 23. Mai 2001 11:56 > To: Jboss-User (E-mail) > Subject: [JBoss-user] Interbase 6 problem > > > I have a problem with data type date: in type mappings found in > standardjaws.xml the type mapping for DATE is java.sql.Date, > so I use it in > the field of the entity bean. > The problem is that I receive an error about the composition of > PreparedStatement; I tried to change the Date type with a > String and It > seems to function. > What is the problem? Andrea > > ___ > 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] automatically reloading servlet classes
As far as I know Tomcat automatically reloads the WEB-INF/classes and WEB-INF/lib directories. So if your helper classes are in that folders, they should be reloaded too. Classes from ${TOMCAT_HOME}/lib directory are loaded on the start and are not reloaded during tomcat lifetime. > -Original Message- > From: Noels Jeroen [mailto:[EMAIL PROTECTED]] > Sent: Mittwoch, 23. Mai 2001 10:40 > To: '[EMAIL PROTECTED]' > Subject: [JBoss-user] automatically reloading servlet classes > > > > hi, > We experienced that embedded tomcat automatically reloads a > servlet class > (in the webapps directory) when it is modified, which is very > convenient for > development and debugging purposes. Does this automatic > reloading feature > extend to 'helper classes' that are used by the servlets, or > is there any > way to make it so? > Furthermore, if web.xml is modified, is there a way to > redeploy the servlets > without restarting the jboss-tomcat server? or is it possible > to restart > embedded tomcat only, without stopping all the other services? > > Jeroen Noels > > > ___ > 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 and CMT: when does the commit happen?
Dan and Georg, thank you for clarifying this topic! Roman Rokytskyy > -Original Message- > From: danch (Dan Christopherson) [mailto:[EMAIL PROTECTED]] > Sent: Dienstag, 22. Mai 2001 18:44 > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] CMP and CMT: when does the commit happen? > > > [EMAIL PROTECTED] wrote: > > > Hi, > > > > I've posted similar question previously, but probably it > was not clear. > > > > When does the commit happens in case of container managed > transaction with > > the container managed persistence? > > > Container managed persistence doesn't really effect this - that only > effects how the storage of entity beans is implemented. > > > > > > Required: ? > > > When the first EJB method on the stack (deepest in the stack > - the first > one called) completes. That is, if you have two beans which are both > marked 'Required' and bean A calls bean B, the transaction > will commit > when the method on bean A completes. See the note below on > the effects > of exceptions. > > > > > > RequiredNew: ? > > > The commit will happen when the method exits unless it throws > a system > exception, in which case it will roll back. Note that application > exceptions and EJBException will cause a commit. > > hope this helps, > 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
[JBoss-user] CMP and CMT: when does the commit happen?
Hi, I've posted similar question previously, but probably it was not clear. When does the commit happens in case of container managed transaction with the container managed persistence? Required: ? RequiredNew: ? Thanks in advance for any ideas. Roman Rokytskyy. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Any ideas: Upgrading CMP entity beans while preserving the data in the database?
Hi, Another question: Lets assume I have CMP entity beans, that have some serializable fields (but not belonging to the int, long, byte, char, String group, I mean they were wrapped in MarshalledObject and then serialized). And lets consider I have my data in the database already and I do not want to loose that data. Now, I do have to change the implementation of some serialized objects (for example, I had to add new/change existing methods). How can I get it running? What will happen, if the serialization IDs will not match during CMP bean activation? How can I read old data into new instances? TIA, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transactions: Required vs. RequiredNew
Hi, I have a couple of entity beans without corresponding session beans. Also I have appropriate wrapper classes for use in the application. The business logic is implemented on the "client" (more correctly, another tier) side instead of session beans. The reason for such design is that I have to have the possibility to use simultaneously EJB and non-EJB classes while supporting the same interface. The question is: what kind of transaction demarcation should I use to get the atomic execution of EJB methods, while don't caring about the atomicity of the subsequent execution of couple bean's methods? TIA, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Beans in jsp
> Do you not? No, I'm using JBoss and Tomcat separately, both contain copies of home and remote interfaces. Try to ask this question with another subject, maybe somebody will respond. Regards, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Beans in jsp
No clue, I never used .ear files. Does anybody have any idea how to avoid having the multiple copies of the home and remote interfaces in jboss and tomcat? > There's no way to create a context from the ejb jar and see the beans > without need of maintain two copies of my interfaces? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Beans in jsp
> org.apache.jasper.JasperException: Unable to compile class for > JSP/usr/local/jakarta_3.2.1/jakarta-tomcat-3.2.1/work/localhos > t_8080%2Fcustomer/_0002ftest_0005fservlet_0002ejsptest_0005fse > rvlet_jsp_13.java:59: Class > Customer not found. > Customer u = (Customer) > request.getAttribute("customer"); Have you tried to import that class? <%@page import="customers.Customer"%> ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] How To JBoss 2.1.1, Interbase 6.01, JDK1.3 on Su se Linux 7.0
> Please report problems compiling IC2.0 (firebird version) to > the firebird bugs list-- it's on sourceforge also. I would > certainly appreciate it if you would try the ant build script > first, I haven't been able to get the makefile to work for me. Ok, I will do this after trying to get the clean working environment on my Solaris. > IC2.0 gives you dialect 3 with several useful features > including big ints and better numeric support. With > IC1.6 you are limited to IB5.6 features (and you will > eventually have to migrate to dialect 3). If you are > feeling daring there is a firebird 0.9.5 beta just > posted (includes bug fixes to date, not yet tested) Sounds reasonable. :) I will update my IC after compiling the 2.0 on Solaris. Question: Does JBoss uses the dialect 3? I didn't notice it to follow new syntax (well, it's hard to do this if you use prepared statements only :)). Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Intrabean Call ?
The ctx variable in the documentation example is of javax.naming.Context type, while your ctx is of javax.ejb.SessionContext in the book you should have something like: javax.naming.Context ctx = new javax.naming.InitialContext(...); -Original Message-From: Thomas Grnert [mailto:[EMAIL PROTECTED]]Sent: Donnerstag, 17. Mai 2001 16:30To: [EMAIL PROTECTED]Subject: [JBoss-user] Intrabean Call ?Hi,documentation says:public class ABean implements EntityBean { ...public void BusinessMethod(...) {...BHome home = (BHome)ctx.lookup("java:comp/env/ejb/myBean");B bean = home.create(pk);...}}My inside a SessionBean code looks like:private SessionContext ctx;public void setSessionContext(SessionContext sc) {this.ctx = sc; }public DocumentFragment getMassnahmeByID(long ID) throws RemoteException{MassnahmeHome m_home = (MassnahmeHome)ctx.lookup("java:comp/env/entity/katalog/Massnahme");SessionContext.getEJBObject(). Compiler says:cannot resolv symbol: mothod lookupI am sure that I do something really wrong. Please help me !Thomas
RE: [JBoss-user] How To JBoss 2.1.1, Interbase 6.01, JDK1.3 on Su se Linux 7.0
> 1. Does your NetTCP.cpp contain something like this? (around line 141) > > int > NetTCP::netOpen (int sockfd, int *newSockfd, int inetdflag) > { > register int tmpSockfd, childpid; > //david jencks 1-19-2001 begin > // int clilen, on; > #ifndef socklen_t //problem on ms compiler > #define socklen_t size_t //or int //problem on rhlinux 7, > socklen_t is > uint, size_t is int > #endif > int on; > socklen_t clilen; > //david jencks 1-19-2001 end > struct sockaddr_in tcpCliAddr; Yep, but only in the IC 2.0 source tree. I've been compiling the 1.6 tree (there were some problems during compiling the 2.0 tree, I just don't remember what). In case of IC 1.6 you have to add this patch. > 2. Are socklen_t and size_t defined as int or uint on your systems? Yes, it is. In the /usr/include/bits/socket.h : typedef unsigned int socklen_t; > 3. Did you try the ant build script for interclient + interserver in > /dev/firebird? did it work? No, I didn't. I just missed it (I was too happy that normal Makefile works, so I didn't look for any other solutions :)) > Please help straighten out what is needed for multiple platforms. I had problems compiling the InterServer 2.0 on the SPARC/Solaris 7 platform too (InterServer 1.6 compiled fine). But this list is probably not the right place to report Firebird problems, is it? BTW, where can I report the build problem of IC 2.0 on Solaris 7? Despite the message that IC 2.0 works with IB 6.01 (however there were no message that IC 1.6 _doesn't_ work with Firebird 0.9.4p1 :)) I'm using the combination Firebird 0.9.4 + IC 1.6 on Debian and Solaris 7 and currently everything is fine. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] How To JBoss 2.1.1, Interbase 6.01, JDK1.3 on Suse Linux 7.0
Hi, Great job! I've experienced the same problems with IB 6.01 on Debian Linux. There were few differencies from your "how to": > 1. > > Install Interbase from www.interbase.com. Unpack and run, > there is no problem. Attention on the first gsec call. > gsec -user SYSDBA -password changeme (different to windows, > where the password is "masterkey") > > Create a database. See Doku. Completely agreed. Also, if you have a Win32 box, you can use the IB Console (comes with Win32 version of the IB 6.01) for performing these tasks. However the InterBase 6.01 worked bad during tests (my database appeared corrupted after lots of remove() invocations on remote party of CMP entity bean). I switched to Firebird 0.9.4p1 and everything was fine. > Second problem: the interserver from from Borland will not > run on Suse Linux 7.0 because a libary is missing. No way there. > Solution: Take interserver from firebird. How to get sources > from this ? Read http://firebird.sourceforge.net. Same on Debian. interserver is executed only when the connection is established to the port 3060 and it prints the error message to the telnet stream. Standard JDBC driver does not recognise this problem and complains about the wrong version of interclient.jar and interserver. This is quite misleading. > If will not have egcs installed. But there is a work around: > > patch makefile: > > > #CC=gcc > > #For linux > LINUX_CC=gcc > # - set this to gcc as your comiler > > CC=$(LINUX_CC) Same on Debian. > gcc -w -fhandle-exceptions -DUSE_INETD -DUNIX -DARCH_32 > -I/usr/interbase/include -c NetTCP.cpp -o NetTCP.o > NetTCP.cpp: In function `static int NetTCP::netOpen(int, int *, int)': > NetTCP.cpp:176: passing `int *' as argument 3 of `accept(int, > sockaddr *, socklen_t *)' changes signedness > make: *** [NetTCP.o] Error 1 > > > So you can patch the NetTCP.cpp file: > > again: > clilen = sizeof (tcpCliAddr); > //tmpSockfd = accept (sockfd, (struct sockaddr *) > &tcpCliAddr, &clilen); > tmpSockfd = accept (sockfd, (struct sockaddr *) > &tcpCliAddr, (unsigned int *) &clilen); > //MW: cast to (unsigned int *) added to make it work with > gcc ^^ Same on Debian. > 3. > > But may you have an getMetaData problem. > A special interclient.jar should help. Thanks to David Jenks. > I am not sure about his modifications to this driver. On Debian I just recompiled the interclient classes. No changes were neccessary. All further steps on configuring the JBoss are the same. Currently I'm installing the same configuration on the SPARC/Solaris 7 platform, and I use Firebird 0.9.4, I do need to recompile the interclient. After finishing that things I will report the results. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] select count(*) from ... during CMP bean creatio n
> It looks to me as if having JAWSPersistenceManager get the class of a > JDBCCommandFactory from the container metadata, and having > JDBCCommandFactory descendants (and the commands they create) > implement the > db specific behaviour is a possibility. Is this what you > were proposing? Not exactly. Yes, you're right that if you go for the JDBCCommandFactory then you're able to provide commands that can implement the database specific functionality. However, what I propose, is to reuse the existing commands, because almost the all functionality remains the same. For example, if I want to override the setParameter(PreparedStatement, int, int, Object), getResultObject(ResultSet, int, Class) or jdbcExecute(Object) in the JDBCCommand class (to customize the serialization for example), I can do this by public class MyJDBCCommand extends JDBCCommand { protected void setParameter(...) {...} protected Object getResultObject(...) {...} protected jdbcExecute(Object arg) {...} } All existing JDBC commands could be reused (the code there is basically business logic, and not DB specific). But I cannot do this because all of them are inherited from the JDBCCommand, not MyJDBCCommand. That is my vision of the problem. My idea is that all JDBC commands use delegation instead of the inheritence. Then if I'm able to pass my JDBCCommand class as the parameter, I can reuse current code and don't worry about the creating a bunch of classes by copying them from existing code. Regards, Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 100,000 CMP entity beans on Firebird 0.9.4/Debian Linux
Sorry for not replying to the topic, I was busy by tuning the performance of database (Firebird 0.9.4 p1). Now everything is ok. I don't use PosgreSQL any longer, because even the 7.x version is slower than Firebird (also I am using InterBase since the version 4.0, and I do like it! :)) > Can you send a snip of your client code? depending on how you > do this, it can really hurt! The main problem is having the > client initiate M transactions per row instead of one > (M being the number of method invocations). client code is something like this: //create accounts and corresponding profiles HashMap accounts = new HashMap(); AccountHome acctHome = (AccountHome)ctx.lookup("accounts"); ProfileHome profHome = (ProfileHome)ctx.lookup("profiles"); for(int i = 0; i < 100 * 1000; i++) { accounts.put(acctHome.create("test" + i), profHome.create("test" + i)); } then : //update profiles Iterator iterator = accounts.keySet().iterator(); while(iterator.hasNext()) ((Profile)accounts.get(iterator.next())).update(new TestProfile("test")); and then remove accounts and profiles (similar to create). > Other JAWS tips: > With a table this size, you _need_ to make sure that the > primary key is created in the database (note that the > JAWS persistence manager defaults to _not_ creating a > primary key - if you're letting JAWS create the > table, add a true into the > entity tag for that bean in jaws.xml. Thank you for the tip. The absence of the primary key index was definitely the reason of the great slowdown. It turned out to have exponential growth in case of select count(*) from my_bean_table where id = '..' when no index was available. After creating indexes by hands everything works great. > Put the true in your jaws.xml > also. This avoids updating unchanged columns, particularly the > primary key. In JBoss 2.4 (next release) primary key columns > will never be updated by JAWS. Note that if your primary key > changes, it isn't really a primary key - see Codd. That also helped a lot. And I completely agreed with your note about the immutability of the PK. At the end I want to put here some results: I was load testing the JBoss on two machines: M1 (Pentium III 550 Mhz, 256 Mb RAM, Win2k Prof) and M2 (Pentium II 350 MHz, 128 Mb RAM, Debian Linux). The M1 machine results: InterBase (no indexes) -- Creating 300 accounts + 300 profiles...36002 ms Updating 300 profiles...3605 ms Removing 300 accounts + 300 profiles...41159 ms JDataStore Creating 300 accounts...21360 ms Updating 300 profiles...3325 ms Removing 300 accounts...24616 ms InstantDB and PostgreSQL were definitely slower, HypersonicSQL was almost the same (test results were not included because the HypersonicSQL is not acceptable for me in case of fault-tolerance due to the big startup time). M2 machine results: Firebird 0.9.4 (with indexes) -- Creating 300 accounts + 300 profiles...23182 ms Updating 300 profiles...2861 ms Removing 300 accounts + 300 profiles...15858 ms Test for 100,000 accounts + 100,000 profiles crashed on the client side because of java.lang.OutOfMemoryError at ~45,000 accounts and ~45,000 profiles. JBoss behaved perfectly. More results will be available later after the launch of the application (approx in one month). Deployment platform is Sun Netra T1 (or something like this, SPARC 400 MHz, 512 MB RAM). I would suggest that we create the dedicated page on www.jboss.org to the more or less extreme JBoss usage. This perfectly exists for InterBase/Firebird (the largest known database handeled by InterBase is ~200 Gb). This information is very usefull while making the decisions. Do we have test that can be run for such purposes? Hope this info is interesting. Regards, Roman Rokytskyy. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Unable to resolve JNDI name
> Is it a bug? Shouldn't jBoss report that it could not > find jboss.xml during deployment? No, if no jboss.xml found, it uses the standardjboss.xml in the configuration dir. Same applies to the jaws.xml (it uses standardjaws.xml instead). Only ejb-jar.xml is required. Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] How can I embed JDBC into JBOSS?
Can you rephrase the question? Do you want to include your JDBC driver in the JBoss installation? If yes, then just put it into the lib/ext directory Do you want to configure your JBoss to use your JDBC driver in the database? If yes, read the Chapter 3 of documentation (http://www.jboss.org/documentation/HTML/ch03.html) Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Does it really needed the interfaces of the EJBHome and EJBObject subclasses to exist on the client side?
> Do you need the class when you compile? If the answer is > positive, it would > be quite sure that you would need it when you use it (during runtime) I think that is not true. You can have some interface that you need at compile time, but you definitely will have no implementation if it was created after you compiled your code. For example, your bean returns you instance of MyInterface, but the class (public class MyClass implements MyInterface) was created independently the client compilation. Then you need the dynamic class loading. In JDK 1.3 API for the java.rmi.MarshalledObject you can find that instance wrapped by the MarshalledObject is annotated with the URL for codebase. However, I never tried it. Maybe somebody else used this technique? Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] select count(*) from ... during CMP bean creation
> It occurs to me that if you expect the insert to normally > succeed, you could start by trying the insert, if it fails > you can investigate further with the count(*) query to > see if the problem is the existing row. This would be > one access for success, 2 for failure instead of 1+ > for failure and 2 for success (Even if the key is missing, > the insert might fail for other reasons.. maybe a unique > index). I support this idea. Some time before I've used the same technique for the small datawarehouse, it worked perfectly. > Another possibility (presumably for the future) would be > to have JAWS customizable with a plugin/database > vendor and recognize their error messages. That would be great. I've tried to customize the JAWS jdbc command object, but left that idea because of complexities: The reason is the inheritence of all JDBC. Usually one need to change only JDBCCommand in order to customize it to the database, but then you're not able to tell all other commands to use new one. I suggest that we define the abstract class that can takes JDBCCommand as constructor parameter and then invokes all methods on the passed JDBCCommand. All concrete commands should be inherited from that abstract class. It seems to me that in this case we will be able to customize JAWS for different databases easily. Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] select count(*) from ... during CMP bean creation
Hi all, Is there any possibility to switch off the additional lookup when creating the CMP entity bean? As far as I know, JAWS first invokes the "SELECT COUNT(*) FROM MYBEANTABLE WHERE MYBEANPK = ?", checks if the column contains 0, and only then issues the "INSERT INTO MYBEANTABLE ". Abovementioned select is quite expensive operation if the database is quite large (even if I create all indexes there). Hovever, I can create unique index on the PK column, and JBoss will receive the SQLException during insert... So, anyway I hope get the CreateException on the client side, which is quite acceptable for me. So the question is: is there any possibility to switch the existence lookup? TIA Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] BUG?: when JAWS CMP field type is java.langObject
> 1) Declare my field as byte[] and serialize the supplied > object to it myself > (I'm pretty sure the byte[] cmp management works?) It depends. I had problems with byte[] and InterBase JDBC driver. It is caused by the same method: in case of byte array it does not try to wrap it in the MarshalledObject, it uses stmt.setObject(...) instead. JDBC driver detects that this is byte[] and stores data directly. However, while deserializing, JBoss tries to deserialize the byte array into object and fails. However, in case of Hypersonic SQL and InstantDB everything works fine. > 2) Declare the field as MyObject which just contains the real > object. This > should fool the code into unwrapping MyObject and then I can > extract the real > object from that. That is exactly what I've tried. And it works. :) Also you can use another approach: you can define two fields: Object realField; String dbField; // here you can use any type you like then, in ejbCreate(...) (or any other modification method for the field) you convert the realField into dbField. In ejb-jar.xml you specify that only dbField is CMP field, and completely forget about the realField. Then, in ejbLoad() you explicitely convert the dbField (which is already assigned by JBoss) to realField. I'm currently using this approach to convert my byte[] PK into string representation, which is better from database point of view for creating indexes, etc. Hope this helps. Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] CMP finder method problem
> I could get to the bottom of this if I could just see what > the container is doing when the findAll() is triggered. > My question is: is there a way to print or log the SQL SELECT > statement that the container has executed on my entity bean's > behalf? If not, can anyone suggest a good way to debug > something like this? Yes, you can (there are few places where you can turn logging on and off): jaws.xml or standardjaws.xml and specify: ... true ... jboss.xml or standardjboss.xml in you CMP container configuration: true in jboss.jcml in your datasource configuration: ... true Also, do not forget to watch the server.log, not the console output, because SQL statements appear only in server log (at least in my case). Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Postgres woes
> postgres datasource is connecting fine on startup, but when any > ejbCreate method is called (i.e. an INSERT is called) > postgresql throws > this: > > java.lang.reflect.UndeclaredThrowableException: > javax.transaction.RollbackException: Unable to commit, tx=XidImpl > [FormatId=257, GlobalId=lovestuffer.internal.paribus.com//3, > BranchQual=] status=STATUS_ROLLEDBACK > at org.jboss.tm.TxCapsule.commit(TxCapsule.java:368) > at > org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI > nterceptorCMT.java:318) > ... Hmmm... That probably is not the Postgres bug/problem, because I had exactly the same exception running the InterBase. I thought, that problem is in InterClient JDBC driver, but now it seems the JBoss "programmed" behaviour. Has anybody about the reasons? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] findByPrimaryKey(byte[] id) method signature problem
> My understanding is that you must use an Java Object with a > parameterless contractor (ie no primitive type or array :( ). That was my understanding too. But BAS 4.5 seems to be more "intelligent" than I expected: it works also with the "normal" findByPrimaryKey(Object key) method too. However, if your PK is the byte[], then you're in troubles. I had to create a serializable wrapper class to use the byte[] as the PK for my beans... Roman. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] findByPrimaryKey(byte[] id) method signature problem
Hi all, I just tried to deploy my EJBs developed under JBoss 2.0 FINAL to Borland Application Server 4.5 for performance testing. Well... it crashed... :) The reason for this is that I have one findByPrimaryKey(byte[] id) method, where id is the MD5 digest. In case of JBoss I often get problems in various databases (at least InterBase with java.lang.Object to VARCHAR(16000) mapping, there I get the deserialization problem in JAWS). In case of HypersonicSQL and InstantDB everything works fine. When I ported that beans to the BAS 4.5 with JDataStore, I get funny SQL for that finder method. And the reason is that in case of BAS 4.5 the prim.key finder method signature is: findByPrimaryKey(Object[] pks) In documentation I found that the array should contain values for corresponding primary key field(s) (I think that they cover the composite PK case). I took the EJB 1.1 spec and did not find anything about the correct signature of the PK finder (only for the unknown PK class, they say that signature should be findByPrimaryKey(Object pks)). So, here is my question: does the unknown PK class means the "unknown class for the EJB server" or that's "the missing PK class descriptiong from ejb-jar.xml"? Can anybody say about the "right" PK finder signature? TIA, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 100,000 CMP entity beans
> Is this CMP or BMP? We're focusing on CMP performance in version 2.3. CMP > How are the transactions written? Do you call multiple methods from a > client, or are you using session wrappers, or is each transaction one > method inherently? I think that transaction per method. I do not use any explicit transaction handling. The only thing that is transaction related is ejb-jar.xml descriptor with "Required" transaction for all methods ("*"). > Do the update and delete call a finder then loop through the > resulting > collection, or do the call individual findByPrimaryKey()s? No, I use either findByPrimaryKey() or findBy methods. > Also, if you can try Postgres 7.1, it should be much faster > for various > reasons. Thank you for suggestion, I will. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 100,000 CMP entity beans
Thank you a lot for info! Can you give some estimates about the performace? I've conducted small test on my PC (Pentium III 550 MHz, 256 Mb RAM) using jboss and Hypersonic SQL. I get: creating 100 beans - approx. 5000 ms updating 100 beans - approx. 5000 ms deleting 100 beans - approx. 8000 ms Taking into consideration, that Hypersonic SQL (basically in-memory Java DB), this performance is more or less acceptable for us. However, file based tests for InstantDB show 3-4 times slower performance, and PostgreSQL 6.5.2 (ok, not 7.1) - 20 times slow down, and such performance is definitelly unacceptable. > currently we have 110.000 DokmentBean beans (the index table for our > document management system) on a MS SQL Server 7 SP2 on a > Pentium III 933 > with 1Gig RAM (database + jboss running on the same machine) > os is windows > 2000 server > > but we are using bmp (would cmp make a difference?) ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] (no subject)
You can use the method getRealPath() of the javax.servlet.ServletContext. In case of JSP page you can use: String absPath = config.getServletContext().getRealPath("/"); > -Original Message- > From: Felix Munoz [mailto:[EMAIL PROTECTED]] > Sent: Montag, 7. Mai 2001 10:26 > To: '[EMAIL PROTECTED]' > Subject: [JBoss-user] (no subject) > > > Hello: > > I am having a problem running a JSP and I was hoping for some > advice. I am > running embedded Tomcat. > > I have the following setup: > > index.jsp > directory/fileA.txt > directory/fileB.txt > > The job of index.jsp is to list the files in "directory." For > this, I was > trying to use something like this: > > File directory = new File("directory") > String[] fileList = directory.list(); > > Of course, because JSP needs to be compiled, and it is done > so in another > directory, when this code is run index.jsp does not find the > "directory" > directory. > > If I change the file path to an absolute path > > File directory = new > File("C:/JBoss/temp/deploy/MyWAR.war/web1005/directory"); > > it works fine. I am using this path because it is the only > one I can find in > the JBoss directory and in the Tomcat directory. Of course, > this is not a > standard path and, to make things worse, every time I deploy > the WAR file > the "web1005" token changes to something else. > > So the question is, is there a way to list files in a > directory by using a > path relative to the location of a JSP page? > > Thanks in advance, > > Felix Munoz > > ___ > 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 it best to place business logic in EJB's or in database stored procedures?
Hi, > I am working for an Oracle shop who are new to J2EE and they have a > preference for placing the business logic in stored procs so > that they can > leverage their existing expertise. > i.e. The app server hosts SessionBeans's that simply delegate > to stored > procs. > > The standard approach, as I understand it, is to place the > business logic in > Session EJB's and use entity EJB's and Data Access Objects to > model the > database rows. My opinion to this is: EJBs were introduced to increase the portability of the business and data logic. Case of stored procedures is custom and non-portable solution (only between Oracles). So, for me, including business and data logic in the EJB code is the most natural approach. I'm not talking about performance, because one my friend told that Oracle 8.1.7 uses bytecode to native code translation during compilation, so that will be definitely better performace if you use the Java stored procedures there. Another point is that using Oracle for simple serving plain table requests is not best idea, you can easily use some opensource/free database that will give you the same performance with smaller footprint. > > Does anyone have any opinions or recommendations regarding > each approach? > What are the advantages/disadvantages of placing the bus. logic in the > middle tier as opposed to the database? > > Assuming the bus. logic is stored in SessionBeans, what are > the advantages > of using entity beans to model the database rows rather that > hitting the > database direct from the SessionBeans? I think, if you run explicit SQL queries, you'll get better performance (and probably concurency control). I don't like BMP, because IMHO that's just another way to do old and "bad" things. What is the difference if you use the 2-tier (client-server) and 3-tier architectures? You get only connection pooling (and Oracle seems to have that already in its JDBC driver) and probably single entry point from outer world... You have the same problems with portability as in "old" approach. I try to use CMP, but in this case sometimes I get into troubles on modelling stage: things that worked in relational world seems to be inappropriate in object-oriented world (no surprise :))... Sometimes it is "cheaper" to simply serialize hashtable into one field instead of creating a bunch of entity beans ("normal" object-relational mapping technique). Currently I'm quite satisfied with business logic in session beans and sometimes in entity beans too (if that's clear data manipulation issue), and CMP entity beans. However, currently I do not know how it will behave under load (pure Oracle w/o EJB solution is beleived to be scalable enough provided the "right" hardware)... So, that's my $0.02 Regards, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] 100,000 CMP entity beans
Hi, Have anybody come accross such amout of beans? Would you be so kind to post your hardware and JBoss configuration (I mean basically database-related params: database type, its configuration) Thanks in advance, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Interest Example, NoClassDefFoundError
You forgot to include jbossx-client.jar... > -Original Message- > From: Boon Yeo [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 4. Mai 2001 17:47 > To: [EMAIL PROTECTED] > Subject: [JBoss-user] Interest Example, NoClassDefFoundError > > > Hello folks, > > Anybody knows why I am getting this error below? > > [root@unicorn interest]# java -classpath $CLASSPATH:\ > > /usr/java/jboss-2.2.1/lib/ext/ejb.jar:\ > > /usr/java/jboss-2.2.1/client/jboss-client.jar \ > > InterestClient > Got context > Got reference > Exception in thread "main" java.lang.NoClassDefFoundError: > org/jboss/security/SecurityAssociation > at > org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.getPrincipa > l(GenericProxy > .java:184) > at > org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomePro xy.java:231) > at $Proxy0.create(Unknown Source) > at InterestClient.main(InterestClient.java:50) > > Regards, > -Boon > > > > ___ > 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] Deployment problem.
Funny, but that seem to forgot to put that class into the .jar file... Each deployed .jar file should have all required classes, or they should be in the JBoss bootstrap classpath... You have to resolve that manually... > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 4. Mai 2001 11:17 > To: [EMAIL PROTECTED] > Subject: [JBoss-user] Deployment problem. > > > This eMail was already checked for viruses by TrendMicro InterScan!!! > Hi, > > i installed jBoss 2.2.1 on a windows NT 4 box. I use the default > configuration that came with the archiv. > > i want to try the examples that come with "Enterprise Java Beans" from > Richard Monson Haefel (O'Reilly). > > After some modifications to the batchfiles managed to create > the jar files. > > The entity beans deploed ok as far as i can tell. > ... > [Auto deploy] Auto deploy of > file:/D:/Programme/jboss/deploy/customer.jar > [J2EE Deployer Default] Module customer.jar is not running > [J2EE Deployer Default] Destroying application customer.jar > [J2EE Deployer Default] Deploy J2EE application: > file:/D:/Programme/jboss/deploy/customer.jar > [J2EE Deployer Default] Create application customer.jar > [J2EE Deployer Default] install module customer.jar > [Container factory] > Deploying:file:/D:/Programme/jboss/tmp/deploy/Default/customer.jar > [Verifier] Verifying > file:/D:/Programme/jboss/tmp/deploy/Default/customer.jar/ejb1003.jar > [Verifier] CustomerBean: Verified. > [Container factory] Deploying CustomerBean > [Container factory] Container Invoker RMI Port='' > [Container factory] Container Invoker Client SocketFactory='Default' > [Container factory] Container Invoker Server SocketFactory='Default' > [Container factory] Container Invoker Optimize='true' > [Container factory] JRMP 1.2.2 CI initialized > [JAWS] Initializing JAWS plugin for CustomerBean > [JAWS] Loading standardjaws.xml : > file:/D:/Programme/jboss/conf/default/standardjaws.xml > [JAWS] Table 'CustomerBean' already exists > [Container factory] Bound CustomerBean to CustomerBean > [Container factory] Deployed application: > file:/D:/Programme/jboss/tmp/deploy/Default/customer.jar > [J2EE Deployer Default] J2EE application: > file:/D:/Programme/jboss/deploy/customer.jar is deployed. > ... > > But if i deploy the session beans i got an exception that the > bean isn't > there. > > ... > [Auto deploy] Auto deploy of > file:/D:/Programme/jboss/deploy/reservation.jar > [J2EE Deployer Default] Deploy J2EE application: > file:/D:/Programme/jboss/deploy/reservation.jar > [J2EE Deployer Default] Create application reservation.jar > [J2EE Deployer Default] install module reservation.jar > [Container factory] > Deploying:file:/D:/Programme/jboss/tmp/deploy/Default/reservation.jar > [Verifier] Verifying > file:/D:/Programme/jboss/tmp/deploy/Default/reservation.jar/ej > b1004.jar > [Verifier] java.lang.NoClassDefFoundError: com/titan/customer/Customer > [Verifier] at java.lang.Class.getMethods0(Native Method) > [Verifier] at java.lang.Class.getMethods(Unknown Source) > [Verifier] at > org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMetho > d(AbstractVerifier.java, > > Compiled Code) > [Verifier] at > org.jboss.verifier.strategy.EJBVerifier11.verifyEntityBean(EJB Verifier11.java, > > Compiled Code) > [Verifier] at > org.jboss.verifier.strategy.EJBVerifier11.checkEntity(EJBVerif ier11.java:119) > [Verifier] at > org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java, > Compiled Code) > [Verifier] at > org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java, > Compiled Code) > [Verifier] at > org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java, > Compiled Code) > [Verifier] at > org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java, > Compiled Code) > [Verifier] at java.lang.reflect.Method.invoke(Native Method) > [Verifier] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java, > Compiled Code) > [Verifier] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl. java:1523) > [Verifier] at > org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java, > Compiled Code) > [Verifier] at > org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:178) > [Verifier] at java.lang.reflect.Method.invoke(Native Method) > [Verifier] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java, > Compiled Code) > [Verifier] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl. java:1523) > [Verifier] at > org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358) > [Verifier] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java, > Compiled Code) > [Verifier] at java.lang.Thread.run(Unknown Source) > [Container factory] Deploying ReservationBean > [Container factory] Container Invoker RMI Port='' > [Container factory] Container Invoker Client SocketFactory='Defa
RE: [JBoss-user] External reference inside one jar
> DbSourceHome home = (DbSourceHome) new > InitialContext().lookup("java:comp/env/ejb/guyr/DbSource"); in my case it will look InitialContext().lookup("java:comp/env/jndi/guyr/DbSource"); :) > ejb/guyr/DbSource Again, in my case that will be: jndi/guyr/DbSource The only problem here is that jndi/ context may be used by the EJB container for some purposes, but currently that works. :) What is strange to me is the internal reference resolving. Here I'm talking about JBoss 2.0 FINAL, but as far as I remember, same behaviour is in JBoss 2.2.1... The EJB specs says: "The name must be unique among the names of the enterprise beans in the same ejb-jar file." (EJB 1.1 specification, page 246 (250 in Acrobat Reader)). However, if you have two similar .jar files (jaws.xml and jboss.xml files are different) then internal links are resolved a little bit strange: - for the first deployed .jar file everything goes fine, internal links correspond to beans in that .jar file. - for all subsequent deployed .jar files, all internal references will be resolved to the beans deployed by first .jar file... Well, EJB 1.1 specs assume that application assembler may change bean names (the entries in the ejb-jar.xml file), but that's _not_ required... So, that is why you have to use the external references even if you want them to reference beans in the same .jar file... Regards, Roman ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Passing structures to an ejb
Well... you specified that behaviour by your self: private void writeObject(java.io.ObjectOutputStream out) throws IOException {}private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {} Objects are serialized to be passed through RMI. If you have an empty implementation of the writeObject(..) and readObject(...) and you have only implicitly created default constructor, you cannot want anything else from JVM. Either remove these methods, or implement them correctly. Regards, Roman
RE: [JBoss-user] Logging
Probably you can redirect them explicitly: OutputStream out = new FileOutputStream("my.log") System.setOut(out); System.setErr(out); But that will override the System.out and System.err for all classes loaded by this.getClass().getClassLoader() classloader... probably you should use the Log4j stuff (I didn't try it yet, but I've read it's in the JBoss distribution)... > -Original Message- > From: Bojan Smojver [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 4. Mai 2001 15:24 > To: JBoss User > Subject: [JBoss-user] Logging > > > A really simple and probably a really stupid question too: how do you > make the System.out and System.err be redirected to server.log or any > other file? All the System.out.println calls from within EJB's go > nowhere for me... > > Config: > - RH Linux 7 > - Sun JDK 1.3.0_02 > - JBoss 2.2.1 > > Thanks, > Bojan > > ___ > 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] External reference inside one jar - SOLVED
Hi again, I've solved the problem. It has nothing to the external references at all. The problem was with JAWS descriptor, it caused the incorrect SQLs to be issued: My bean has composite primary key: {byte[] accountId, String groupName}. During create(byte[] accountId, String groupName) JBoss seems to fill the accountId field with serialized form of the byte[]. Then, when I invoke findByAccountId(byte[] accountId), in case of presense of JAWS descriptor, instead of using the serialized version of the byte[], it uses the string with hexidecimal representation of bytes in array... Certainly, nothing can be found in this case... If JAWS descriptor is absent, everything goes fine. So, can this be a JAWS bug? Regards, Roman > -Original Message- > From: Rokytskyy, Roman (BER) > Sent: Donnerstag, 3. Mai 2001 18:12 > To: [EMAIL PROTECTED] > Subject: [JBoss-user] External reference inside one jar > > > Hi, > > I need to deploy same beans in different jar files in same > JBoss instance > (I'm using JBoss 2.0 FINAL). These beans implement user > account bases, and I > need two different account bases. > > To acomplish this, I use reference in the ejb-jar.xml and > appropriate in jboss.xml specifying in > ejb-ref/jndi-name local > JNDI name. > > When I look into the log file, i see that all references were resolved > correctly: > > [Container factory] Binding an EJBReference jndi/accountGroup > [Container factory] Binding jndi/accountGroup to external JNDI source: > account.group > [Container factory] Binding an EJBReference jndi/group > [Container factory] Binding jndi/group to external JNDI > source: group.group > [Container factory] Binding an EJBReference jndi/account > [Container factory] Binding jndi/account to external JNDI source: > account.account > > [Container factory] Bound ProfileHandlerBean to profile > [Container factory] Bound UserAccountBean to account.account > [Container factory] Bound UserGroupFactoryBean to group.factory > [Container factory] Bound UserGroupBean to group.group > [Container factory] Bound UserAccountGroupBean to account.group > > > Ok, one thing that I've found, is that reference names does > not start with > ejb/, but everything works ok, if I use internal references > and deploy only > one jar file. Another thing is, that I do not use the full > external URL, but > only local. However, local JNDI names are resolved correctly, > because I get > references to some instances. > > I'm not able to use internal reference in case of two and > more deployed > jars, because JBoss start mixing references. Seems that > is > unique to the JBoss instance, and not the bean context (which > is logical, > but I didn't find anything in specifications that supports or > deny the scope > of the ). > > Does anybody came across such problem and what was the > solution, if any? > > Roman Rokytskyy > > ___ > 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] Scalability question
Hi all, I'm going to handle approximately 100,000 entity beans with simultaneous access approximately 1-10 bean accesses per second. Is JBoss 2.0 FINAL capable handling such amounth of entity beans? And what database would you recommend to handle such load? Thank you in advance, Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] External reference inside one jar
Hi, I need to deploy same beans in different jar files in same JBoss instance (I'm using JBoss 2.0 FINAL). These beans implement user account bases, and I need two different account bases. To acomplish this, I use reference in the ejb-jar.xml and appropriate in jboss.xml specifying in ejb-ref/jndi-name local JNDI name. When I look into the log file, i see that all references were resolved correctly: [Container factory] Binding an EJBReference jndi/accountGroup [Container factory] Binding jndi/accountGroup to external JNDI source: account.group [Container factory] Binding an EJBReference jndi/group [Container factory] Binding jndi/group to external JNDI source: group.group [Container factory] Binding an EJBReference jndi/account [Container factory] Binding jndi/account to external JNDI source: account.account [Container factory] Bound ProfileHandlerBean to profile [Container factory] Bound UserAccountBean to account.account [Container factory] Bound UserGroupFactoryBean to group.factory [Container factory] Bound UserGroupBean to group.group [Container factory] Bound UserAccountGroupBean to account.group Ok, one thing that I've found, is that reference names does not start with ejb/, but everything works ok, if I use internal references and deploy only one jar file. Another thing is, that I do not use the full external URL, but only local. However, local JNDI names are resolved correctly, because I get references to some instances. I'm not able to use internal reference in case of two and more deployed jars, because JBoss start mixing references. Seems that is unique to the JBoss instance, and not the bean context (which is logical, but I didn't find anything in specifications that supports or deny the scope of the ). Does anybody came across such problem and what was the solution, if any? Roman Rokytskyy ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user