[JBoss-user] LOCKING-WAITING

2001-05-07 Thread Madhu

Hi,
  My application is getting hanged. When I tried to check what the
problem was, this is what I found in the server.log file. 


[TraceBean] user : In ClientSessionBean : setupClientSession : got reference 
to NMSSecurityIntf : m_loginSession : NMSSecurity.NMSSecurityIntfHome:989302630971

[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]
[SecurityConfigSettingsBean] LOCKING-WAITING (TRANSACTION) for id 1 ctx.hash 2232273 
tx:TransactionImpl:XidImpl [FormatId=257, GlobalId=localhost.localdomain//28, 
BranchQual=]

This is a small part of the server.log file. The above lines are printed some
lakhs of lines into the server.log file. The Bean which is shown here i.e.,
SecurityConfigSettingsBean is an EntityBean which is a BMP. I dont understand
why my application is getting hanged. Please help me out. Your help will be
appreciated.

I am using JBoss 2.1, Linux 7.0, JDK 1.3.1, Oracle 8

Regards,
Madhu

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



[JBoss-user] Need Help---urgent

2001-05-07 Thread Steve Zhang

hi folks;
When I want to get the Remote Interface by invoke the home Interace's create
function, I get the following the function:

 TRANSACTION ROLLBACK EXCEPTION:Could not instantiate bean; nested exception
is:
tantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInLogger
ManagerEJ
s:
erException: Could not instantiate bean; nested exception is:
tantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInLogger
ManagerEJ

 java.rmi.ServerException: Could not instantiate bean; nested exception is:
   java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignI

 java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInL

   at java.lang.Class.newInstance0(Native Method)
   at java.lang.Class.newInstance(Class.java:237)
   at
org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:106
)
   at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(Stateful
SessionInstanceIntercept

   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
   at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
   at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
   at
org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.j
ava:311)
   at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:143)
   at java.lang.reflect.Method.invoke(Native Method)
   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
   at sun.rmi.transport.Transport$1.run(Transport.java:142)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
   at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
   at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
43)
   at java.lang.Thread.run(Thread.java:484)

please help me!!
thank u very very much!

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



[JBoss-user] new Pet Store, new patch?

2001-05-07 Thread Mike Donnelly



Apparently, the new Pet Store 1.1.2 doesn't use the 'problematic' 
J2eeSecurityAdapter.  This got me to thinking that a new 
patch would not involve changes to the code or a recompile.  In 
this direction, I have been plodding along hoping to get the new store up and 
running with JBoss 2.2.1/Tomcat on Windows ME.  Being that I am new to all 
of this, a few things have slowed me down.  I am hoping that someone can rescue me 
- now that I am knee deep.  ;-)
 
My questions are:
 

In the web.xml file for pet store, what value should I use to 
reference the JBoss 2.2.1 server?  The previous patch 
used "JBoss 2.1 Pre  (www.jboss.org)" inside of 
.  My only guess has been to 
replace the "2.1 Pre" with a "2.2.1" but this has not worked.
 
The petstore.ear file seems to deploy fine (but I never scrutinized all of 
those messages yet).  Pointing my browser at http://localhost:8082 shows me a list of 
MBeans, but I see a pet store at http://localhost:8080.  By 
running "netstat -a", I even know that nothing is listening on that 
port.  How does Tomcat port get configured?  Any 
suggestions?
 
With respect to cloudscape, the patch said to simply start it.  The 
only way that I been able to do this is through Sun's J2EE server (i.e. 
"cloudscape -start").  How should I start cloudscape when using 
it with JBoss?
 
Anyways, thanks in advance for any help that I might get.
 
Cheers,
 
Mike Donnelly


[JBoss-user] Need Help!!--Why I can not create a simple session Bean

2001-05-07 Thread Steve Zhang

Hi, all:
When I creat a simple session bean, Until the narrow the ref to Home class
is successful but when I call the home to create the Remote Interface I meet
such exception:

[SignInLoggerManager] TRANSACTION ROLLBACK EXCEPTION:Could not instantiate
bean; nested exception is:
java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInLogger
ManagerEJ
B; nested exception is:
java.rmi.ServerException: Could not instantiate bean; nested
exception is:
java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInLogger
ManagerEJ
B
[SignInLoggerManager] java.rmi.ServerException: Could not instantiate bean;
nested exception is:
[SignInLoggerManager]   java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignI
nLoggerManagerEJB
[SignInLoggerManager] java.lang.InstantiationException:
com.rational.eda.avalanche.auction.business.SignInLoggerManager.SignInL
oggerManagerEJB
[SignInLoggerManager]   at java.lang.Class.newInstance0(Native Method)
[SignInLoggerManager]   at java.lang.Class.newInstance(Class.java:237)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:106
)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(Stateful
SessionInstanceIntercept
or.java:86)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[SignInLoggerManager]   at
org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.j
ava:311)
[SignInLoggerManager]   at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:143)
[SignInLoggerManager]   at java.lang.reflect.Method.invoke(Native Method)
[SignInLoggerManager]   at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[SignInLoggerManager]   at
sun.rmi.transport.Transport$1.run(Transport.java:142)
[SignInLoggerManager]   at
java.security.AccessController.doPrivileged(Native Method)
[SignInLoggerManager]   at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[SignInLoggerManager]   at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[SignInLoggerManager]   at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
43)
[SignInLoggerManager]   at java.lang.Thread.run(Thread.java:484)

Please help me...
Thanks very much!!

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



[JBoss-user] Jboss+Tomcat+JAAS

2001-05-07 Thread awc

Hi All,

I got jboss+jass to work. Standalone client can login and invoke the ejb
home + remote methods. Tomcat realm works too. But I cannot get tomcat +
jboss to work.
I do have few questions.

 do I have implement AppCallBackHandler+ LoginContext on each servlet??
or jboss takes care of it?

thanks

anil



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



Re: [JBoss-user] AutoDeployer J2eeDeployer DefaultDomainservice=W ebserver

2001-05-07 Thread Toby Allsopp

On Tue, May 08, 2001 at 01:10:03PM +1000, Warren Crossing wrote:
> ok when i set the webserver port to 80 ( already taken ) 
>  name="DefaultDomain:service=Webserver">
> 80
> 
> 
> i got my permission denied error.. but then the J2eeDeployer worked ok &
> beans deployed.. yay!
> 
> why does the j2eedeployer 
> 
> --422 
>   Iterator it = _d.webModules.iterator ();
>   while (it.hasNext ()){ 
>   .. deploy to webservice and cause problems !!
>   }
> --440
> 
> is this a bug should _d contain webservice.. will look into it =0

The WebService MBean is small HTTP server used for serving classes to remote
clients.  The deployer wants to tell this service about the classes that it
is deploying.

Problem: it hurts when I comment out the WebService MBean.
Solution:  don't comment out the WebService MBean.

Toby.

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



Re: [JBoss-user] how to run JSPs using JBOSS

2001-05-07 Thread Guy Rouillier

JBoss itself is not a JSP engine.  You need something like Tomcat.  There is
a version of JBoss with embedded Tomcat on the JBoss site, or you can
download a standalone Tomcat from jakarta.apache.org.

- Original Message -
From: "Dhiraj Sharan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 7:33 PM
Subject: [JBoss-user] how to run JSPs using JBOSS


> Hi,
> I want to load a JSP page using JBOSS. How do I do it? Where do I put the
> jsp file on the server ?
> At what port is the webserver running?
> Any help would be great.
> thanks,
> Dhiraj.
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


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



Re: [JBoss-user] EJB question

2001-05-07 Thread Ralph Jensen


- Original Message -
From: Jim Archer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: Ralph Jensen <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 4:03 AM
Subject: Re: [JBoss-user] EJB question


> Hi Ralph...
> ...

> > Actually, the original question came up in this context:
> >
> > I am developing a collaborative application which stores the
contributions
> > of participants in a database. These contributions could be text
messages
> > or other objects, stored as blobs. None of the individual elements will
be
> > useful as a primary key and thus I thought, why not let the database
> > create a unique key. My original question arose from the fact that an
EJB
> > needs to know the primary key in order to return it and my assumption
> > that I have to call create(...) on an EJB in order to insert new data.
>
> I'm not sure what you mean by the EJB needs to know the primark key to
> return it... All your entity beans need to have a primary key, but your
> home interface can have finder methods that don't need the primary key.

As danch said: ejbCreate needs to know it, because it must return it,
according to spec. What actually happens, if it doesn't?

>>If
> you have different people making contributions, then you are probably (my
> poor assumption) going to need a way to tell who made what? So you can
> search by the username field or something like that to get vack a
> COllection of all the entity beans that have that username.
>
I was thinking of a function like sendContribution( Object content,
clientID, somethingElse ); or possibly two: sendText( String text,
clientID, ... ) and sendBinary( Object content, clientID, ... ) if I want
to have different tables for text and non-text contributions.
The question now is, where these methods should be located. If I understand
you correctly, you say that's a session bean.

> You can do this with ny field, of course, although I'm not exactly sure
how
> it would work with a BLOB.
>
The searching then would have to be done depending on the choice above.


> > But I could also do it this way:
> >
> > I have an EJB which represents one collaborative session - let's call
it a
>
> I'm not sure what a collaborative session is - one record or many? I
think
> you mean it would be a bunch of entity beans...
>
Somebody has to create a conference. That is done by entering a record into
a database, with fields like topic, starttime, endtime and other
configurable items, plus a 'status' column that tells if the conference is
in process or not. The collaborative session is then that one record
represented by one entity bean.

> > Conference. It represents a record in a table called conferenceTable.

>> ...
> >
> > I can add methods to my Conference bean like Conference.sendText( text,
> > client ) or Conference.sendOtherStuff( blob, client ) and then within
> > these methods do INSERTs into another table which hold the
contributions
> > of participants, somehow like this:
>
I meant to add the one or two contribution methods to the above entity bean
representing the conference.

> First, the issue of an API for the other code. Generally, a good EJB
design
> will use a session bean to access entity beans. Your busines logic would
go
> into the session bean, so methods that create new data, manipulate
existing
> data and so on would go here. This presents a nice API to the rest of the
> code that you can change the implementation of.
>
> So the session bean might have a method like sendText(text, client)
>
So you mean, the contribution methods would go into a session bean?
The session bean would check, if the conference is in process by accessing
above ConferenceBean, (then check some other stuff accessing some other
beans ...) and THEN: write the contribution into a table without using an
entity bean in order to circumvent the primary key issue, which started
this discussion. Meaning, if I use and ejbCreate(...) method that ejbCreate
needs to return the primary key, but I want the database to asign it and
there is no portable way to get it into the bean.

> Now, the issue of the data and how its related. It seems like you are
> talking about having two entity beans. One to represent the person (or
> client?) making the contribution. This EB might have fields to identify
> that person. Next, you have an EB to represent the contribution. This EB
> might have a field to home the contribution, like a BLOB field. It would
be
> easy if you hade only one contributiun type, but if you have multiple
types
> (text, binary) you may want to look at multiple EBs for each type.
>
I was thinking of two contribution types because a participant can send
either text or non-text. Having one contribution type seems to indicate
that I each record needs to have columns for text and BLOBs while at any
time only one will be used.

> So, your session bean would be handed the user id of the contributor and
> the contribution and told to make a new EB to represent the contribution.
To make a new

RE: [JBoss-user] AutoDeployer J2eeDeployer DefaultDomainservice=Webserver

2001-05-07 Thread Warren Crossing

ok when i set the webserver port to 80 ( already taken ) 

80


i got my permission denied error.. but then the J2eeDeployer worked ok &
beans deployed.. yay!

why does the j2eedeployer 

--422 
Iterator it = _d.webModules.iterator ();
while (it.hasNext ()){ 
.. deploy to webservice and cause problems !!
}
--440

is this a bug should _d contain webservice.. will look into it =0


-Original Message-
From: Warren Crossing [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 8 May 2001 12:01 PM
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] AutoDeployer J2eeDeployer
DefaultDomainservice=Webserver


hi, sorry if i am going over old ground, but i have a issue with jboss 2.2.1
forcing me to use a webserver for the j2eedeployer to work.

i'm looking into the code because i dont have a war in the deploy
directory.. or an application.xml.  the only thing it could be trying to
deploy is the remote interfaces ( Remote&Home ) i'll look at
AutoDeployer.deploy and then debug 


if i comment the webserver mbean in jboss.cml
stacktrace:
..
[Container factory] javax.management.InstanceNotFoundException:
DefaultDomain:service=Webserver
.. 
[Container factory] at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:435)
[Container factory] at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:178)
..
[Container factory] at
org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
[Container factory] at
org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)
[Container factory] at
org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:332)

any comments.. thank you =)

___
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] AutoDeployer J2eeDeployer DefaultDomainservice=Webserver

2001-05-07 Thread Warren Crossing

hi, sorry if i am going over old ground, but i have a issue with jboss 2.2.1
forcing me to use a webserver for the j2eedeployer to work.

i'm looking into the code because i dont have a war in the deploy
directory.. or an application.xml.  the only thing it could be trying to
deploy is the remote interfaces ( Remote&Home ) i'll look at
AutoDeployer.deploy and then debug 


if i comment the webserver mbean in jboss.cml
stacktrace:
..
[Container factory] javax.management.InstanceNotFoundException:
DefaultDomain:service=Webserver
.. 
[Container factory] at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:435)
[Container factory] at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:178)
..
[Container factory] at
org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:358)
[Container factory] at
org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221)
[Container factory] at
org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:332)

any comments.. thank you =)

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



Re: [JBoss-user] DataSource problems solved.

2001-05-07 Thread Toby Allsopp

On Mon, May 07, 2001 at 07:16:33PM -0600, Dave King (WebEKG) wrote:
> Thanks Guy.  
> 
> Any chance we could have something like this added to the faq or the how
> twos?
> 
> How to get a DataSource from a pool via JNDI.
> 
> 1) get your pool installed (see existing docs)
> 
> 2) Hard code the name of the pool.
> this is the quick and dirty way.
> 
> in ejb-jar.xml you need something like 
> 
>   
>   SequenceBean
>   demo.ejb.SequenceHome
>   demo.ejb.Sequence
>   demo.ejb.SequenceBean
>   Stateless
>   Container
>   
>   the db for key
> sequences
>   
> java:/SQLServerPool
>   javax.sql.DataSource
>   Container
>   
>   
> 
> the important part is res-ref-name, where SQLServerPool is the name of your

This resource-ref section does nothing for you.  If you want the quick and
dirty way, don't even bother telling the deployer about it.

> pool.  In jboss.jcml your pool mbean starts looks like.
>  name="DefaultDomain:service=XADataSource,name=SQLServerPool">
> the important part (for our purpose here) is 
> name=SQLServerPool"
> 
> your code should look something like
>   
>   InitialContext context = new InitialContext();
>   DataSource ds = (DataSource)context.lookup("java:/SQLServerPool");
>   
> test.
> 
> 3) Move up a level of indirection with jboss.xml
>jboss.xml need to be beside ejb-jar.xml in meta-inf
>for a new project all it needs is
> 
> 
>   
>   
>   java:/SQLServerPool
>   jdbc/sequence
>   
>   
>

You're missing a level of indirection here.  I forget the details, but the
DTD is fairly clear.

Toby.

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



RE: [JBoss-user] Anyone know how to federate across multiple jnp ...

2001-05-07 Thread Sam Yan

I believe that I am close, but I still have no cigar.  Having read most of
the jnp code, I realize that JNP has implemented LinkRef and not Reference
as I first thought.  In looking through org.jnp.client.Mail, I see that
LinkRef is supportted and that the use of it is to bind a LinkRef object
with an embedded URL.  This URL may start with jnp://somemachine:someport.

So I run an experiment with 2 separate instances of JBoss running on the
same machine and I have Naming enabled on two different ports (1099, 1098).
I basically do a bind of:

  env = new Hashtable();
  env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
  env.put(Context.PROVIDER_URL, "syan.zantaz.com:1099");
  env.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");

InitialContext ic = new InitialContext(env);

... create a couple of intermediate levels of name foo ...
... create a NamingContext nc pointing to foo ...

