RE: [JBoss-user] BLOB

2001-07-19 Thread RRokytskyy

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] 2 WEEKS EVICTION NOTICE

2001-07-12 Thread RRokytskyy

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] auto deploy not working on linux

2001-07-12 Thread RRokytskyy

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] Re: Tomcat vs. Apache web server and JBoss

2001-07-09 Thread RRokytskyy

 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] Taking backups

2001-06-30 Thread RRokytskyy

 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] CMP entity bean load balancig

2001-06-28 Thread RRokytskyy

 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



RE: [JBoss-user] CMP entity bean load balancig

2001-06-28 Thread RRokytskyy

 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] Interbase??

2001-06-28 Thread RRokytskyy

Hi,

 I've tried to add this to jboss.jcml :
 
   mbean code=org.jboss.jdbc.XADataSourceLoader 
   
 attribute 
 name=Properties../conf/default/interbase.properties/attribute

I think this is the problem that causes exception

   
   /mbean

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:

mbean code=org.jboss.jdbc.JdbcProvider
name=DefaultDomain:service=JdbcProvider
   attribute name=Driversinterbase.interclient.Driver/attribute
/mbean


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.

mbean code=org.jboss.jdbc.XADataSourceLoader
name=DefaultDomain:service=XADataSource,name=InterBaseDB
attribute name=PoolNameInterBaseDB/attribute
attribute
name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l/attribute
attribute
name=URLjdbc:interbase://potato/mnt/data/jboss.gdb/attribute
attribute name=JDBCUserSYSDBA/attribute
attribute name=Passwordmasterkey/attribute
attribute name=LoggingEnabledfalse/attribute
attribute name=MaxSize10/attribute
/mbean


Also be sure that in standardjaws.xml or jaws.xml in your .jar file you do
have the following entry:

datasourcejava:/InterBaseDB/datasource


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



[JBoss-user] CMP entity bean load balancig

2001-06-27 Thread RRokytskyy

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] Jboss and RMI problem on Solaris

2001-06-22 Thread RRokytskyy

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.init(Socket.java:273) 
   [SessionBeanA] at java.net.Socket.init(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] Urgent: storing vector in the database

2001-06-22 Thread RRokytskyy

Hi,

 default-entity
create-tabletrue/create-table
remove-tablefalse/remove-table
tuned-updatesfalse/tuned-updates
read-onlyfalse/read-only
time-out300/time-out
select-for-updatefalse/select-for-update
 /default-entity

I would move your tuned-updatesfalse/tuned-updates from the
default-entity into your entity 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] problems with server with 2 network cards

2001-06-22 Thread RRokytskyy

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] problems with server with 2 network cards

2001-06-22 Thread RRokytskyy

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] Urgent: storing vector in the database

2001-06-22 Thread RRokytskyy

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] PortableRemoteObject.narrow

2001-06-22 Thread RRokytskyy

 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] JBuilder compilation bug ???

2001-06-22 Thread RRokytskyy

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] Urgent: storing vector in the database

2001-06-21 Thread RRokytskyy

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] Is it possible to have something cached in EJB without storing it in the DB?

2001-06-21 Thread RRokytskyy

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] Proper shutdown under Linux

2001-06-20 Thread RRokytskyy



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 21 
 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] distributing an application

2001-06-19 Thread RRokytskyy

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] HELP - jboss and interbase

2001-06-18 Thread RRokytskyy

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
container-configurations 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] In-browser Java applet client to jBoss?

2001-06-18 Thread RRokytskyy

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

2001-06-15 Thread RRokytskyy

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] Customer Finders in CMP ejb

2001-06-14 Thread RRokytskyy

 jaws
enterprise-beans
  entity
ejb-nameJamalSecurity/ejb-name
table-nameAR_SECURITY/table-name
create-tablefalse/create-table
cmp-field
  field-namesecurity_id_/field-name
  column-nameSECURITY_ID/column-name
/cmp-field
cmp-field
  field-nameusername_/field-name
  column-nameUSERNAME/column-name
/cmp-field
cmp-field
  field-namepassword_/field-name
  column-namePASSWORD/column-name
/cmp-field

finder
   namefindByUsernamePassword/name
   queryusername_ = {0} AND password_ = {1}/query
   ^^  ^
Persistence manager does not parse the 

   order/order
/finder

 
  /entity
/enterprise-beans

datasourceOraclePool/datasource 
type-mappingOracle8/type-mapping 

  /jaws
 
 
 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] Customer Finders in CMP ejb

2001-06-14 Thread RRokytskyy

Hi,

Sorry, for incomplete post (incidentally hit send).

 ?xml version=1.0 encoding=UTF-8?
 
 jaws
enterprise-beans
  entity