nc.bind("linksomewhere", new
LinkRef(jnp://syan.zantaz.com:1098/foo1));  // this already exists

... later in the code I do ...

Context ctx = ic.lookup("foo/linksomewhere");

At this point, I am getting the following exception.  Am I using this
incorrectly?

javax.naming.NameNotFoundException: foo1 not bound  
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)   
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)  
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:298)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:282)

at javax.naming.InitialContext.lookup(InitialContext.java:350)  
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:370)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:282)

at javax.naming.InitialContext.lookup(InitialContext.java:350)  
at com.zantaz.base.temp.Test6.run(Test6.java:89)
at com.zantaz.base.temp.Test6.main(Test6.java:21) 

In walking through the code, it looks like env for the InitialContext is
reapplied for LinkRef.  This seems incorrect to me, but I don't claim to
understand everything.

Sam

-Original Message-
From: Scott M Stark [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 11:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Anyone know how to federate across multiple
jnp ...


jnp is the name of the jndi provider used by JBoss and is the protocol
url just as t3 is the weblogic's.
The jnp.properties file is used as the default values. If you don't set the
port
values via the NamingService mbean attributes then the jnp.properties file
is used.

This jboss.jcml entry:
  
along with this jnp.properties file:
### JNP server configuration
jnp.port=1299
jnp.rmiPort=0

results in the naming service starting on port 1299:

...
[Naming] Starting
[Naming] Starting jnp server
[Naming] Started jnpPort=1299, rmiPort=0
[Naming] Naming started on port 1299
[Naming] Started

The

- Original Message - 
From: "Guy Rouillier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 10:53 AM
Subject: Re: [JBoss-user] Anyone know how to federate across multiple jnp
...


> > Properties env = new Properties();
> > env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory");
> > env.setProperty(Context.PROVIDER_URL,
> "jnp://localhost:1099");
> > env.setProperty(Context.URL_PKG_PREFIXES ,
> "org.jboss.naming:org.jnp.interfaces");
> > InitialContext ctx = new InitialContext(env);
> 
> I left this in jboss.jcml:
> 
>   
>name="DefaultDomain:service=Naming">
> 1099
>   
> 
> and changed jnp.properties to this:
> 
> jnp.port=1299
> jnp.log=true
> 
> My client could connect with this in its jndi.properties file:
> 
> java.naming.provider.url=w2k-pro  OR
> java.naming.provider.url=w2k-pro:1099
> 
> but failed when I put this in jndi.properties:
> 
> java.naming.provider.url=jnp://w2k-pro:1299
> 
> with the following error:
> 
> Exception caught: javax.naming.ServiceUnavailableException: jnp [Root
> exception
> is java.net.UnknownHostException: jnp]
> 
> Obviously, I'm confused.
> 
> (1) What is the relationship between jnp and jndi?
> (2) When is jnp used?  In the default configuration, I only see the naming
> service specified in the jboss.jcml mbean started, as follows:
> 
> [Naming] Starting
> [Naming] [Naming] Started on port 1099
> [Naming] Naming started on port 1099
> [Naming] Started
> 
> When does jnp come into play, and when does jnp.properties get used?
> 



___
JBoss-user mailing list
[EMAIL PROTEC

Re: [JBoss-user] Transaction blocks forever, LOCKING-WAITING

2001-05-07 Thread Georg Rehfeld

Hi all,

> since my original posting I upgraded from 2.1 BETA binary
> distribution to the 2.2.1 binary distribution of JBoss and
> testet again:
>
> The problem essentially remains, the sequence of accesses has
> changed a little, I can now access several beans in the first
> place, but after a short while I again get a block in the JNDI
> lookup() method followed by a transaction timeout message but
> with no exception raised. The entity bean remains associated
> with the transaction for ever; the next access to it again
> produces the millions of 'LOCKING-WAITING (TRANSACTION)'
> messages and only a server shutdown helps. ...

Further investigation gave me the following stack trace while the
JNDI context lookup() hung. I had a look at the relevant JBoss
sources, but sorry, I don't understand what's going on. Might be
the authors of the sources have a clue?

"Thread-13" prio=5 tid=0x7d68f8 nid=0x7c0 runnable [0x9c3e000..0x9c3fdc4]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at java.io.DataInputStream.readByte(DataInputStream.java:222)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)
at
sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:323)
at
sun.rmi.transport.DGCClient$EndpointEntry.registerRefs(DGCClient.java:270)
at sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:109)
at sun.rmi.transport.LiveRef.read(LiveRef.java:267)
at sun.rmi.server.UnicastRef2.readExternal(UnicastRef2.java:57)
at java.rmi.server.RemoteObject.readObject(RemoteObject.java:203)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2213)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1410)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.readExternal(GenericProxy
.java:166)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.readExternal(HomeProxy.java:
265)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.rmi.MarshalledObject.get(MarshalledObject.java:138)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
de.ai.glass.ejb.ProfileBean.getAreas(de/ai/glass/ejb/ProfileBean.java:138)
at java.lang.reflect.Method.invoke(Native Method)
at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.ja
va:722)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron
izationInterceptor.java:208)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:186)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19
0)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:482)
at
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:14
6)
at $Proxy5.getAreas(Unknown Source)
at
de.ai.glass.servlet.test.ProfileTest.doGet(de/ai/glass/servlet/test/ProfileT
est.java:271)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.t

[JBoss-user] DataSource problems solved.

2001-05-07 Thread Dave King (WebEKG)

Thanks Guy.  

Any chance we could have something like this added to the faq or the how
twos?

How to get a DataSource from a pool via JNDI.

1) get your pool installed (see existing docs)

2) Hard code the name of the pool.
this is the quick and dirty way.

in ejb-jar.xml you need something like 


SequenceBean
demo.ejb.SequenceHome
demo.ejb.Sequence
demo.ejb.SequenceBean
Stateless
Container

the db for key
sequences

java:/SQLServerPool
javax.sql.DataSource
Container



the important part is res-ref-name, where SQLServerPool is the name of your
pool.  In jboss.jcml your pool mbean starts looks like.

the important part (for our purpose here) is 
name=SQLServerPool"

your code should look something like

InitialContext context = new InitialContext();
DataSource ds = (DataSource)context.lookup("java:/SQLServerPool");

test.

3) Move up a level of indirection with jboss.xml
   jboss.xml need to be beside ejb-jar.xml in meta-inf
   for a new project all it needs is




java:/SQLServerPool
jdbc/sequence


   

modify ejb-jar.xml 

SequenceBean
demo.ejb.SequenceHome
demo.ejb.Sequence
demo.ejb.SequenceBean
Stateless
Container

the db for key
sequences
jdbc/sequence
javax.sql.DataSource
Container



modify your code, (SequenceBean in this example)

InitialContext context = new InitialContext();
DataSource ds =
(DataSource)context.lookup("java:comp/env/jdbc/sequence");

notice that the name used in code "java:comp/env/jdbc/sequence" maps to the
name in the res-ref-name in 
ejb-jar.xml and res-name in jboss.xml. the res-name-jndi-name maps to the
name of the pool in jboss.jcml

test.

this worked for me on jBoss 2.2.1

-Peace
Dave

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Guy
> Rouillier
> Sent: Thursday, May 03, 2001 5:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] DataSource problems
> 
> 
> You need an entry like this in your jboss.xml that gets 
> jarred up with your
> ejb code:
> 
>   
> 
>   java:/sequence
>   jdbc/sequence
> 
>   
> 
> - Original Message -
> From: "Dave King (WebEKG)" <[EMAIL PROTECTED]>
> To: "Jboss-User@Lists. Sourceforge. Net" 
> <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 3:55 PM
> Subject: [JBoss-user] DataSource problems
> 
> 
> > Greetings
> >
> > I've got jBoss running with MS SQL server for CMP no problem. (The
> > documentation team should take a bow)  It's set as my default pool.
> >
> > But when I try to get a DataSource from the pool things get weird.
> >
> > If I start jBoss up I get this message
> >
> > [Container factory]
> > Deploying:file:/D:/JBoss-2.2.1/tmp/deploy/Default/demoejb.jar
> > [Verifier] Verifying
> > file:/D:/JBoss-2.2.1/tmp/deploy/Default/demoejb.jar/ejb1001.jar
> > [Container factory] Deploying CustomerBean
> > [Container factory] Deploying BenchMarkBean
> > [Container factory] Deploying SequenceBean
> > [JAWS] Table 'CustomerBean' already exists
> > [Container factory] No resource manager found for jdbc/sequence
> >
> > and if I run my client I get (first two lines are mine)
> > [SequenceBean] nextKey called
> > [SequenceBean] looking for java:comp/env/jdbc/sequence
> > [SequenceBean] javax.naming.NameNotFoundException: jdbc not bound
> > (stack trace deleted: it was long)
> >
> > What's odd is if I re-deploy while the server is running
> > I get
> > [Container factory]
> > Deploying:file:/D:/JBoss-2.2.1/tmp/deploy/Default/demoejb.jar/
> > [Verifier] Verifying
> > file:/D:/JBoss-2.2.1/tmp/deploy/Default/demoejb.jar/ejb1002.jar
> > [Container factory] Deploying CustomerBean
> > [Container factory] Deploying BenchMarkBean
> > [Container factory] Deploying SequenceBean
> > [JAWS] Table 'CustomerBean' already exists
> > [Container factory] Deployed application:
> > file:/D:/JBoss-2.2.1/tmp/deploy/Default/demoejb.jar/
> > [J2EE Deployer Default] J2EE application:
> > file:/D:/JBoss-2.2.1/deploy/demoejb.jar is deployed.
> >
> > and if I run the client, I get
> > [SequenceBean] nextKey called
> > [SequenceBean] looking for java:comp/env/jdbc/sequence
> > [SequenceBean] org.opentools.minerva.jdbc.xa.XAPoolDataSource@5d391d
> >
> > so I'm getting a data source b

Re: [JBoss-user] why i can't debug jboss2.2 in jbuilder?

2001-05-07 Thread Kar YEOW



You must also include %JBOSS_HOME%/tmp in your 
classpath for it to work.
Kar

  - Original Message - 
  From: 
  jikai51 
  To: jboss-user 
  Sent: Thursday, April 26, 2001 6:31 
  PM
  Subject: [JBoss-user] why i can't debug 
  jboss2.2 in jbuilder?
  
  I exactly follow the every things in the howto article of jboss doc.
  but jbuilder can't startup jboss, it said can't find the jboss tmp dir
  what's wrong?
  
  [J2EE Deployer Default] Initializing 
  [J2EE Deployer Default] Initialization failed 
  
  [J2EE Deployer Default] java.io.IOException: Failed to get /tmp.properties URL; Temporary directory does not exist! 
  


RE: [JBoss-user] Re: JAWS: Is this a bug, or is there another rational

2001-05-07 Thread Robert Schulz

I think streaming into postgres only works with the "Fasttrack" API.
Have a look at the postgres JDBC doc - there are a few examples how 
to do it and I played around with it a while ago and it worked well. 
I think you have to downcast the statment and then there is a large
object API.

As far as I remember, the methods on statement dealing with streams 
are not implemented - have a look at the source.

Cheers,

Robert.

> -Original Message-
> From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 8:57
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [JBoss-user] Re: JAWS: Is this a bug, or is there another
> rational
> 
> 
> Hi Chris,
> 
> On Tue,  8 May 2001 08:32, you wrote:
> > method on its home interface.  When JBoss attempts to 
> insert a row into
> > the database for this new bean instance, it calls
> > PreparedStatement.setBinaryStream() for a column and the JDBC driver
> > throws an exception saying that 'InputStream as parameter not
> 
> I think you'll find this might be to do with the Postgres 
> JDBC driver.  I'm 
> not sure, but I have found several areas where the driver 
> isn't fully flushed 
> out.  I'd try writing a straight JDBC insert that uses the 
> setBinaryStream() 
> method.  
> 
> Apologies if I'm wrong here.
> 
> cheers
> dim
> 
> ___
> 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] how to run JSPs using JBOSS

2001-05-07 Thread Dhiraj Sharan

Hi,
I want to load a JSP page using JBOSS. How do I do it? Where do I put the
jsp file on the server ?
At what port is the webserver running?
Any help would be great.
thanks,
Dhiraj.

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



Re: [JBoss-user] Transaction blocks forever, LOCKING-WAITING

2001-05-07 Thread Georg Rehfeld

Hi all,

since my original posting I upgraded from 2.1 BETA binary
distribution to the 2.2.1 binary distribution of JBoss and
testet again:

The problem essentially remains, the sequence of accesses has
changed a little, I can now access several beans in the first
place, but after a short while I again get a block in the JNDI
lookup() method followed by a transaction timeout message but
with no exception raised. The entity bean remains associated
with the transaction for ever; the next access to it again
produces the millions of 'LOCKING-WAITING (TRANSACTION)'
messages and only a server shutdown helps.

Are we doing it wrong, is a JNDI lookup inside a transactional
business method forbidden? Any other suggestions?

Thnaks in advance
my best regards

Georg
 ___   ___
| + | |__Georg Rehfeld  Woltmanstr. 12 20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]   +49 (40) 23 53 27 10


- Original Message -
From: "Georg Rehfeld" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 4:36 AM
Subject: [JBoss-user] Transaction blocks forever, LOCKING-WAITING


> Dear Helpers,
>
> while testing JBoss 2.1-BETA we experience this problem:
>
> the second sequence of calls (non concurrent) from a servlet to a
> bean blocks forever, the servlets doGet() Method never returns.
>
> - scenario (environment and config see below), shown is part of
>   the servlet doGet() method sequence (and the 1:N association
>   between Profile and Area)
>
> servletbean(BMP)   bean(BMP)
> +-+   +-+ 1  * +--+
> | ProfileTest |   | Profile |--| Area |
> +-+   +-+  +--+
>   #|  |
>   # findByPrimaryKey() |  |
>   #--->#  |
>   #|  |
>   # getData()  |  |
>   #--->#  |
>   #|  |
>   # getAreas() |  |
>   #---># jndiCtx.lookup("Area")
>   ##->
>   ##  |
>   ## findAreas()  |
>   ##->#
>   #|  |
>   # *getData() |  |
>   #-->#
>   ||  |
>
> First time the doGet() method completes fine and displays the one
> Profile and all the Areas associated, and so there should be no
> transaction open at all. However, when the servlet is invoked again
> (to access a different Profile) the call blocks in
> Profile.getAreas()-->jndiCtx.lookup("Area"), which is totally
> unexpected for us. Neither should be any transaction pending,
> since the first doGet() and all invoked bean methods completed
> successfully, nor we expected the JNDI context to be a transaction
> aware resource, at least the lookup() method is readonly.
>
> Nevertheless, we get, after a while, this log entry:
>  [Profile] Transaction XidImpl [FormatId=257, GlobalId=reathome//5,
>  BranchQual=] timed out. status=STATUS_ACTIVE
>
> But even after that message the Profile instance hangs waiting for
> the AreaHome reference from JNDI, the servlets doGet() method
> doesn't complete and the second Profile instance remains associated
> to a transaction. No exception is thrown, JBoss simply hangs around.
>
> When we after that try to access the first Profile bean again or
> some other Profile bean, surprise, surprise, all works fine again,
> all calls complete nicely, if there are associated Area instances
> or not and how many Profiles we try to access.
>
> But when we attempt to access the second Profile instance another
> time, we get that infamous 'LOCKING-WAITING (TRANSACTION)' log
> message with all the bad consequences (CPU usage > 90%, server.log
> grows immediately to tons of megabytes until out of disk space, only
> a JBoss shutdown helps, as this lock seems never to be released, but,
> please, don't focus your answers on this, there is help underway
> already, see this mailing list's archive and the PS2).
>
> Anyone out there, who can help or suggest? Thank you!
>
> --
>
> - relevant code:
>
> public class ProfileBean {
> ...
> /** Returns a Collection of Area beans. */
> public Collection getAreas() throws RemoteException {
> debug("getAreas()");
> if (areas == null) {
> AreaHome areaHome = null;
> try {
> Context ctx = new InitialContext();
> debug("getAreas(), looking up AreaHome");
> areaHome = (AreaHome)PortableRemoteObject.narrow(
> ctx.lookup("Area"), //<== HANGS HERE
> AreaHome.class
> );
> debug("getAreas(), finding areas for profile");
> areas =

[JBoss-user] Re: JAWS: Is this a bug, or is there another rational

2001-05-07 Thread Dmitri Colebatch

Hi Chris,

On Tue,  8 May 2001 08:32, you wrote:
> method on its home interface.  When JBoss attempts to insert a row into
> the database for this new bean instance, it calls
> PreparedStatement.setBinaryStream() for a column and the JDBC driver
> throws an exception saying that 'InputStream as parameter not

I think you'll find this might be to do with the Postgres JDBC driver.  I'm 
not sure, but I have found several areas where the driver isn't fully flushed 
out.  I'd try writing a straight JDBC insert that uses the setBinaryStream() 
method.  

Apologies if I'm wrong here.

cheers
dim

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



Re: [JBoss-user] re: jboss.jcml and jboss-auto.jcml

2001-05-07 Thread Guy Rouillier

Whenever you see the auto file and JBoss is not running, delete it.  It just
causes problems and is not needed.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 4:46 PM
Subject: [JBoss-user] re: jboss.jcml and jboss-auto.jcml


> How is jboss-auto.jcml being used.  When I changed jboss.jcml, the setting
> did not change until I deleted all entries in jboss-auto.jcml.  It also
> seems to run without jboss-auto.jcml file.
>
>
> ___
> 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] Error in ContainerFactory

2001-05-07 Thread Kadir Wijaya

Hi all,

I tried to recompile ContainerFactory Source code using Jbuilder4 and I got
the following errors:

ContainerFactory.java: Error 314: cannot access class
org.gjt.lindfors.pattern.StrategyContext; neither class nor source found for
org.gjt.lindfors.pattern.StrategyContext
ContainerFactory.java: Error 314: cannot access class
org.gjt.lindfors.util.EvenGenerator; neither class nor source found for
org.gjt.lindfors.util.EventGenerator.

Can anyone point out in which jar file that those two classes reside?

I'm using Jboss-2.2 with embedded Tomcat

cheers,
kadir


























NOTICE: The information contained in this electronic mail message and any
attachments is confidential to Pavilion Technologies, Inc. or one of its
subsidiaries and may contain proprietary information or be legally
privileged. This message and any attachments are intended only for the
personal and confidential use of the designated recipient(s). If you are not
the intended recipient or an agent responsible for delivering it to the
intended recipient, you are hereby notified that you have recieved this
message in error, and that any review, dissemination, distribution or
copying of this message and any attachments is unauthorized and strictly
prohibited. If you have received this message in error, please notify me
immediately by telephone and electronic mail, and delete this message, any
attachments, and all copies thereof. Thank you very much  



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



[JBoss-user] JAWS: Is this a bug, or is there another rational explanation.

2001-05-07 Thread Chris Rossi

Hello.  I have an entity bean.  Let's call it, Joemama.  It uses CMP. 
I'm trying to create an instance of that entity bean, so I call a create
method on its home interface.  When JBoss attempts to insert a row into
the database for this new bean instance, it calls
PreparedStatement.setBinaryStream() for a column and the JDBC driver
throws an exception saying that 'InputStream as parameter not
supported'.  I have a feeling JBoss might be trying to call
setBinaryStream() on a column for which setBinaryStream wouldn't make
sense.  In fact, the table definition for storing the Joemama bean,
created by JBoss using the PostGreSQL mapping is as follows:

Table "joemama"
 Attribute |  Type   | Modifier 
---+-+--
 version   | integer | 
 catalog   | text| 
 modified  | oid | 
 type  | oid | 
 created   | oid | 
 id| integer | 

It's not clear to me that you'd want to call setBinaryStream() on any of
those columns, but then again, I'm not sure about those oid columns. 
The actual stack trace from the server log looks like this:

[Joemama] BaseItemBean: ejbCreate()
[JAWS] InputStream as parameter not supported
[JAWS]  at
org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement.java:417)
[JAWS]  at
org.opentools.minerva.jdbc.PreparedStatementInPool.setBinaryStream(PreparedStatementInPool.java:252)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setParameter(JDBCCommand.java:326)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCreateEntityCommand.java:165)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:135)
[JAWS]  at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:122)
[JAWS]  at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:207)
[JAWS]  at
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[JAWS]  at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[JAWS]  at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
(snipped to protect the innocent reader from what in reality is a very
long call stack)

At any rate, I'm not really sure why this is happening or what I can do
about it.  It looks like it might be a bug in JBoss's CMP code, or it
may be the result of something screwy I've done.  Any ideas?

I've tried to run JBoss in jdb, but that didn't work for some reason. 
Hung when I asked it list threads.  I may download Forte and check out
that debugger.  

This is very strange, though, since I have another entity bean which is
effectively identical to Joemama, same table structure, same CMP fields,
and it works fine.  The table in the database is identical, the code in
the Bean class is identical, and I even copied the same deployment
descriptor and only changed the name.  Go figure.  If anybody has any
ideas, please let me know.  I'll include the deployment descriptor for
Joemama below.
 
Thanks,
Chris Rossi

   
  
An item
  
  Joemama
  com.webslingerZ.chutney.beans.JoemamaHome
  com.webslingerZ.chutney.beans.Joemama
  com.webslingerZ.chutney.beans.JoemamaBean
  Container
  
 
com.webslingerZ.chutney.beans.ItemPK
  False
  catalog
  version
  id
  type
  created
  modified
  
ejb/Catalog
Entity
com.webslingerZ.chutney.beans.CatalogHome
com.webslingerZ.chutney.beans.Catalog
Catalog
  
  
DataSource for the database
jdbc/PostgresqlTest
javax.sql.DataSource
Container
  


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



Re: [JBoss-user] re: jboss.jcml and jboss-auto.jcml

2001-05-07 Thread danch

[EMAIL PROTECTED] wrote:

> How is jboss-auto.jcml being used. 

In a very confusing fashion. 8^})

It's created when JBoss runs in order to preserve any changes made from 
the JMX administrative interfaces.


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



Re: [JBoss-user] EJB question

2001-05-07 Thread danch


Jim Archer wrote:


> 
>> Actually, the original question came up in this context:
>> 
>> I am developing a collaborative application which stores the 
>> contributions
>> of participants in a database. These contributions could be text messages
>> or other objects, stored as blobs. None of the individual elements 
>> will be
>> useful as a primary key and thus I thought, why not let the database
>> create a unique key. My original question arose from the fact that an EJB
>> needs to know the primary key in order to return it and my assumption
>> that I have to call create(...) on an EJB in order to insert new data.
> 
> 
> I'm not sure what you mean by the EJB needs to know the primark key to 
> return it.

ejbCreate must return the new instance's primary key. per spec.


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