ejb-nameJamalSecurity/ejb-name
table-nameAR_SECURITY/table-name
create-tablefalse/create-table
cmp-field
  field-namesecurity_id_/field-name
  column-nameSECURITY_ID/column-name
/cmp-field
cmp-field
  field-nameusername_/field-name
  column-nameUSERNAME/column-name
/cmp-field
cmp-field
  field-namepassword_/field-name
  column-namePASSWORD/column-name
/cmp-field

finder
   namefindByUsernamePassword/name
   queryusername_ = {0} AND password_ = {1}/query

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.

   order/order
/finder

 
  /entity
/enterprise-beans

datasourceOraclePool/datasource 
type-mappingOracle8/type-mapping 

  /jaws
 

Regards,
Roman

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] HELP - jboss and interbase

2001-06-13 Thread RRokytskyy

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 (debugtruedebug 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

2001-06-08 Thread RRokytskyy

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] CMP and CMT: when does the commit happen?

2001-05-23 Thread RRokytskyy

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



RE: [JBoss-user] automatically reloading servlet classes

2001-05-23 Thread RRokytskyy

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] Interbase 6 problem

2001-05-23 Thread RRokytskyy

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



[JBoss-user] Transactions: Required vs. RequiredNew

2001-05-21 Thread RRokytskyy

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



[JBoss-user] Any ideas: Upgrading CMP entity beans while preserving the data in the database?

2001-05-21 Thread RRokytskyy

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



RE: [JBoss-user] Beans in jsp

2001-05-18 Thread RRokytskyy

 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] Beans in jsp

2001-05-18 Thread RRokytskyy

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

2001-05-18 Thread RRokytskyy

 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] How To JBoss 2.1.1, Interbase 6.01, JDK1.3 on Suse Linux 7.0

2001-05-17 Thread RRokytskyy

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] How To JBoss 2.1.1, Interbase 6.01, JDK1.3 on Su se Linux 7.0

2001-05-17 Thread RRokytskyy

 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] Intrabean Call ?

2001-05-17 Thread RRokytskyy



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 GrĀnert 
  [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] select count(*) from ... during CMP bean creation

2001-05-15 Thread RRokytskyy

 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 JDBCcommand. 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



RE: [JBoss-user] Does it really needed the interfaces of the EJBHome and EJBObject subclasses to exist on the client side?

2001-05-15 Thread RRokytskyy

 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] How can I embed JDBC into JBOSS?

2001-05-15 Thread RRokytskyy

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] Unable to resolve JNDI name

2001-05-15 Thread RRokytskyy

 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] select count(*) from ... during CMP bean creatio n

2001-05-15 Thread RRokytskyy

 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] CMP finder method problem

2001-05-11 Thread RRokytskyy

 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:
jaws
  ...
  debugtrue/debug
  ...
/jaws

jboss.xml or standardjboss.xml in you CMP container configuration:

!-- prints the method invoked by container --
call-loggingtrue/call-logging 

in jboss.jcml in your datasource configuration:

mbean ...
  ...
  attribute name=LoggingEnabledtrue/attribute
/mbean


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] BUG?: when JAWS CMP field type is java.langObject

2001-05-11 Thread RRokytskyy

 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] Postgres woes

2001-05-10 Thread RRokytskyy

 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

2001-05-09 Thread RRokytskyy

 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



RE: [JBoss-user] 100,000 CMP entity beans

2001-05-08 Thread RRokytskyy

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)

2001-05-07 Thread RRokytskyy

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] External reference inside one jar

2001-05-04 Thread RRokytskyy

  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-ref-nameejb/guyr/DbSource/ejb-ref-name
Again, in my case that will be:
  ejb-ref-namejndi/guyr/DbSource/ejb-ref-name


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 ejb-name 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] Deployment problem.

2001-05-04 Thread RRokytskyy

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='Default'
 [Container factory] Container Invoker Server SocketFactory='Default'
 [Container factory] Container Invoker 

[JBoss-user] 100,000 CMP entity beans

2001-05-04 Thread RRokytskyy

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] Is it best to place business logic in EJB's or in database stored procedures?

2001-05-04 Thread RRokytskyy

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] External reference inside one jar

2001-05-03 Thread RRokytskyy

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 ejb-ref reference in the ejb-jar.xml and
appropriate ejb-ref 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 ejb-ref-name 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 ejb-ref-name).

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] Scalability question

2001-05-03 Thread RRokytskyy

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



RE: [JBoss-user] External reference inside one jar - SOLVED

2001-05-03 Thread RRokytskyy

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 ejb-ref reference in the ejb-jar.xml and
 appropriate ejb-ref 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 
 ejb-ref-name 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 ejb-ref-name).
 
 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