Re: [JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread danch

Guy Rouillier wrote:

> This approach will not work reliably.  Between your insert of nextval and
> your select of currval, someone else may have inserted another row, such
> that your currval will actuall retrieve the wrong currval.  I suppose you
> could address this with synchronized, but a better way (IMO) is to retrieve
> the nextval into your code.  You can then use it for the insert and also no
> the value for any further use you may have, and not have to worry about
> multi-user issues.

I believe that Oracle guarentees isolation of sequence values between 
transactions - the value you get on from 'seq.nextval' will be what you 
(in the same transaction) get from the next 'seq.curval' regardless of 
what anybody does in another transaction.


> 
> We always wrap the sequence with a getter function, and this has saved our
> hides many times.  For example, let's say you start by using the sequence
> number as your primary key.  Then someone comes along and decides that they
> want the IDs to look like "CS1".   You may have to change code in
> several places if you just access the sequence directly, but if you wrap it
> in a getter function, you don't have to change anything but that getter
> function.
> 

Having said the above, I agree with your approach completely - I always 
get the sequence value first, within a RequiresNew transaction. This is 
also for portability - I'm not reliant on Oracle's semantics, and it's 
easy to port to PostgreSQL's sequence implementation or whatever you 
need to do in other databases.

-danch



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



[JBoss-user] Summary of SOAP options for JBoss users.

2001-05-07 Thread Ron Pfeifle


I've seen a number of messages about SOAP options for the
JBoss user, namely:  Apache SOAP,  GLUE,  ZOAP

Could anyone give a summary of their relative strengths and
weaknesses?  I'd like to know how each is progressing, how
easy they are to use, and how likely they are not to disappear
in future.

Thanks



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



Re: [JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread Victor Langelo

The currval column of a sequence in Oracle will always return the same value as
the last nextval in the current transaction. You should never have problems with
concurrent access by "someone else" unless you are not in a transaction. But I
have no idea how you'd achieve not being in a transaction in Oracle.

There is no need to retrieve the nextval in you bean before the insert. We used
the approach of retrieving currval after an insert for 10 years and have never
experienced a problem.

--Victor


Guy Rouillier wrote:

> This approach will not work reliably.  Between your insert of nextval and
> your select of currval, someone else may have inserted another row, such
> that your currval will actuall retrieve the wrong currval.  I suppose you
> could address this with synchronized, but a better way (IMO) is to retrieve
> the nextval into your code.  You can then use it for the insert and also no
> the value for any further use you may have, and not have to worry about
> multi-user issues.
>
> We always wrap the sequence with a getter function, and this has saved our
> hides many times.  For example, let's say you start by using the sequence
> number as your primary key.  Then someone comes along and decides that they
> want the IDs to look like "CS1".   You may have to change code in
> several places if you just access the sequence directly, but if you wrap it
> in a getter function, you don't have to change anything but that getter
> function.
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "Sacha Labourey" <[EMAIL PROTECTED]>
> Sent: Monday, May 07, 2001 3:36 PM
> Subject: Re: [JBoss-user] Oracle Sequences PK in Session bean
>
> >
> >
> > (Note that this is Oracle specific - ie. non portable)
> > I'm not sure if this will help, since it is not a Sesion bean as you
> asked,
> > but...
> >
> > This is the ejbCreate() method for an Entity Bean that I have come up with
> to
> > insert a new record into an Oracle Database Table where the primary key is
> > generated using a Sequence.
> >
> > After inserting the record, I get the current sequence number and set the
> > Primary Key to it.  I originally tried to do this step in the
> ejbPostCreate(),
> > but I needed to obtain the value for the Primary Key prior to returning
> from the
> > ejbCreate().
> >
> >
> >
> > I hope that this helps
> >
> >
> >
> > Tim
> >
> >
> > public ValidationRulePK ejbCreate(long attrID, int validationID, String
> name,
> > byte validationType) throws CreateException, SQLException
> > {
> >  ValidationRulePK primaryKey = new ValidationRulePK();
> >  // Validate the parameters, throw a CreateException on error.
> >  if ((attrID < 1) || (validationID < 1) || (name == null) ||
> >  (validationType != 'L' && validationType != 'R' && validationType !=
> 'T'))
> >  {
> >   throw new CreateException("Invalid Parameters");
> >  }
> >  this.AttrID = attrID;
> >  this.ValidationID = validationID;
> >  this.Name = name;
> >  this.ValidationType = validationType;
> >  try
> >  {
> >   openConnection();
> >   // Insert a new (non-blank) entry in the database
> >   pStatement = con.prepareStatement("insert into VALIDATION_RULE "
> +
> >"(RULE_ID, ATTR_ID, VALIDATION_ID, NAME, VALIDATION_TYPE) "
> +
> >"values  (ValidationRuleSeq.nextval, ?, ?, ?, ?)");
> >   pStatement.setLong(1, AttrID);
> >   pStatement.setInt(2, ValidationID);
> >   pStatement.setString(3, Name);
> >   pStatement.setByte(4, ValidationType);
> >   if (1 != pStatement.executeUpdate())
> >   {
> >log.error("Failed to insert record into VALIDATION_RULE");
> >   }
> >   else
> >   {
> >log.debug("Inserted record into VALIDATION_RULE");
> >   }
> >   // Get the Sequence number and timestamp just created
> >   pStatement = con.prepareStatement("select
> ValidationRuleSeq.currval
> > from dual");
> >   result = pStatement.executeQuery();
> >   if (result.next())
> >   {
> >primaryKey.RuleID = this.RuleID = result.getInt(1);
> >//
> >log.debug("RuleID: " + String.valueOf(this.RuleID));
> >   }
> >   else
> >   {
> >throw new EJBException();
> >   }
> >  }
> >  catch (SQLException se)
> >  {
> >   log.error("Failed to insert record into VALIDATION_RULE");
> >   log.exception(se);
> >   throw se;
> >  }
> >  finally
> >  {
> >   closeConnection();
> >  }
> >  return primaryKey;
> > }
> >
> > --- Original
> Message --
> > From: "Sacha Labourey" <[EMAIL PROTECTED]>
> > To: "jBoss-User Mailing List" <[EMAIL PROTECTED]>
> > Date: M

Re: [JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread Guy Rouillier

This approach will not work reliably.  Between your insert of nextval and
your select of currval, someone else may have inserted another row, such
that your currval will actuall retrieve the wrong currval.  I suppose you
could address this with synchronized, but a better way (IMO) is to retrieve
the nextval into your code.  You can then use it for the insert and also no
the value for any further use you may have, and not have to worry about
multi-user issues.

We always wrap the sequence with a getter function, and this has saved our
hides many times.  For example, let's say you start by using the sequence
number as your primary key.  Then someone comes along and decides that they
want the IDs to look like "CS1".   You may have to change code in
several places if you just access the sequence directly, but if you wrap it
in a getter function, you don't have to change anything but that getter
function.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Sacha Labourey" <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 3:36 PM
Subject: Re: [JBoss-user] Oracle Sequences PK in Session bean


>
>
> (Note that this is Oracle specific - ie. non portable)
> I'm not sure if this will help, since it is not a Sesion bean as you
asked,
> but...
>
> This is the ejbCreate() method for an Entity Bean that I have come up with
to
> insert a new record into an Oracle Database Table where the primary key is
> generated using a Sequence.
>
> After inserting the record, I get the current sequence number and set the
> Primary Key to it.  I originally tried to do this step in the
ejbPostCreate(),
> but I needed to obtain the value for the Primary Key prior to returning
from the
> ejbCreate().
>
>
>
> I hope that this helps
>
>
>
> Tim
>
>
> public ValidationRulePK ejbCreate(long attrID, int validationID, String
name,
> byte validationType) throws CreateException, SQLException
> {
>  ValidationRulePK primaryKey = new ValidationRulePK();
>  // Validate the parameters, throw a CreateException on error.
>  if ((attrID < 1) || (validationID < 1) || (name == null) ||
>  (validationType != 'L' && validationType != 'R' && validationType !=
'T'))
>  {
>   throw new CreateException("Invalid Parameters");
>  }
>  this.AttrID = attrID;
>  this.ValidationID = validationID;
>  this.Name = name;
>  this.ValidationType = validationType;
>  try
>  {
>   openConnection();
>   // Insert a new (non-blank) entry in the database
>   pStatement = con.prepareStatement("insert into VALIDATION_RULE "
+
>"(RULE_ID, ATTR_ID, VALIDATION_ID, NAME, VALIDATION_TYPE) "
+
>"values  (ValidationRuleSeq.nextval, ?, ?, ?, ?)");
>   pStatement.setLong(1, AttrID);
>   pStatement.setInt(2, ValidationID);
>   pStatement.setString(3, Name);
>   pStatement.setByte(4, ValidationType);
>   if (1 != pStatement.executeUpdate())
>   {
>log.error("Failed to insert record into VALIDATION_RULE");
>   }
>   else
>   {
>log.debug("Inserted record into VALIDATION_RULE");
>   }
>   // Get the Sequence number and timestamp just created
>   pStatement = con.prepareStatement("select
ValidationRuleSeq.currval
> from dual");
>   result = pStatement.executeQuery();
>   if (result.next())
>   {
>primaryKey.RuleID = this.RuleID = result.getInt(1);
>//
>log.debug("RuleID: " + String.valueOf(this.RuleID));
>   }
>   else
>   {
>throw new EJBException();
>   }
>  }
>  catch (SQLException se)
>  {
>   log.error("Failed to insert record into VALIDATION_RULE");
>   log.exception(se);
>   throw se;
>  }
>  finally
>  {
>   closeConnection();
>  }
>  return primaryKey;
> }
>
> --- Original
Message --
> From: "Sacha Labourey" <[EMAIL PROTECTED]>
> To: "jBoss-User Mailing List" <[EMAIL PROTECTED]>
> Date: Mon, 7 May 2001 18:40:06 +0200
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> Importance: Normal
> Subject: [JBoss-user] Oracle Sequences PK in Session bean
> Sender: [EMAIL PROTECTED]
> Precedence: bulk
> Reply-To: [EMAIL PROTECTED]
> List-Help: 
> List-Post: 
> List-Subscribe: ,
<
> mailto:[EMAIL PROTECTED]?subject=subscribe>
> List-Id: The JBoss User main mailing list

> List-Unsubscribe:
, <
> mailto:[EMAIL PROTECTED]?subject=unsubscribe>
> List-Archive: 

[JBoss-user] re: jboss.jcml and jboss-auto.jcml

2001-05-07 Thread akim

How is jboss-auto.jcml being used.  When I changed jboss.jcml, the setting
did not change until I deleted all entries in jboss-auto.jcml.  It also
seems to run without jboss-auto.jcml file.


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



Re: [JBoss-user] EJB question

2001-05-07 Thread Jim Archer

Hi Ralph...

--On Monday, May 07, 2001 4:36 PM +0800 Ralph Jensen <[EMAIL PROTECTED]> 
wrote:

> That probably means that java.sql can't do it. Even if it could, that
> wouldn't solve the problem with non-relational databases.


Right.


> Actually, the original question came up in this context:
>
> I am developing a collaborative application which stores the contributions
> of participants in a database. These contributions could be text messages
> or other objects, stored as blobs. None of the individual elements will be
> useful as a primary key and thus I thought, why not let the database
> create a unique key. My original question arose from the fact that an EJB
> needs to know the primary key in order to return it and my assumption
> that I have to call create(...) on an EJB in order to insert new data.

I'm not sure what you mean by the EJB needs to know the primark key to 
return it... All your entity beans need to have a primary key, but your 
home interface can have finder methods that don't need the primary key. If 
you have different people making contributions, then you are probably (my 
poor assumption) going to need a way to tell who made what? So you can 
search by the username field or something like that to get vack a 
COllection of all the entity beans that have that username.

You can do this with ny field, of course, although I'm not exactly sure how 
it would work with a BLOB.

> But I could also do it this way:
>
> I have an EJB which represents one collaborative session - let's call it a

I'm not sure what a collaborative session is - one record or many? I think 
you mean it would be a bunch of entity beans...

> Conference. It represents a record in a table called conferenceTable. In
> creation of this conference, all the issues discussed concerning
> uniqueness of keys are relevant. But because I create that only once I
> may even trouble the creator to enter a unique conference id. (Don't we
> all know it: "Your userid isnt unique. Try again. Suggestion:
> 'mk$rtio237k'. :-)". Then, during the session, participants will add a
> lot of information and that's where I want to minimize the effort for
> creating unique keys.
>
> I can add methods to my Conference bean like Conference.sendText( text,
> client ) or Conference.sendOtherStuff( blob, client ) and then within
> these methods do INSERTs into another table which hold the contributions
> of participants, somehow like this:

First, the issue of an API for the other code. Generally, a good EJB design 
will use a session bean to access entity beans. Your busines logic would go 
into the session bean, so methods that create new data, manipulate existing 
data and so on would go here. This presents a nice API to the rest of the 
code that you can change the implementation of.

So the session bean might have a method like sendText(text, client)

Now, the issue of the data and how its related. It seems like you are 
talking about having two entity beans. One to represent the person (or 
client?) making the contribution. This EB might have fields to identify 
that person. Next, you have an EB to represent the contribution. This EB 
might have a field to home the contribution, like a BLOB field. It would be 
easy if you hade only one contributiun type, but if you have multiple types 
(text, binary) you may want to look at multiple EBs for each type.

So, your session bean would be handed the user id of the contributor and 
the contribution and told to make a new EB to represent the contribution. 
You would then find the EB for the contributor, get its remote inteface 
(using a finder from its home object) and give the remote interfce to the 
contribution EB to relate the two.

EJB 1.1 does not handle these things very well if your using CMP, but thats 
being fixed in EJB 2.0.

> That table could be created with an AUTOINCREMENT (or similar, depending
> on the database) for the primary key and thus primary keys are generated
> transparently by the database during the INSERT. But I don't need to know
> it, because the INSERT is not performed in an ejbCreate() method and
> doesn't need to be returned.

Probably, you might want to look at using BMP for this contribution bean. 
Under BMP, you write all the database code with JDBC. When the bean is 
created the create method you wrote is called. You could create the record 
and let your database init the autoincrement field, then read it back. 
Also, you would handle the relationship using the PK rather than a 
serialized remote interface.

But I would not recomend that at all. I would recomend that you use a 
unique key genertor to create your key. If you don't you'll be heavily tied 
to whatever database you write this for. The java.rmi.server.UID class will 
generate a unique key for the machine your using, and you can add the IP 
address for global uniqueness.

If your just starting pout with this, you may want to look at EJB 2.0. The 
spec is not final yet, but its close. EJB 2.0 CMP h

Re: [JBoss-user] Imports on jsp with tomcat on jboss.

2001-05-07 Thread Eugene Gluzberg


I fixed one problem. I placed the non-EJB classes into a jar in the
WEB-INF/lib directory, and the import problem went away. However the
EJB-Home/EJB remote classes still have to remain in the ejb jar, so i did
not place them there. I got the following error.

Is this a bug? I seem to have the same issue with jboss/jetty. jsps compiler
should really get the common classpath, no?

[Jetty] Servlet Exception for
/contact/Contact.jsp?subtype=firstName&value=eugene
org.apache.jasper.JasperException: JASPER: Unable to compile class for
JSP/tmp/JettyContext10309.tmp/_0002fContact_0002ejspContact_jsp_0.java:69:
Class com.neomeo.contact.ejb.ContactsSource not found.
com.neomeo.contact.ejb.ContactsSource cSrc = null;
  ^
/tmp/JettyContext10309.tmp/_0002fContact_0002ejspContact_jsp_0.java:72:
Class com.neomeo.contact.ejb.ContactsSource not found.
cSrc= (com.neomeo.contact.ejb.ContactsSource)
 ^
2 errors




>
> From: "Scott M Stark" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: [JBoss-user] Imports on jsp with tomcat on jboss.
> Date: Mon, 7 May 2001 10:20:54 -0700
> Reply-To: [EMAIL PROTECTED]
>
> The jsp compiler only sees the classes in the WEB-INF/classes directory.
> This is a limitation of the jasper integration into tomcat.
>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



Re: [JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread tim . haley



(Note that this is Oracle specific - ie. non portable)
I'm not sure if this will help, since it is not a Sesion bean as you asked,
but...

This is the ejbCreate() method for an Entity Bean that I have come up with to
insert a new record into an Oracle Database Table where the primary key is
generated using a Sequence.

After inserting the record, I get the current sequence number and set the
Primary Key to it.  I originally tried to do this step in the ejbPostCreate(),
but I needed to obtain the value for the Primary Key prior to returning from the
ejbCreate().



I hope that this helps



Tim


public ValidationRulePK ejbCreate(long attrID, int validationID, String name,
byte validationType) throws CreateException, SQLException
{
 ValidationRulePK primaryKey = new ValidationRulePK();
 // Validate the parameters, throw a CreateException on error.
 if ((attrID < 1) || (validationID < 1) || (name == null) ||
 (validationType != 'L' && validationType != 'R' && validationType != 'T'))
 {
  throw new CreateException("Invalid Parameters");
 }
 this.AttrID = attrID;
 this.ValidationID = validationID;
 this.Name = name;
 this.ValidationType = validationType;
 try
 {
  openConnection();
  // Insert a new (non-blank) entry in the database
  pStatement = con.prepareStatement("insert into VALIDATION_RULE " +
   "(RULE_ID, ATTR_ID, VALIDATION_ID, NAME, VALIDATION_TYPE) " +
   "values  (ValidationRuleSeq.nextval, ?, ?, ?, ?)");
  pStatement.setLong(1, AttrID);
  pStatement.setInt(2, ValidationID);
  pStatement.setString(3, Name);
  pStatement.setByte(4, ValidationType);
  if (1 != pStatement.executeUpdate())
  {
   log.error("Failed to insert record into VALIDATION_RULE");
  }
  else
  {
   log.debug("Inserted record into VALIDATION_RULE");
  }
  // Get the Sequence number and timestamp just created
  pStatement = con.prepareStatement("select ValidationRuleSeq.currval
from dual");
  result = pStatement.executeQuery();
  if (result.next())
  {
   primaryKey.RuleID = this.RuleID = result.getInt(1);
   //
   log.debug("RuleID: " + String.valueOf(this.RuleID));
  }
  else
  {
   throw new EJBException();
  }
 }
 catch (SQLException se)
 {
  log.error("Failed to insert record into VALIDATION_RULE");
  log.exception(se);
  throw se;
 }
 finally
 {
  closeConnection();
 }
 return primaryKey;
}

--- Original Message 
--
From: "Sacha Labourey" <[EMAIL PROTECTED]>
To: "jBoss-User Mailing List" <[EMAIL PROTECTED]>
Date: Mon, 7 May 2001 18:40:06 +0200
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Importance: Normal
Subject: [JBoss-user] Oracle Sequences PK in Session bean
Sender: [EMAIL PROTECTED]
Precedence: bulk
Reply-To: [EMAIL PROTECTED]
List-Help: 
List-Post: 
List-Subscribe: ,   <
mailto:[EMAIL PROTECTED]?subject=subscribe>
List-Id: The JBoss User main mailing list 
List-Unsubscribe: , <
mailto:[EMAIL PROTECTED]?subject=unsubscribe>
List-Archive: 


Hello,

Does someone already has developped a session bean for JBoss which sole purpose
is to get an Oracle Sequence value from an underlying Oracle database? If it is
the case and you accept to share it, I take it with joice!

Just not to develop it twice... ;)

Thank you.

Cheers,




Sacha





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



Re: [JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread Jason Dillon

I wrote a SequenceManager SSB, which takes plug-able (Sequence DAO objects)
to access to underlying database.  It could definitely use some improvements,
like better value caching and such.  I would be willing to share it, but I
am not really sure where the appropriate place would be.

Perhaps a contrib module?  Though that seems a little overkill for one SSB.

--jason

On Mon, 7 May 2001, Sacha Labourey wrote:

> Hello,
>
> Does someone already has developped a session bean for JBoss which sole purpose is 
>to get an Oracle Sequence value from an underlying Oracle database? If it is the case 
>and you accept to share it, I take it with joice!
>
> Just not to develop it twice... ;)
>
> Thank you.
>
> Cheers,
>
>
>
>
>   Sacha
>
>
> ___
> 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] Anyone know how to federate across multiple jnp...

2001-05-07 Thread Jason Dillon

Ok, I double checked (with the latest CVS JBoss), with the following:


from java.lang import *;
from java.util import *;
from javax.naming import *;

env = Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "jnp://reason.boldfish.com:1099");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
print env;

ctx = InitialContext(env);
print ctx

print ctx.lookup("java:/Mail");

ctx.close();


Using a classpath with the following:

jython.jar
activation.jar
mail.jar
jndi.jar
jboss-client.jar
jbosssx-client.jar
jbossmq-client.jar
jnp-client.jar

Will produce this output:


{java.naming.provider.url=jnp://reason.boldfish.com:1099,
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
javax.naming.InitialContext@30fc1f
Traceback (innermost last):
  File "/home/jason/tmp/test.py", line 14, in ?
javax.naming.ServiceUnavailableException: jnp.  Root exception is
java.net.UnknownHostException: jnp
at java.net.InetAddress.getAllByName0(InetAddress.java:571)
at java.net.InetAddress.getAllByName0(InetAddress.java:540)
at java.net.InetAddress.getByName(InetAddress.java:449)
at java.net.Socket.(Socket.java:100)
at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:102)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:763)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:340)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:158)
at org.python.core.PyMethod.__call__(PyMethod.java:83)
at org.python.core.PyObject.__call__(PyObject.java:272)
at org.python.core.PyInstance.invoke(PyInstance.java:275)
at org.python.pycode._pyx0.f$0(/home/jason/tmp/test.py)
at org.python.pycode._pyx0.call_function(/home/jason/tmp/test.py)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.Py.runCode(Py.java:1055)
at org.python.core.__builtin__.execfile(__builtin__.java:288)
at org.python.core.__builtin__.execfile(__builtin__.java:292)
at
org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155)
at org.python.util.jython.main(jython.java:159)

javax.naming.ServiceUnavailableException:
javax.naming.ServiceUnavailableException: jnp [Root exception is
java.net.UnknownHostException: jnp]



So I can create an InitialContext, but as soon as I try to lookup anything I
will get an exception.

--jason


On Sun, 6 May 2001, Jason Dillon wrote:

> I will check again.  I do belive that this will work, but I think that
> there might be a problem when it comes to using lookup() on the
> InitialContext.  I will try this again and let you know... I might be
> doing something wrong =)
>
> --jason
>
>
> On Sat, 5 May 2001, Scott M Stark wrote:
>
> > Its been about a week. Here is a simple test that works against the current cvs:
> >
> > jboss 722>cat tstNS.java
> > import java.util.Properties;
> > import javax.naming.*;
> >
> > class tstNS
> > {
> > public static void main(String[] args) throws NamingException
> > {
> > Properties env = new Properties();
> > env.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
>"org.jnp.interfaces.NamingContextFactory");
> > env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
> > env.setProperty(Context.URL_PKG_PREFIXES , 
>"org.jboss.naming:org.jnp.interfaces");
> > InitialContext ctx = new InitialContext(env);
> > System.out.println("Connected to JNDI");
> > }
> > }
> > jboss 723>java -classpath "/tmp/cvs/jboss/dist/client/jnp-client.jar;." tstNS
> > Connected to JNDI
> > jboss 724>
> >
> > Most likely your using a jndi.properties that does not include the 
>org.jnp.interfaces
> > package in the URL_PKG_PREFIXES if this does not work for you.
> >
> > - Original Message -
> > From: "Jason Dillon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, May 04, 2001 9:50 PM
> > Subject: Re: [JBoss-user] Anyone know how to federate across multiple jnp ...
> >
> >
> > > How recently was this added?  I am just curious, because the EJB handle
> > > impl that I added (for container remembrance) would not work if I set the
> > > url to jnp://:, I had to set it to :.
> > >
> > > --jason
> > >
> > > On Fri, 4 May 2001, Scott M Stark wrote:
> > >
> > > > This is an issue seperate from References of type URL, but the jnp
> > > > InitialContextFactory does now accept jnp urls passed in via the provider url
> > > > property.
> >
> >
> >
> > ___

Re: [JBoss-user] Anyone know how to federate across multiple jnp ...

2001-05-07 Thread Georg Rehfeld

Hi all,

Guy Rouillier wrote:

> Scott, thanks very much for the explanation.  The reason I am doing this
is
> that for security purposes, we want to move as much as possible off the
> standard ports (we'll have a firewall.)  Is there anywhere an
all-inclusive
> list of the ports that JBoss uses (out of the box - er, zip - I realize
> JBoss allows additional functionality to be plugged in), and how to change
> them? ...

A list of used ports can be found in the JBoss online docs at
http://www.jboss.org/documentation/HTML/ch10s03.html

regards

Georg
 ___   ___
| + | |__Georg Rehfeld  Woltmanstr. 12 20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]   +49 (40) 23 53 27 10



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



Re: [JBoss-user] Anyone know how to federate across multiple jnp ...

2001-05-07 Thread Guy Rouillier

Scott, I used this approach and it does as you say - thanks.  One more
question regarding jnp: is this protocol only used between 2 instances of
JBoss?  I tried to use jnp://myserver:1299 from a command line client, and
was told

Exception caught: javax.naming.ServiceUnavailableException: jnp [Root
exception
is java.net.UnknownHostException: jnp]

- Original Message -
From: "Scott M Stark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 2:41 AM
Subject: Re: [JBoss-user] Anyone know how to federate across multiple jnp
...


> jnp is the name of the jndi provider used by JBoss and is the protocol
> url just as t3 is the weblogic's.
> The jnp.properties file is used as the default values. If you don't set
the port
> values via the NamingService mbean attributes then the jnp.properties file
> is used.
>
> This jboss.jcml entry:
>   
> along with this jnp.properties file:
> ### JNP server configuration
> jnp.port=1299
> jnp.rmiPort=0
>
> results in the naming service starting on port 1299:



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



Re: [JBoss-user] HOWTO get web app relative file system path from a JSP (was (no subject))

2001-05-07 Thread Steve Swing


- Original Message -
From: "Felix Munoz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 4:25 am
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();
>


Did you try any of these scriptlets (using your example)?

<% File directory = new File(application.getRealPath("directory")) %>
<% File directory = new
File(application.getResource("directory").toExternalForm()) %>
<% application.getResourceAsStream("directory") %>

According to the documentation getResourceAsStream() will read resources
from a war file if it wasn't extracted during deployment. Some application
servers don't extract ears, wars, & jars during deployment unless you
instruct it to do so. This probably doesn't apply to your situation because
you're serving files from a directory.

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


I was going to suggest using something like the IO taglib from
Apache-Jakarta http://jakarta.apache.org/taglibs/index.html. Unfortunately
the IO taglib link on this page is broken. I don't know if it contains a tag
specifically for this purpose but it seems like the best candidate. Perhaps
you should write a tag library to list files. I suspect taglibs already
exist that do this. I just didn't know of any other taglib lists off-hand.

> Thanks in advance,
>
> Felix Munoz

I hope this is helpful.

Regards,

Steve Swing


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



Re: [JBoss-user] ClassCastException on forName ...

2001-05-07 Thread Toby Allsopp

On Mon, May 07, 2001 at 10:46:59AM +0200, Cumps Jef wrote:
> Hi all, 
> 
> i'm trying to acces a SQL Server database through a stateless session bean called 
>DCS. When i execute the following code, i get a ClassCastException. And i can't 
>figure out why !!
> 
> the driver is in my path and classpath, the name is checked and ok, ...
> 
>  code: 
> 
> try
> {
> String myDriver = "com.inet.tds.TdsDriver";
> String url = "jdbc:inetdae7://onuris.groept.be?database=JFK_CarTracker";
> String loginname = "name";
> String password = "password";
> 
> Class.forName(myDriver);
> Connection con = DriverManager.getConnection(url,loginname,password);

Don't get a JDBC connection like that.  Set up a DataSource and refer to it
using the java:comp/env JNDI context.  See the many examples of this all
over the place.

Toby.

> 
> ...
> 
> Does anyone has an idea of what i am missing ??? Any help would be really 
>appreciated !
> 
> Jef Cumps

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



Re: [JBoss-user] Callbacks with MessageDrivenBeans

2001-05-07 Thread QuKN


Not tested on JbossMQ, however, it should not. You have to use filter to
make sure of that. To make an instance-specific filter, I guess the worst
case is you need a IDgenerator (some discussions in this mailing before,
or, go to theserverside.com ), esp. if you have multiple instances of jboss
and jbossMQs. However, you may just use the string form of the ejb's
instance ID (not sure how unique it can last, should be longer thatn
30mins?)

Kai


   
   
<[EMAIL PROTECTED]>
   
Sent by:To: 
[EMAIL PROTECTED]  
[EMAIL PROTECTED]cc:
   
eforge.net  Subject: Re: [JBoss-user] 
Callbacks with MessageDrivenBeans   
   
   
   
   
05/07/2001 11:20 AM
   
Please respond to jboss-user   
   
   
   
   
   




Hi,

I've got a rather conceptual problem regarding Message-driven Beans.

I basically want to realise the following :
We have the two EJBs : ejbA ejbB and ejbC

ejbA has been asked by a client to execute its "askejbB" method.

ejbB is messagedriven, is notified of the request from ejbA, and finds out
that it needs information from ejbC.
It then contacts ejbC, which is also messagedriven.
ejbC may have to wait very long to provide the information, up to 30
minutes.
there are 3 instances from ejbB active at the moment, each of them is
respectively waiting for answer from 3 instances from ejbC.

so ejbB1, ejbB2, ejbB3, are waiting for ejbC1, ejbC2, ejbC3

the problem I have is with the notion of "topic" :
suppose ejbB1 is listening for the topic "order", to which the ejbC's are
writing to.

How can I guarantee that it will be instance-specific ?

Bye, Jubin



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





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



Re: [JBoss-user] oracle integration

2001-05-07 Thread Jon Culli

Vinay,

Thanks for the help.  After fooling around with this
for a few minutes I got it working.  Being new to
jboss, I don't think I would have found this solution
on my own.

Thanks again!!!

Jon
--- Vinay Menon <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> placed classes12.zip in jboss/lib/ext
> 
> - Good. That is required
> 
> modified in jboss.jcml:
>  name="DefaultDomain:service=JdbcProvider">
>  name="Drivers">oracle.jdbc.driver.OracleDriver,
> org.hsql.jdbcDriver,
> org.enhydra.instantdb.jdbc.idbDriver
> 
> 
> - Fine this should load the Oracle JDBC drivers
> 
> added in jboss.jcml:
> 
name="DefaultDomain:service=XADataSource,name=OracleDB">
> OracleDS
> 
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
>
jdbc:oracle:thin:@localhost:1521:chili
> scott
> tiger
> 
> 
> 
> - I'd suggest you copy paste the entire mbean tag of
> DefaultDS and change the values for Oracle. So
> name=OracleDS and PoolName = Oracle DS and the
> details   
> 
> [OracleDS] Starting
> [OracleDS] XA Connection pool OracleDS bound to
> java:/OracleDS
> [OracleDS] Started
> 
> So it is loading the datasource! You're a pro!
> 
> This is the last line in the doc for integrating
> with
> Oracle8.
> CMP Type Mapping Names (for jaws.xml): Oracle8
> Do I need to edit or add to standardjaws.xml?  Do I
> need to create another jaws file?
> 
> - Add a new jaws.xml  file in the META-INF
> directory. Specify the datasource as OracleDS there.
> There is no need to specify the type mappings...
> should work without them.
> 
> For eg a sample jaws.xml file would look like
> 
> 
> 
>   PartModelDS
>   
>   
>   
> false
> false
> true
> false
> 300
>   
> 
>   PartModelDetailEJB   
>   partmodel_detail
>   false
>   false
>   false
>   false
>   300
>   
> partid_master
>
> partid_master
>   
> locale
>
> locale
>   
> partdescription
>
>
partdescription
>  
> 
> 
> What should my MLet look like for Oracle8?
> 
> Don't need to do this. Any .zip or .jar file lib/ext
> will be loaded
> 
> Once I have this datasource configured, do I need to
> refer to it in my ejb-jar.xml or jboss.xml?
> 
> - Its in jaws.xml as given above
> 
> Let me know if you have any further problems.
> 
> VinayGet your FREE download of MSN
> Explorer at 
href="http://explorer.msn.com";>http://explorer.msn.com
> 


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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



Re: [JBoss-user] Callbacks with MessageDrivenBeans

2001-05-07 Thread Guy Rouillier

I'm  very new to mdb, but the classic approach to this problem is to include
instance data with the request, and then include that same instance data in
the response.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 1:20 PM
Subject: Re: [JBoss-user] Callbacks with MessageDrivenBeans


> Hi,
>
> I've got a rather conceptual problem regarding Message-driven Beans.
>
> I basically want to realise the following :
> We have the two EJBs : ejbA ejbB and ejbC
>
> ejbA has been asked by a client to execute its "askejbB" method.
>
> ejbB is messagedriven, is notified of the request from ejbA, and finds out
> that it needs information from ejbC.
> It then contacts ejbC, which is also messagedriven.
> ejbC may have to wait very long to provide the information, up to 30
> minutes.
> there are 3 instances from ejbB active at the moment, each of them is
> respectively waiting for answer from 3 instances from ejbC.
>
> so ejbB1, ejbB2, ejbB3, are waiting for ejbC1, ejbC2, ejbC3
>
> the problem I have is with the notion of "topic" :
> suppose ejbB1 is listening for the topic "order", to which the ejbC's are
> writing to.
>
> How can I guarantee that it will be instance-specific ?
>
> Bye, Jubin
>
>
>
> ___
> 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] Anyone know how to federate across multiple jnp ...

2001-05-07 Thread Guy Rouillier

Scott, thanks very much for the explanation.  The reason I am doing this is
that for security purposes, we want to move as much as possible off the
standard ports (we'll have a firewall.)  Is there anywhere an all-inclusive
list of the ports that JBoss uses (out of the box - er, zip - I realize
JBoss allows additional functionality to be plugged in), and how to change
them?  I know clients contact the naming service on 1099.  Does this work
like ftp, where the server will immediately spin off another port to carry
on the conversation so that 1099 stays free for the next client?  After
lookup is complete and client instantiates the ejb remote interface, is
there any way to know what port on the server side will be used for the ejb
to talk to the client?  Must we use a custom socket factory for that?

> This jboss.jcml entry:
>   
> along with this jnp.properties file:
> ### JNP server configuration
> jnp.port=1299
> jnp.rmiPort=0
>
> results in the naming service starting on port 1299:



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



Re: [JBoss-user] (no subject)

2001-05-07 Thread Guy Rouillier

You get an exhausted result set exception when you scroll past the end of
your result set and continue to try and extract results.  Make sure you are
using something like

while(rs.next())

so you don't overrun your result set.  Note this is a different exception
than you get if you try to do to many getString's from a single row.  In
that case, you'll get a Invalid Column Index error.

- Original Message -
From: "Indika Fernando" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 8:41 AM
Subject: [JBoss-user] (no subject)


> Hi everybody ...I am having a table of 22 fields and when I insert the
> fields into the table Using Jboss It gives an SQLException saying
Exhausted
> Resul set and after sometimes I got to know that if I used more than 9
> fields this Exception throws and If it is less than 9 fields NO EXCEPTION
is
> thrown .Is this a limitation of JBOSS server That means I can use
> only less than 9 fields Please I need a quick reply
> TIA
> INDI
>
>
> ___
> 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] Callbacks with MessageDrivenBeans

2001-05-07 Thread connecstasy

Hi,

I've got a rather conceptual problem regarding Message-driven Beans.

I basically want to realise the following :
We have the two EJBs : ejbA ejbB and ejbC

ejbA has been asked by a client to execute its "askejbB" method.

ejbB is messagedriven, is notified of the request from ejbA, and finds out
that it needs information from ejbC.
It then contacts ejbC, which is also messagedriven.
ejbC may have to wait very long to provide the information, up to 30
minutes.
there are 3 instances from ejbB active at the moment, each of them is
respectively waiting for answer from 3 instances from ejbC.

so ejbB1, ejbB2, ejbB3, are waiting for ejbC1, ejbC2, ejbC3

the problem I have is with the notion of "topic" :
suppose ejbB1 is listening for the topic "order", to which the ejbC's are
writing to.

How can I guarantee that it will be instance-specific ?

Bye, Jubin



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



Re: [JBoss-user] (no subject)

2001-05-07 Thread Guy Rouillier

We addressed this problem by doing the following (not saying this is an
optimal solution, but it is a solution).  We used this solution for a
different purpose - to achieve portability between Unix and NT platforms,
but it should work for you as well.

1)  In a well-known place in your document tree (i.e., somewhere where
Tomcat can see it), create a constants file.  We put it in
/common/html/globaldef.jsp.  In this file, have entries like this:

static final String aWarDir = "C:/JBoss/temp/deploy/MyWAR.war";

2)  In your JSP page, now include this file and use the string.  Yes, you
are still using a hard-coded directory, but you only have it in one place so
it is easy to manage.

3)  Because your web1005 directory changes each time you deploy, you'll have
to search for it relative to the known directory.

- Original Message -
From: "Felix Munoz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 4:25 AM
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] Imports on jsp with tomcat on jboss.

2001-05-07 Thread Scott M Stark

The jsp compiler only sees the classes in the WEB-INF/classes directory.
This is a limitation of the jasper integration into tomcat.

- Original Message - 
From: "Eugene Gluzberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 9:48 AM
Subject: [JBoss-user] Imports on jsp with tomcat on jboss.


> Hi all,
> 
> I am trying to do an import in a jsp:
> <%@ page import="com.company.blah.*" %>
> 
> And I get a "package not found in import" error on compilation of the jsp.
> 
> The jsp is part of a WAR, the class that I am trying to import is in a ejb
> jar that is part of the same EAR application.
> 
> The j2ee deployer sais "add all ejb jar files to the common classpath". What
> am I doing wrong here?
> 
> Does the jsp compiler not get the "common classpath"?
> Error output below.
> 
> Thanks for your help.
> Eugene.
> 



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



[JBoss-user] Imports on jsp with tomcat on jboss.

2001-05-07 Thread Eugene Gluzberg

Hi all,

I am trying to do an import in a jsp:
<%@ page import="com.company.blah.*" %>

And I get a "package not found in import" error on compilation of the jsp.

The jsp is part of a WAR, the class that I am trying to import is in a ejb
jar that is part of the same EAR application.

The j2ee deployer sais "add all ejb jar files to the common classpath". What
am I doing wrong here?

Does the jsp compiler not get the "common classpath"?
Error output below.

Thanks for your help.
Eugene.

[J2EE Deployer Default] Create application contact.ear
[J2EE Deployer Default] install module contact.jar
[J2EE Deployer Default] inflate and install module contact.war
[J2EE Deployer Default] add all ejb jar files to the common classpath
[J2EE Deployer Default] Starting module contact.war
2001-05-07 12:34:15 - ContextManager: Adding context Ctx( /contact )
[Container factory]
Deploying:file:/opt/jboss-tomcat-2.2/jboss-2.2/tmp/deploy/Default/contact.ea
r
[Verifier] Verifying
file:/opt/jboss-tomcat-2.2/jboss-2.2/tmp/deploy/Default/contact.ear/ejb1044.
jar
[Container factory] Deploying ContactEJB
[Container factory] Deployed application:
file:/opt/jboss-tomcat-2.2/jboss-2.2/tmp/deploy/Default/contact.ear
[J2EE Deployer Default] J2EE application:
file:/opt/jboss-tomcat-2.2/jboss-2.2/deploy/contact.ear is deployed.
2001-05-07 12:34:21 - Ctx( /contact ): JasperException: R( /contact +
/Contact.jsp + null) Unable to compile class for
JSP/opt/jboss-tomcat-2.2/jakarta-tomcat-3.2.1/work/localhost_8080%2Fcontact/
_0002fContact_0002ejspContact_jsp_0.java:14: Package com.neomeo.contact not
found in import.
import com.neomeo.contact.*;
   ^
1 error



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



[JBoss-user] Oracle Sequences PK in Session bean

2001-05-07 Thread Sacha Labourey

Hello,

Does someone already has developped a session bean for JBoss which sole purpose is to 
get an Oracle Sequence value from an underlying Oracle database? If it is the case and 
you accept to share it, I take it with joice!

Just not to develop it twice... ;)

Thank you.

Cheers,




Sacha


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



Re: [JBoss-user] EJB call other EJB

2001-05-07 Thread Guy Rouillier

There is a section in the online documentation that covers this subject, and
it pops up regularly on this mailing list.  Search the archives just for the
last week.

- Original Message -
From: "Saint-Martin Cecile" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 11:48 AM
Subject: [JBoss-user] EJB call other EJB


Hi,

I have a problem : EJB A is calling EJB B, they are deployed in different
jar files.
In ejb-jar.xml file of EJB A, i declared a reference to EJB B and create a
jboss.xml file to reference the jndi-name of EJB B.
When I call  EJB A, it try to call EJB B and i have a class not found
exception.
Do I need to include EJB B files into EJB A .jar file ?


Cécile Saint-Martin
[EMAIL PROTECTED]


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



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



RE: [JBoss-user] EJB question

2001-05-07 Thread Deadman, Hal

It looks like the code is in this distribution:
ftp://ftp.exolab.org/pub/castor/castor_0.9.2/castor-0.9.2-src.zip
from this page http://castor.exolab.org/download.html

Look for *KeyGen*.java. I haven't had a chance to try to use it and I don't
know if you can use it with CMP entity beans.

Hal

> -Original Message-
> From: Jim Archer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 3:30 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] EJB question
>
>
> Hal, were you able to find the actual source for this? I searched and
> searched last week with no luck...
>
> Jim
>
> --On Friday, May 04, 2001 8:33 AM -0400 "Deadman, Hal"
> <[EMAIL PROTECTED]> wrote:
>
> > Take a look at the key generator that comes with Exolab's Castor
> > (open-source). http://castor.exolab.org/key-generator.html
> >
> > You probably want something like their HIGH/LOW generator.
> I haven't used
> > it but I use a similiar technique that I wrote myself. I like their
> > implementation better because they let you use different key gen
> > techniques that you can specify in the config file without
> changing code.
> > They offer a max+1 option which you should stay away from
> b/c I don't see
> > how that could guarantee uniqueness.
> >
> > The castor high/low generator uses a database but it grabs
> a range of
> > values with each db hit so you don't hit the db everytime.
> >
> > Hal
> >
> >> -Original Message-
> >> From: Ralph Jensen [mailto:[EMAIL PROTECTED]]
> >> Sent: Friday, May 04, 2001 7:27 AM
> >> To: [EMAIL PROTECTED]
> >> Subject: Re: [JBoss-user] EJB question
> >>
> >>
> >> Thanks. But that is actually much more than I want. I only
> >> need a unique
> >> INT for primary keys.
> >>
> >> For the moment I will try this:
> >>
> >> In the sql-script:
> >>
> >> create table uniqueInteger(
> >> pk INTEGER constraint pk_unique primary key,
> >> uniqueID INTEGER
> >> );
> >>
> >> insert into uniqueInteger VALUES( 1, 1 );
> >>
> >>
> >> Then in the bean:
> >> SELECT uniqueID from uniqeInteger;
> >>
> >> save uniqueID in variable ( let's call it 'uniqueVar' )
> >>
> >> then:
> >>
> >> UPDATE uniqueInteger SET uniqueID = uniqueVar+1 WHERE pk = 1;
> >>
> >>
> >> I think that's basically Vinay's suggestion. Does that look
> >> reasonable?
> >> That's a lot of database access to get a unique primary key,
> >> just to be
> >> able to return it from ejbCreate() - especially in light of
> >> the fact, that
> >> databases do it automatically, if the table is created
> >> accordingly. Isn't
> >> this kind of thing done regularly?
> >>
> >>
> >> I know this has nothing to do with jBoss. Thank you.  :-)
> >>
> >> Ralph
> >>
> >> - Original Message -
> >> From: Jim Downing <[EMAIL PROTECTED]>
> >> To: <[EMAIL PROTECTED]>
> >> Sent: Friday, May 04, 2001 5:47 PM
> >> Subject: Re: [JBoss-user] EJB question
> >>
> >>
> >> > Check out www.activescript.co.uk for a non-free ($99)
> component to
> >> generate
> >> > unique ids. The author has also posted the pattern on
> >> theserverside.com,
> >> so
> >> > you have something to work to if you want to implement
> it yourself.
> >> >
> >> > jim
> >> >
> >> > - Original Message -
> >> > From: "Ralph Jensen" <[EMAIL PROTECTED]>
> >> > To: <[EMAIL PROTECTED]>
> >> > Sent: Friday, May 04, 2001 10:25 AM
> >> > Subject: Re: [JBoss-user] EJB question
> >> >
> >> >
> >> > > The portability would be there in terms of data access.
> >> How to tell the
> >> > > database to autoincrement when I create a table is
> probably always
> >> > database
> >> > > specific. Or not?
> >> > >
> >> > > I'm not good at SQL. So how would your suggestion look in
> >> code? What
> >> would
> >> > > the key generator bean look like? Off which table
> would it work?
> >> > >
> >> > > Ralph
> >> > >
> >> > > - Original Message -
> >> > > From: Vinay Menon <[EMAIL PROTECTED]>
> >> > > To: JBOSS <[EMAIL PROTECTED]>
> >> > > Sent: Friday, May 04, 2001 4:29 PM
> >> > > Subject: Re: [JBoss-user] EJB question
> >> > >
> >> > >
> >> > > Why don't you just use a primary key generator bean to
> >> encapsulate the
> >> key
> >> > > genaration? The ejbCreate can then work off that ejb and
> >> assign the
> >> > primary
> >> > > key field to the primary key generated field? so your
> >> autoincrement
> >> > > essentially will not be on the same table as the ejb but
> >> a different
> >> one
> >> > > and the primary key generator will work off that table.
> >> [Also makes
> >> sure
> >> > > that you have complete protability in terms of the
> >> database server!]
> >> > >
> >> > > Vinay
> >> > >
> >> > >
> >> > >
> >> > > - Original Message -
> >> > > From: Ralph Jensen
> >> > > Sent: Friday, May 04, 2001 8:52 AM
> >> > > To: [EMAIL PROTECTED]
> >> > > Subject: [JBoss-user] EJB question
> >> > >
> >> > >
> >> > > I asked this question elsewhere, but didn't get an answer. So:
> >> > >
> >> > > An entity bean's ejbCreate(...) method MUST return the
> >> primary key.
> >> That
> >> >

RE: [JBoss-user] EJB call other EJB

2001-05-07 Thread Vincent Harcq

Hi

> Hi,
>
> I have a problem : EJB A is calling EJB B, they are deployed in different
> jar files.
> In ejb-jar.xml file of EJB A, i declared a reference to EJB B and create a
> jboss.xml file to reference the jndi-name of EJB B.
> When I call  EJB A, it try to call EJB B and i have a class not found
> exception.
> Do I need to include EJB B files into EJB A .jar file ?

Yes, the Home and Remote interfaces of EJB B, you got the "data" from JNDI
but you still need the class that the "data" will fill.  An expert will
explain this with more difficult words, but that's the idea :)

>
>
> Cécile Saint-Martin
> [EMAIL PROTECTED]
>
>

Vincent.


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



[JBoss-user] small typo

2001-05-07 Thread Chree Haas

I think I've found a tiny typo in the JMSContainerInvoker plugin.  While
diagnosing
a configuration problem I saw JBoss throw a NullPointerExcpetion.
Digging down,
it looks like someone said '==' when they meant '!='...  (code relative
to 2.2.1)

--- jboss/src/main/org/jboss/ejb/plugins/jms/JMSContainerInvoker.java
Fri Mar
 2 09:57:58 2001
***
*** 351,357 
}

try {
!   if(connection != null)
connection.stop();
}catch(Exception cs) {
Logger.log("Could not stop JMSContainerInvoker consumer:" +
cs);
--- 351,357 
}

try {
!   if(connection == null)
connection.stop();
}catch(Exception cs) {
Logger.log("Could not stop JMSContainerInvoker consumer:" +
cs);

Chree



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



[JBoss-user] EJB call other EJB

2001-05-07 Thread Saint-Martin Cecile

Hi,

I have a problem : EJB A is calling EJB B, they are deployed in different
jar files.
In ejb-jar.xml file of EJB A, i declared a reference to EJB B and create a
jboss.xml file to reference the jndi-name of EJB B.
When I call  EJB A, it try to call EJB B and i have a class not found
exception.
Do I need to include EJB B files into EJB A .jar file ?


Cécile Saint-Martin
[EMAIL PROTECTED]


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



RE: [JBoss-user] why so little interest in SOAP

2001-05-07 Thread QuKN


For code that use ebXML but not soap, most of the function of the servlet
should moved to a MDB (or a Session Bean, but I like MDB) that behaves as a
workflow engine.

It seems that a lot of vendors (e.g. Weblogic, Sun) are doing such things
now, jboss need to do this ASAP, IMHO.

Kai



   
   
"James Cook"   
   
<[EMAIL PROTECTED]> To: 
<[EMAIL PROTECTED]>
Sent by:cc:
   
[EMAIL PROTECTED]Subject: RE: [JBoss-user] 
why so little interest in SOAP  
eforge.net 
   
   
   
   
   
05/04/2001 10:55 PM
   
Please respond to jboss-user   
   
   
   
   
   




At some point it should be easy to integrate xml-rpc or SOAP into jBoss as
a simple servlet. Some ppl have had success already, but not me yet.

At that point, I would think it would be a simple matter to expose any ejb
method by using a simple declarative file. The servlet could use simple
reflection to perform the lookup.

jim

 -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Vinay Menon
Sent: Friday, May 04, 2001 7:38 PM
To: JBOSS
Subject: Re: [JBoss-user] why so little interest in SOAP

 Hi,
I've been playing around with XML-RPC and SOAP for a while and think
 they are fairly decent in terms of the things they open up. But my
 apprehensions using XML have been - XML parsing is still non-trivial and
 resource intensive, they increase the amount of stuff passed over the wire
 and finally I really need to justify to myself the usefulness of an RPC
 mechanism!
Probably for B2B scenarios - YES. For integrating between disparate
 systems - YES. But to use it indiscriminately would be expensive. Most
 often the payload proves much smaller than the tags! EJBs based around an
 XML - RPC mechanism? Why? Where would you want to have that? Since the
 underlying data format is XML [i.e. Strings] we would need to go about
 creating objects and stuff from them and that is also expensive. I really
 can't see where you'd want to plug in an XML rpc mechanism into the EJB
 stuff. But as I said there might be some situations where you actually
 might want to look at SOAP as an option.

 My views. Your thoughts?

 Vinay

 - Original Message -
 From: fractals
 Sent: Saturday, May 05, 2001 12:27 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] why so little interest in SOAP

 Hi,

 This is just to say that I'm surprised not having read more about SOAP on
 this list. I read a little quite a while ago about this simple yet amazing
 technology, but I thought it was some kind of M$ thing and so got
 disinterested by it. Now that I've looked it from a bit closer, I think it
 really is a great thing ! Not only because it lets Java applications talk
 to
 all other platforms and languages, but also because of its capability to
 deploy web applications that behave as services (yeah, I know this is M$
 goo, but the word say it best). Apparently there's so little interest in
 this technology from the EJB community that the ZOAP project seems to be
 dead, and that the Apache SOAP team seems to be marginally interested in
 developing EJB support (they *did* work on that, but in my own short
 experience it works on windows and not on linux !!!).

 Because of the very little overhead associated with this kind of
 invocation
 (AFAIK), I think it could even be the default method for J2EE clients
 accessing remote EJB's, but that's just an idea...

 Somebody thinking like me ???

 Candide


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


 Get your FREE download of MSN Explo

[JBoss-user] Re: Strange behavior at start up...

2001-05-07 Thread Ralf Purnhagen

> Hermann RANGAMANA wrote:
> 
> Hi all,
> 
> I'm a newbie to jBoss... i'm testing it for a project.
> I observed a strange behavior of jBoss at startup... i added a data
> source at jboss.jcml using a postgresSQL jdbc connection, but have
> forgotten to add the jdbc driver for postgresql in the drivers
> section. At start up, jBoss prints :
> 
> [PostgreDS] Starting
> [PostgreDS] XA Connection pool PostgreDS bound to java:/PostgreDS
> 
> and then it hangs there indifinitely.
> 
> My questions :
> 1)-How is it possible that jBoss can create connections pool using
> postgresql, while the acurate driver is not even loaded?

JBoss can create a connection pool and bind it to an JNDI-name, but
it cannot connect to the database.

> 2)-Why jBoss hangs there? Why doesn't it just throw an exception,
> something like "Driver not found"?

JBoss hangs, because the database setup in your jboss.jcml contains
  true
change this to 'false' and JBoss should throw an exception or at
least return null.

You can enable a more verbose behavior by switching 
  false
to 'true'.

> 3)-How can i disable default data sources shipped with jBoss, like
> InstantDB and HyperSonic? I put in comment the  tag
> describing them at jboss.jcml, but they refuse to go away ... jBoss
> always attempt to bind them to java:/InstantDB and java:/DefaultDS

Have a look at jboss-auto.jcml and delete the corresponding parts.

Ralf

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



[JBoss-user] Re: JAAS Tutorial - sucess

2001-05-07 Thread awc

Hi,
I had hard time setting up this on jboss-2.2. It was that in
$JBOSS_HOME/conf/tomcat/jboss.properties file, you have to setup

java.security.auth.login.config=file:/usr/...   absolute path.

relative path does not work. If you set up relative path,  I am getting
message saying cannot find file:auth.conf, report this to container
developers.

anil


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



Re: [JBoss-user] Re: Unable to load a ResultSet column into a varable of type '[B'

2001-05-07 Thread Tom Green

I have wondered the same thing, and have been reluctant to use code in 
the 'sun.*' package.  I've used the O'Reilly package that you can 
download from the URL below, and it seems to work fine:

ftp://ftp.ora.com/pub/examples/java/crypto/files/oreilly/jonathan/util/

-Tom

On Friday 04 May 2001 06:39 pm, Luke Taylor wrote:
> Dmitri Colebatch wrote:
> > thanks for your help - a much simpler way of doing it...   I've
> > done this and it works fine with all the tests.  I just have a
> > question on Base64 (a bit green here) - is there an accepted
> > library that is the defacto norm for decoding/encoding?  I've found
> > on from
> > http://www.ruralnet.net/~kelley/java/Base64.java which seems ok,
> > but I was wondering if there was a commonly used encoder out there.
>
> If you're using Sun's JDK, then you can use
>
> sun.misc.BASE64Encoder
>
> Obviously not portable to other JVMs though.

-- 
-
Tom Green 244 Brighton Ave.
Director of Data Engineering  Allston, MA  02134
Digital Media On Demand, Inc. (DMOD)  USA
TEL: (617) 254-1024 x207  
FAX: (617) 254-0686   [EMAIL PROTECTED]
-

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



Re: [JBoss-user] problem with JNDI lookup...

2001-05-07 Thread David L Solomon

I got this to work by copying my ejb's jar file to JBOSS_HOME\lib\ext

I'm not sure why this is needed since this file is already in the deploy
directory.

Also, Can someone point me to a good resource to explain what .war and .ear
files are supposed to contain and what threir purposes are?


Thanks,
dave
- Original Message -
From: "David L Solomon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 2:16 PM
Subject: [JBoss-user] problem with JNDI lookup...


> I am running JBOSS 2.2 with embedded tomcat 3.2.1 on NT 4.0 sp6
>
> I have a test program which tests my ejb using the following code:
>
>
> // Get a naming context
>
> InitialContext jndiContext = new InitialContext();
>
> System.out.println("Got context");
>
> // This is in the case you use the jboss.xml to override the JNDI name
>
> Object ref = jndiContext.lookup("ValidateUser");
>
> System.out.println("Got reference");
>
> // Get a reference from this to the Bean's Home interface
>
> ValidateUserHome home = (ValidateUserHome) PortableRemoteObject.narrow
(ref,
> ValidateUserHome.class);
>
> // Create an Interest object from the Home interface
>
> ValidateUser l_ValidateUser = home.create();
>
> .// call beans methods here
>
>
>
>
>
> This works just fine.  However, when i call this exact same code from a
> servlet, I get the following exception ( thrown from the call to
> jndiContext.lookup("ValidateUser");) )
>
>
>
> Got context javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: database.ValidateUserHome]
>
>
>
>
>
> Finally, this works just fine from a servlet when i run (older versions
Pre
> 2.1 ) jboss and and tomcat 3.2.1 in separate JVMs.
>
> Thanks in advance for any help on this.
>
>
>
> dave
>
>
>
>
>
> ___
> 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] SOAP

2001-05-07 Thread Heitzso

Web services concept uses WSDL file to describe 
the service and SOAP as a transport protocol.  
That WSDL file is essentially your 'simple declarative file'.
You then register your service with a public or 
private UDDI registry via the WSDL file and 
your services/methods/functions/calls are available
to the world. 
 
My sense is ejb is the middle-tier machine and this
web services technology will provide b2b or 
xml portal or (how many buzz words can we throw
in here?).
 
Yes, parsing overhead and wrapper et al is not trivial 
so you don't use SOAP as a generic internal interface,
but I believe it will become a key platform neutral
external interface.  (BTW, I've seen references of
40-400 rough-rough-rough calls per second w/ SOAP).
 
Do we need to beat on this in jBoss now?  No.  As
others have noted it's just another external API into
our box.  
 
ALSO ALSO ALSO (wow), SOAP is keyed to XML Data
Schema and that's much more powerful than DTD, so
the parsers are having trouble.   Check out comparisons
of SOAP parsers.  For trivial stuff they play nice 
together.   But for arbitrarily complex input/output
forget it.  
 
I'm running my mouth/fingers, but this is an interesting
area for me.  
 
Heitzso

-Original Message-
From: James Cook [mailto:[EMAIL PROTECTED]]

 
At that point, I would think it would be a simple matter to expose any ejb
method by using a simple declarative file.
 
jim
 
 


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



[JBoss-user] Strange behavior at start up...

2001-05-07 Thread Hermann RANGAMANA



Hi all,
 
I'm a newbie to jBoss... i'm testing it for a 
project.
I observed a strange behavior of jBoss at 
startup... i added a data source at jboss.jcml using a postgresSQL jdbc 
connection, but have forgotten to add the jdbc driver for postgresql in the 
drivers section. At start up, jBoss prints :
 
[PostgreDS] Starting[PostgreDS] XA Connection 
pool PostgreDS bound to java:/PostgreDS
 
and then it hangs there indifinitely.
 
My questions :
1)-How is it possible that jBoss can create 
connections pool using postgresql, while the acurate driver is not even 
loaded?
2)-Why jBoss hangs there? Why doesn't it just throw 
an exception, something like "Driver not found"?
and last...
 
3)-How can i disable default data sources shipped 
with jBoss, like InstantDB and HyperSonic? I put in comment the  tag describing them at jboss.jcml, but they refuse to go away ... 
jBoss always attempt to bind them to java:/InstantDB and 
java:/DefaultDS
 
Thanks for your help.
 
--hermann


Re: Re: [JBoss-user] Need help to run a message bean; LookUp-call to ge

2001-05-07 Thread Cecilie Aulesjord

I have tried to add the JBoss file JBoss
home=>...\conf\default\jndi.properties file to my classpath both when
compiling and running client + using the "TopicConnectionFactory" LookUp
name in the simple client, but with no success. I checked that the global
JNDI-namspace 
+- TopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory)
exists in the JBoss AgentView(localhost:8082). Can't understand why the
client still fails to LookUp the connection factory. Any further suggestions
on what can be wrong/missing?
I have tested that I can LookUp a "topic/MyTopic" OK, but
"TopicConnectionFactory"-LookUp fails...
-Cecilie Aulesjord;)

Date: Mon, 7 May 2001 12:20:53 +0200 (CEST)
From: Peter Antman <[EMAIL PROTECTED]>
Subject: Re: [JBoss-user] Need help to run a message bean; LookUp-call to ge
 t TopicConnecti onFactory fails.
To: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

You have two problems:

1. You need to have a jboss.jndi in your classpath somewhere, for jndi
   to understand that it should be using jnp, eg:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming

2. You are using the wrong name for a topic connection factory. Do this
   instead for example:

public class Main {
   public static void main(String arg[]) {
 try {
   // Get access to JNDI
  Context context = new InitialContext();
 
   // Lookup the managed connection factory for a topic
   TopicConnectionFactory topicFactory =
  (TopicConnectionFactory)context.lookup("TopicConnectionFactory");
//This is the real JNDI name
 ?
//Peter
_
Cecilie Aulesjord
systemutvikler

Locus AS
Leif Weldingsvei 6-8
P.O.Box 2087
N- 3202 Sandefjord
Norway
http://www.locus.no/
E-mail: [EMAIL PROTECTED]  
Phone:  +47 33 48 42 00
Direct: +47 33 48 42 15
Fax:+47 33 48 42 01
Mobile: +47 47 62 32 15
_


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



[JBoss-user] (no subject)

2001-05-07 Thread Indika Fernando

Hi everybody ...I am having a table of 22 fields and when I insert the
fields into the table Using Jboss It gives an SQLException saying Exhausted
Resul set and after sometimes I got to know that if I used more than 9
fields this Exception throws and If it is less than 9 fields NO EXCEPTION is
thrown .Is this a limitation of JBOSS server That means I can use
only less than 9 fields Please I need a quick reply
TIA
INDI


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



RE: [JBoss-user] TRANSACTION ROLLBACK EXCEPTION:Could not activate

2001-05-07 Thread Schouten, Andreas

I assume, that the session object was destroyed while the exception occur.
If the container can't get the session object he assume the session was
passivated (and serialised).

If You enclose the method, which may throw a rollback exception, in a
try-catch block and throw a remote exception to the client, the client
should be able to connect the session bean again.

Andreas 

> -Original Message-
> From: Sternagel Annegret (PN-SYS/DAS)
> [SMTP:[EMAIL PROTECTED]]
> Sent: 07 May 2001 11:40
> To:   '[EMAIL PROTECTED]'
> Subject:  [JBoss-user] TRANSACTION ROLLBACK EXCEPTION:Could not
> activate
> 
> Hello,
> 
> I'm working with jboss 2.1 release version.
> 
> Every time we throw an exception to the client in our SessionBean
> afterwards
> another exception occurs:
> 
> [SubscriberDataSB] TRANSACTION ROLLBACK EXCEPTION:Could not activate;
> nested
> exception is: 
>   java.io.FileNotFoundException:
> D:\ApplicationServer\jboss\db\sessions\SubscriberDataSB\989226494357.ser
> (Das System kann die angegebene Datei nicht finden); nested exception is: 
>   java.rmi.NoSuchObjectException: Could not activate; nested exception
> is: 
>   java.io.FileNotFoundException:
> D:\ApplicationServer\jboss\db\sessions\SubscriberDataSB\989226494357.ser
> (Das System kann die angegebene Datei nicht finden)
> ...
> 
> Anybody has an idea about this ?
> 
> Bye
> Annegret
> 
> 
> The stacktrace of server.log shows
> - our created exception
> - the TRANSACTION ROLLBACK EXCEPTION on base of our exception
> - the problem TRANSACTION ROLLBACK EXCEPTION:Could not activate
> 
> 
> [SubscriberDataSB] [07.05.01 at 11:17:46:931] --
> com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean: Error
> [SubscriberDataSB] [07.05.01 at 11:17:46:931] 
> [SubscriberDataSB] javax.transaction.TransactionRolledbackException: null;
> nested exception is: 
> 
>   07.05.01 at 11:17:46:881 :  : no_message_available
> (severity=3 )
> [SubscriberDataSB] 07.05.01 at 11:17:46:881 :  : no_message_available
> (severity=3 )
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.coco.LasError.getEBException(LasError.java:113)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.eb.OAMEB.handleLasException(OAMEB.java:503)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.eb.AccessPortEBBean.readFromLas(AccessPortEBBea
> n.
> java:852)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.eb.OAMEB._bLoad(OAMEB.java:172)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.eb.AccessPortEBBean.ejbLoad(AccessPortEBBean.ja
> va
> :116)
> [SubscriberDataSB]at java.lang.reflect.Method.invoke(Native Method)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.BMPPersistenceManager.loadEntity(BMPPersistenceManag
> er
> .java:299)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchr
> on
> izationInterceptor.java:192)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInter
> ce
> ptor.java:186)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:13
> 3)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCM
> T.
> java:263)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
> 17
> 7)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> [SubscriberDataSB]at
> org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContaine
> rI
> nvoker.java:471)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:
> 14
> 6)
> [SubscriberDataSB]at $Proxy55.readAccessPortData(Unknown Source)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean.readSubscriberData(Subs
> cr
> iberDataSBBean.java:1095)
> [SubscriberDataSB]at
> com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean.readObjectData(Subscrib
> er
> DataSBBean.java:1051)
> [SubscriberDataSB]at java.lang.reflect.Method.invoke(Native Method)
> [SubscriberDataSB]at
> org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(Statefu
> lS
> essionContainer.java:570)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
> 17
> 7)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSe
> ss
> ionInstanceInterceptor.java:206)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:13
> 3)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCM
> T.
> java:263)
> [SubscriberDataSB]at
> org.jboss.ejb.plugins.TxInterceptorCM

Re: [JBoss-user] Need help to run a message bean; LookUp-call to get TopicConnecti onFactory fails.....

2001-05-07 Thread Peter Antman

You have two problems:

1. You need to have a jboss.jndi in your classpath somewhere, for jndi
   to understand that it should be using jnp, eg:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming

2. You are using the wrong name for a topic connection factory. Do this
   instead for example:

public class Main {
   public static void main(String arg[]) {
 try {
   // Get access to JNDI
  Context context = new InitialContext();
 
   // Lookup the managed connection factory for a topic
   TopicConnectionFactory topicFactory =
  (TopicConnectionFactory)context.lookup("TopicConnectionFactory"); //This is 
the real JNDI name
 ?


//Peter

On  7 Maj, Cecilie Aulesjord wrote:
> Hi! I really need assistance from You; can You help me understand how to set
> up connection factory in JBoss-2.2.1?:
> 
> I'm trying to get a simple Message Bean to work on JBoss-2.2.1. JDK1.3 is
> used.
> My client fails when it tries to lookup the connection factory; What must I
> do to get the client to recieve a connection factory? Must the XML
> config-files be updated with connection factory parameters?
> 
> 
> -
> The message bean is like the simple "HelloWorld MDB" in the JBoss
> documentation. The bean is OK deployed with this ejb-jar.xml:
> 
> 
>  JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'> 
>  
>
>  
>MDB
>test.bean.MDB
>
>Container
>
>  javax.jms.Topic
>  NonDurable
>
>  
>
>
>
>  
>
>  MDB
>  onMessage
>  
>   javax.jms.Message
>  
>
>Supports
>  
>
>  
> 
> -
> The Message Bean is deployed with this jboss.xml:
> 
> 
>  
>
> 
>  
>MDB
>Standard Message Driven
> Bean
>topic/testTopic
>  
>  
>  
>
>  
> 
> -
> I have this client that tries to send stuff to the message bean:
> 
> import javax.naming.*;
> import javax.jms.*;
> public class Main {
>   public static void main(String arg[]) {
> try {
>   // Get access to JNDI
>   Context context = new InitialContext();
> 
>   // Lookup the managed connection factory for a topic
>   TopicConnectionFactory topicFactory =
>  (TopicConnectionFactory)context.lookup("TOPIC_FACTORY"); //HOW DO I
> REGISTER THIS CONNECTION FACTORY?
> 
>   //Create a connection to the JMS provider
>   TopicConnection topicConnection =
> topicFactory.createTopicConnection();
> 
>   // Creat a topic session
>   TopicSession session = topicConnection.createTopicSession(false,
> Session.AUTO_ACKNOWLEDGE);
> 
>  // Lookup the destination you want to publish to
>  Topic topic = (Topic)context.lookup("topic/testTopic");
>  System.out.println("Topic set...");
> 
>  // Create a publisher
>  TopicPublisher pub = session.createPublisher(topic);
> 
>  // Create a message
>  TextMessage message = session.createTextMessage();
>  message.setText("Hello World!");
> 
>  // Publish the message
>  pub.publish(topic, message);
> 
>  // Close the stuff
>  session.close();
>  topicConnection.close();
>   }
> catch (Exception e) {
>   e.printStackTrace();
> }
>   }
> }
> 
> 
> -
> Sets this CLASSPATH before running the client:
> set
> CLASSPATH=D:\JBoss-2.2.1\client\ejb.jar;D:\JBoss-2.2.1\client\ejb.jar;D:\JBo
> ss-2.2.1\client\jnp-client.jar;D:\JBoss-2.2.1\client\jta-spec1_0_1.jar;D:\JB
> oss-2.2.1\client\jbossmq-client.jar;.;D:\JBoss-2.2.1\lib\ext\jms.jar;
> 
> When the Main-client is run this ERROR appears:
> 
> javax.naming.NoInitialContextException: Need to specify class name in
> environment or system property
> , or as an applet parameter, or in an application resource file:
> java.naming.factory.initial
> at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646)
> at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
> at
> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
> at Main.main(Main.java:31)
> 
> -
> 
> Best regards from
>   _
>   Cecilie Aulesjord
>   Developer
> 
>   Locus AS
>   Leif Weldingsv

[JBoss-user] TRANSACTION ROLLBACK EXCEPTION:Could not activate

2001-05-07 Thread Sternagel Annegret (PN-SYS/DAS)

Hello,

I'm working with jboss 2.1 release version.

Every time we throw an exception to the client in our SessionBean afterwards
another exception occurs:

[SubscriberDataSB] TRANSACTION ROLLBACK EXCEPTION:Could not activate; nested
exception is: 
java.io.FileNotFoundException:
D:\ApplicationServer\jboss\db\sessions\SubscriberDataSB\989226494357.ser
(Das System kann die angegebene Datei nicht finden); nested exception is: 
java.rmi.NoSuchObjectException: Could not activate; nested exception
is: 
java.io.FileNotFoundException:
D:\ApplicationServer\jboss\db\sessions\SubscriberDataSB\989226494357.ser
(Das System kann die angegebene Datei nicht finden)
...

Anybody has an idea about this ?

Bye
Annegret


The stacktrace of server.log shows
- our created exception
- the TRANSACTION ROLLBACK EXCEPTION on base of our exception
- the problem TRANSACTION ROLLBACK EXCEPTION:Could not activate


[SubscriberDataSB] [07.05.01 at 11:17:46:931] --
com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean: Error
[SubscriberDataSB] [07.05.01 at 11:17:46:931] 
[SubscriberDataSB] javax.transaction.TransactionRolledbackException: null;
nested exception is: 

07.05.01 at 11:17:46:881 :  : no_message_available
(severity=3 )
[SubscriberDataSB] 07.05.01 at 11:17:46:881 :  : no_message_available
(severity=3 )
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.coco.LasError.getEBException(LasError.java:113)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.eb.OAMEB.handleLasException(OAMEB.java:503)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.eb.AccessPortEBBean.readFromLas(AccessPortEBBean.
java:852)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.eb.OAMEB._bLoad(OAMEB.java:172)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.eb.AccessPortEBBean.ejbLoad(AccessPortEBBean.java
:116)
[SubscriberDataSB]  at java.lang.reflect.Method.invoke(Native Method)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.BMPPersistenceManager.loadEntity(BMPPersistenceManager
.java:299)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron
izationInterceptor.java:192)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:186)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:17
7)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[SubscriberDataSB]  at
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:471)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:14
6)
[SubscriberDataSB]  at $Proxy55.readAccessPortData(Unknown Source)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean.readSubscriberData(Subscr
iberDataSBBean.java:1095)
[SubscriberDataSB]  at
com.tenovis.oam.i33e050.as.sb.SubscriberDataSBBean.readObjectData(Subscriber
DataSBBean.java:1051)
[SubscriberDataSB]  at java.lang.reflect.Method.invoke(Native Method)
[SubscriberDataSB]  at
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulS
essionContainer.java:570)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:17
7)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess
ionInstanceInterceptor.java:206)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[SubscriberDataSB]  at
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:
326)
[SubscriberDataSB]  at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:381)
[SubscriberDataSB]  at java.lang.reflect.Method.invoke(Native Method)
[SubscriberDataSB]  at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[SubscriberDataSB]  at
sun.rmi.transport.Transport$1.run(Transport.java:142)
[SubscriberDataSB]  at
java.security.AccessController.doPrivileged(Native Method)
[SubscriberDataSB]  at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[SubscriberDataSB]  at
sun.rmi.t

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



[JBoss-user] Need help to run a message bean; LookUp-call to get TopicConnectionFactory fails.....

2001-05-07 Thread Cecilie Aulesjord

Hi! I really need assistance from You; can You help me understand how to set
up connection factory in JBoss-2.2.1?:

I'm trying to get a simple Message Bean to work on JBoss-2.2.1. JDK1.3 is
used.
My client fails when it tries to lookup the connection factory; What must I
do to get the client to recieve a connection factory? Must the XML
config-files be updated with connection factory parameters?


-
The message bean is like the simple "HelloWorld MDB" in the JBoss
documentation. The bean is OK deployed with this ejb-jar.xml:


http://java.sun.com/dtd/ejb-jar_2_0.dtd'> 
 
   
 
   MDB
   test.bean.MDB
   
   Container
   
 javax.jms.Topic
 NonDurable
   
 
   
   
   
 
   
 MDB
 onMessage
 
javax.jms.Message
 
   
   Supports
 
   
 

-
The Message Bean is deployed with this jboss.xml:


 
   

 
   MDB
   Standard Message Driven
Bean
   topic/testTopic
   
 
 
   
 

-
I have this client that tries to send stuff to the message bean:

import javax.naming.*;
import javax.jms.*;
public class Main {
  public static void main(String arg[]) {
try {
  // Get access to JNDI
  Context context = new InitialContext();

  // Lookup the managed connection factory for a topic
  TopicConnectionFactory topicFactory =
 (TopicConnectionFactory)context.lookup("TOPIC_FACTORY"); //HOW DO I
REGISTER THIS CONNECTION FACTORY?

  //Create a connection to the JMS provider
  TopicConnection topicConnection =
topicFactory.createTopicConnection();

  // Creat a topic session
  TopicSession session = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);

 // Lookup the destination you want to publish to
 Topic topic = (Topic)context.lookup("topic/testTopic");
 System.out.println("Topic set...");

 // Create a publisher
 TopicPublisher pub = session.createPublisher(topic);

 // Create a message
 TextMessage message = session.createTextMessage();
 message.setText("Hello World!");

 // Publish the message
 pub.publish(topic, message);

 // Close the stuff
 session.close();
 topicConnection.close();
}
catch (Exception e) {
  e.printStackTrace();
}
  }
}


-
Sets this CLASSPATH before running the client:
set
CLASSPATH=D:\JBoss-2.2.1\client\ejb.jar;D:\JBoss-2.2.1\client\ejb.jar;D:\JBo
ss-2.2.1\client\jnp-client.jar;D:\JBoss-2.2.1\client\jta-spec1_0_1.jar;D:\JB
oss-2.2.1\client\jbossmq-client.jar;.;D:\JBoss-2.2.1\lib\ext\jms.jar;

When the Main-client is run this ERROR appears:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property
, or as an applet parameter, or in an application resource file:
java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at Main.main(Main.java:31)

-

Best regards from
_
Cecilie Aulesjord
Developer

Locus AS
Leif Weldingsvei 6-8
P.O.Box 2087
N- 3202 Sandefjord
Norway
http://www.locus.no/
E-mail: [EMAIL PROTECTED]  
Phone:  +47 33 48 42 00
Direct: +47 33 48 42 15
Fax:+47 33 48 42 01
Mobile: +47 47 62 32 15
_


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



[JBoss-user] ClassCastException on forName ...

2001-05-07 Thread Cumps Jef

Hi all, 

i'm trying to acces a SQL Server database through a stateless session bean called DCS. 
When i execute the following code, i get a ClassCastException. And i can't figure out 
why !!

the driver is in my path and classpath, the name is checked and ok, ...

 code: 

try
{
String myDriver = "com.inet.tds.TdsDriver";
String url = "jdbc:inetdae7://onuris.groept.be?database=JFK_CarTracker";
String loginname = "name";
String password = "password";

Class.forName(myDriver);
Connection con = DriverManager.getConnection(url,loginname,password);

...

Does anyone has an idea of what i am missing ??? Any help would be really appreciated !

Jef Cumps

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



Re: [JBoss-user] EJB question

2001-05-07 Thread Ralph Jensen


- Original Message -
From: Jim Archer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 3:28 PM
Subject: Re: [JBoss-user] EJB question


> Or, if you want a sollution thats free and lots easier, look at your java
> SDK docs at java.rmi.server.UID class.
>
> One of the major critisims of EJB as it currently exists is that it can't
> take advantage of a databases "serial" or "autoincrement" field. Of
course,
> these all vary from database to database anyhow, and EJB is not even tied
> to a relational database.
>
That probably means that java.sql can't do it. Even if it could, that
wouldn't solve the problem with non-relational databases.

> So using a primary key generator is a necessity if you can't create your
PK
> from your data (maybe by combining other fields).
>
> Good luck!
> Jim
>

Actually, the original question came up in this context:

I am developing a collaborative application which stores the contributions
of participants in a database. These contributions could be text messages
or other objects, stored as blobs. None of the individual elements will be
useful as a primary key and thus I thought, why not let the database create
a unique key. My original question arose from the fact that an EJB needs to
know the primary key in order to return it and my assumption that I have to
call create(...) on an EJB in order to insert new data.

But I could also do it this way:

I have an EJB which represents one collaborative session - let's call it a
Conference. It represents a record in a table called conferenceTable. In
creation of this conference, all the issues discussed concerning uniqueness
of keys are relevant. But because I create that only once I may even
trouble the creator to enter a unique conference id. (Don't we all know it:
"Your userid isnt unique. Try again. Suggestion: 'mk$rtio237k'. :-)". Then,
during the session, participants will add a lot of information and that's
where I want to minimize the effort for creating unique keys.

I can add methods to my Conference bean like Conference.sendText( text,
client ) or Conference.sendOtherStuff( blob, client ) and then within these
methods do INSERTs into another table which hold the contributions of
participants, somehow like this:

Conference.sendText( text, client ){
   ...
   t_stamp = System.currentTimeMillis();
   INSERT INTO contributions( confID, text, client, timestamp ) VALUES
 conferenceID, text, client, t_stamp );
   ...
}


That means my ConferenceBean - which represents a record from the
conferenceTable - INSERTs data into another table.


That table could be created with an AUTOINCREMENT (or similar, depending on
the database) for the primary key and thus primary keys are generated
transparently by the database during the INSERT. But I don't need to know
it, because the INSERT is not performed in an ejbCreate() method and
doesn't need to be returned.

(In reality I will probably write a second EJB, which participants can use
but which does not allow access to all fields of the Conference record.)

Does that sound reasonable or am I in for trouble somewhere else?

Ralph


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



[JBoss-user] (no subject)

2001-05-07 Thread Felix Munoz

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] Re: Web modules started before EJB modules. Why?

2001-05-07 Thread Ralf Purnhagen

Done. BugID 421956.

Ralf

Scott M Stark wrote:
> 
> Enter it as a bug as sourceforge.
> 
> - Original Message -
> From: "Ralf Purnhagen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 04, 2001 9:01 AM
> Subject: [JBoss-user] Re: Web modules started before EJB modules. Why?
> 
> > Same at stopApplication. Would'nt it be more natural to first
> > undeploy web modules and then EJBs?
> >
> > Ralf
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > Hello everyone!
> > >
> > > Let's examine startApplication(...) in
> > > org.jboss.deployment.J2eeDeployer (Revision 1.20 or
> > > 1.21, JBoss 2.2.1 or CVS).
> > >
> > > It starts web modules (lines ca. 403), then it starts
> > > EJB modules (lines ca. 423).
> > > I didn't find any documentation that explains
> > > this choice of behaviour. Wouldn't it be more natural
> > > to start EJBs first?
> > > Then autorun servlets wouldn't receive
> > > javax.naming.NameNotFoundException due to not started
> > > EJBs.
> > >
> > > Please, enlight me :)
> > >
> > > Jason: Thanks for explanation and fix of the
> > > Handles :)
> > >
> > > Andris Birkmanis
> > >
> > > __
> > > Do You Yahoo!?
> > > Yahoo! Auctions - buy the things you want at great prices
> > > http://auctions.yahoo.com/
> > >
> > > ___
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

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



RE: [JBoss-user] EJB question

2001-05-07 Thread Jim Archer

Hal, were you able to find the actual source for this? I searched and 
searched last week with no luck...

Jim

--On Friday, May 04, 2001 8:33 AM -0400 "Deadman, Hal" 
<[EMAIL PROTECTED]> wrote:

> Take a look at the key generator that comes with Exolab's Castor
> (open-source). http://castor.exolab.org/key-generator.html
>
> You probably want something like their HIGH/LOW generator. I haven't used
> it but I use a similiar technique that I wrote myself. I like their
> implementation better because they let you use different key gen
> techniques that you can specify in the config file without changing code.
> They offer a max+1 option which you should stay away from b/c I don't see
> how that could guarantee uniqueness.
>
> The castor high/low generator uses a database but it grabs a range of
> values with each db hit so you don't hit the db everytime.
>
> Hal
>
>> -Original Message-
>> From: Ralph Jensen [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, May 04, 2001 7:27 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: [JBoss-user] EJB question
>>
>>
>> Thanks. But that is actually much more than I want. I only
>> need a unique
>> INT for primary keys.
>>
>> For the moment I will try this:
>>
>> In the sql-script:
>>
>> create table uniqueInteger(
>> pk INTEGER constraint pk_unique primary key,
>> uniqueID INTEGER
>> );
>>
>> insert into uniqueInteger VALUES( 1, 1 );
>>
>>
>> Then in the bean:
>> SELECT uniqueID from uniqeInteger;
>>
>> save uniqueID in variable ( let's call it 'uniqueVar' )
>>
>> then:
>>
>> UPDATE uniqueInteger SET uniqueID = uniqueVar+1 WHERE pk = 1;
>>
>>
>> I think that's basically Vinay's suggestion. Does that look
>> reasonable?
>> That's a lot of database access to get a unique primary key,
>> just to be
>> able to return it from ejbCreate() - especially in light of
>> the fact, that
>> databases do it automatically, if the table is created
>> accordingly. Isn't
>> this kind of thing done regularly?
>>
>>
>> I know this has nothing to do with jBoss. Thank you.  :-)
>>
>> Ralph
>>
>> - Original Message -
>> From: Jim Downing <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Friday, May 04, 2001 5:47 PM
>> Subject: Re: [JBoss-user] EJB question
>>
>>
>> > Check out www.activescript.co.uk for a non-free ($99) component to
>> generate
>> > unique ids. The author has also posted the pattern on
>> theserverside.com,
>> so
>> > you have something to work to if you want to implement it yourself.
>> >
>> > jim
>> >
>> > - Original Message -
>> > From: "Ralph Jensen" <[EMAIL PROTECTED]>
>> > To: <[EMAIL PROTECTED]>
>> > Sent: Friday, May 04, 2001 10:25 AM
>> > Subject: Re: [JBoss-user] EJB question
>> >
>> >
>> > > The portability would be there in terms of data access.
>> How to tell the
>> > > database to autoincrement when I create a table is probably always
>> > database
>> > > specific. Or not?
>> > >
>> > > I'm not good at SQL. So how would your suggestion look in
>> code? What
>> would
>> > > the key generator bean look like? Off which table would it work?
>> > >
>> > > Ralph
>> > >
>> > > - Original Message -
>> > > From: Vinay Menon <[EMAIL PROTECTED]>
>> > > To: JBOSS <[EMAIL PROTECTED]>
>> > > Sent: Friday, May 04, 2001 4:29 PM
>> > > Subject: Re: [JBoss-user] EJB question
>> > >
>> > >
>> > > Why don't you just use a primary key generator bean to
>> encapsulate the
>> key
>> > > genaration? The ejbCreate can then work off that ejb and
>> assign the
>> > primary
>> > > key field to the primary key generated field? so your
>> autoincrement
>> > > essentially will not be on the same table as the ejb but
>> a different
>> one
>> > > and the primary key generator will work off that table.
>> [Also makes
>> sure
>> > > that you have complete protability in terms of the
>> database server!]
>> > >
>> > > Vinay
>> > >
>> > >
>> > >
>> > > - Original Message -
>> > > From: Ralph Jensen
>> > > Sent: Friday, May 04, 2001 8:52 AM
>> > > To: [EMAIL PROTECTED]
>> > > Subject: [JBoss-user] EJB question
>> > >
>> > >
>> > > I asked this question elsewhere, but didn't get an answer. So:
>> > >
>> > > An entity bean's ejbCreate(...) method MUST return the
>> primary key.
>> That
>> > is
>> > > not a problem, if I specify the primary key myself and
>> pass it to the
>> > > create(...) method.
>> > >
>> > > But I want to let the database assign the primary key by
>> creating a
>> table
>> > > with an AUTOINCREMENT default for the primary key column,
>> like in this
>> > > example using Cloudscape (part of SUN's J2EE v1.3):
>> > >
>> > > create table myTable(
>> > >id INT DEFAULT AUTOINCREMENT CONSTRAINT pk_id PRIMARY KEY,
>> > >someString VARCHAR(6),
>> > >etc.
>> > > );
>> > >
>> > > Then I can use INSERT like this:
>> > >INSERT INTO mytable ( someString ) VALUES ( 'Hello' );
>> > >
>> > > The database then assigns a unique value to the id column
>> of that new
>> > > record.
>> > >
>> > > If I do this in the ejbCreate(...) method of my b

Re: [JBoss-user] EJB question

2001-05-07 Thread Jim Archer

Or, if you want a sollution thats free and lots easier, look at your java 
SDK docs at java.rmi.server.UID class.

One of the major critisims of EJB as it currently exists is that it can't 
take advantage of a databases "serial" or "autoincrement" field. Of course, 
these all vary from database to database anyhow, and EJB is not even tied 
to a relational database.

So using a primary key generator is a necessity if you can't create your PK 
from your data (maybe by combining other fields).

Good luck!
Jim


--On Friday, May 04, 2001 10:47 AM +0100 Jim Downing <[EMAIL PROTECTED]> 
wrote:

> Check out www.activescript.co.uk for a non-free ($99) component to
> generate unique ids. The author has also posted the pattern on
> theserverside.com, so you have something to work to if you want to
> implement it yourself.
>
> jim
>
> - Original Message -
> From: "Ralph Jensen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 04, 2001 10:25 AM
> Subject: Re: [JBoss-user] EJB question
>
>
>> The portability would be there in terms of data access. How to tell the
>> database to autoincrement when I create a table is probably always
> database
>> specific. Or not?
>>
>> I'm not good at SQL. So how would your suggestion look in code? What
>> would the key generator bean look like? Off which table would it work?
>>
>> Ralph
>>
>> - Original Message -
>> From: Vinay Menon <[EMAIL PROTECTED]>
>> To: JBOSS <[EMAIL PROTECTED]>
>> Sent: Friday, May 04, 2001 4:29 PM
>> Subject: Re: [JBoss-user] EJB question
>>
>>
>> Why don't you just use a primary key generator bean to encapsulate the
>> key genaration? The ejbCreate can then work off that ejb and assign the
> primary
>> key field to the primary key generated field? so your autoincrement
>> essentially will not be on the same table as the ejb but a different one
>> and the primary key generator will work off that table. [Also makes sure
>> that you have complete protability in terms of the database server!]
>>
>> Vinay
>>
>>
>>
>> - Original Message -
>> From: Ralph Jensen
>> Sent: Friday, May 04, 2001 8:52 AM
>> To: [EMAIL PROTECTED]
>> Subject: [JBoss-user] EJB question
>>
>>
>> I asked this question elsewhere, but didn't get an answer. So:
>>
>> An entity bean's ejbCreate(...) method MUST return the primary key. That
> is
>> not a problem, if I specify the primary key myself and pass it to the
>> create(...) method.
>>
>> But I want to let the database assign the primary key by creating a table
>> with an AUTOINCREMENT default for the primary key column, like in this
>> example using Cloudscape (part of SUN's J2EE v1.3):
>>
>> create table myTable(
>>id INT DEFAULT AUTOINCREMENT CONSTRAINT pk_id PRIMARY KEY,
>>someString VARCHAR(6),
>>etc.
>> );
>>
>> Then I can use INSERT like this:
>>INSERT INTO mytable ( someString ) VALUES ( 'Hello' );
>>
>> The database then assigns a unique value to the id column of that new
>> record.
>>
>> If I do this in the ejbCreate(...) method of my bean my problem is: How
>> do I know that value in order to return it? Is that possible?
>>
>> Thanks
>>
>> Ralph Jensen
>>
>>
>> ___
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/jboss-user clear=all>Get
>> your FREE download of MSN Explorer at > href="http://explorer.msn.com";>http://explorer.msn.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




I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I -
I took the one less traveled by,
And that has made all the difference.

- Robert Frost, 1916


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