Re: [JBoss-user] JBossCMP Change Column Names in CMR

2002-07-30 Thread Alex Loubyansky
You need to interchange key-fields for ejb-relationship-role's in jbosscmp-jdbc.xml. I.e. Role-Belongs-To-User roles role_name ... alex Wednesday, July 31, 2002, 1:45:57 AM, you wrote: PL> How do you change the column names for a table generated by a MAN

Re[2]: [JBoss-user] application security configuration

2002-07-30 Thread Alex Loubyansky
GSC> The problem that I have now is that it happens for EVERY method call to GSC> the bean instead of just the one that I have permissions set up for. GSC> Any clues? Are other methods marked as ? alex --- This sf.net email is sponsored by

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
Yes that is correct. Changing one name in a well known file vs changing 20 names, several of which where in archives is a lot easier. Come on, the time you spent fixing the testcases would have been at least an order of magnitude less. It actually would have been zero because I would have just cha

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread David Jencks
To make sure I understand what you are proposing... a global set of == and with some-string some-string is first looked up in the table as a symbolic name, and only if not found we try to use it as an object name. This would certainly make changing the half easier, but changing the symbo

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
The one aspect of the current mbean names I'm not happy with though is that it is equivalent to the EJB JNDI name rather than a symbolic reference. We have already suffered from a single name change breaking dependencies based on the mbean JMX ObjectName. It would be nice to use symbolic names lik

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
Looks like your right about that: If the MBean developer chooses to implement the MBeanRegistration interface, the following methods must be provided: + preRegister - This is a callback method that the MBean server will invoke before registering the MBean. The MBean will not be registered if any

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread David Jencks
I think the spec indicates that if you supply an object name when you create the mbean, that oejbct name overrides anything supplied by preRegister. So to make the preRegister ever do anything with names for mbeans from -service.xml files, we'd have to allow the -service.xml file to not specify t

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
I have to look further into it, to determine whether or not its a bug, or a design decision. When writing ServiceMBeans and using the ServiceMBeanSupport class, there is a method that allows you to override the objectName (getObjectName). This gets called inside the pre-register method. I

Re: [JBoss-user] JBossQL problem

2002-07-30 Thread Stephen Coy
Asif, Maybe you missed my subsequent message. Try your tests again, using the DISTINCT keyword. On Wednesday, July 31, 2002, at 02:26 AM, Asif R. Ahmed wrote: > All: > > Well I am not sure about other databases but Oracle and Mysql both do > not > require the Column to be in the select list

Re: [JBoss-user] anyone knows about this exception?

2002-07-30 Thread Holger Baxmann
if you where in the process of unplugging your stream from the object then spurious control-z (0x1a) may occur. try to disable the plug holder from getting a divorce from the jack by smoothing the invocation. if it happens anyway, do the plug-unplug cycle until the problem remains or the message b

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
How is that, a bug? Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Michael Stanley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 30, 2002 3:25 PM Subject: Re: [JBoss-user] MBean interf

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> Then override the name in preRegister. Having to specify a name > in the mbean service descriptor does not prevent this does it? Yup. > > > Scott Stark > Chief Technology Officer > JBoss Group, LLC > > - Original Message - > From: "

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> You have to generate a jboss-service.xml anyway to put in the .sar to get > the mbean deployed, so use the xdoclet -service.xml file generator to > generate it for you. It already includes the mbean name specified in the > @jmx.mbean tag. If you want attributes, make xdoclet generate them also

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> preRegister is called immeadiately after creation of the mbean. This > is well before the first JBoss mbean service life cycle event and so > there is no chance the name can be based on the attributes of an mbean > you depend on. I see no point to allowing JBoss mbean services > to be defined wi

[JBoss-user] JBossCMP Change Column Names in CMR

2002-07-30 Thread Peter Luttrell
How do you change the column names for a table generated by a MANY-to-MANY CMR? Here's an example of what i've tried: ejb-jar.xml: User-Roles User-has-multiple-Roles Many Users

[JBoss-user] anyone knows about this exception?

2002-07-30 Thread Sheng Zou
Title: anyone knows about this exception? java.io.StreamCorruptedException: Caught EOFException while reading the stream header     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:845)     at java.io.ObjectInputStream.(ObjectInputStream.java:168)     at org.jnp

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread David Jencks
You have to generate a jboss-service.xml anyway to put in the .sar to get the mbean deployed, so use the xdoclet -service.xml file generator to generate it for you. It already includes the mbean name specified in the @jmx.mbean tag. If you want attributes, make xdoclet generate them also. david

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> Yes, depends has to be an ObjectName and it cannot have a pattern. Ok. > The point > of notification is one of many in the life cycle and is all that has been > needed > so far. Additional notifications could be added so that you could wait for > the > right state. Understood. but don't you

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
Then override the name in preRegister. Having to specify a name in the mbean service descriptor does not prevent this does it? Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Michael Stanley" <[EMAIL PROT

Re: [JBoss-user] application security configuration

2002-07-30 Thread Gary S. Cuozzo
Thanks. I actually had just tried that right before receiving your email and made some progress. So I now get: 17:11:29,440 ERROR [SecurityInterceptor] Authentication exception, principal=null as I would expect. The problem that I have now is that it happens for EVERY method call to the

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
I'm currently building a system that requires plugins. We have a plugin development kit that allows developers to quickly write plugins without having to worry about deployment configuration information. The plugin developer simply implements the interface (or subclasses some abstract support

Re: [JBoss-user] DynamicQL Problem

2002-07-30 Thread Greg Turner
OK. I saw a message in log file that my bean was not bound because it did not have local interfaces, even though it was being bound with its remote interfaces. So I added some local interfaces, and voila, it worked, but with a very strange twist. This is all running in same JVM, JBoss 3.0.0

Re: [JBoss-user] application security configuration

2002-07-30 Thread Scott M Stark
See the security units tests for an example of how to dynamically add login configurations. In particular the SecurityConfigMBean that is included in the security-spec.sar in the security-spec.jar. Else you have to use the static server//login-config.xml file. Scott Stark

Re: [JBoss-user] application security configuration

2002-07-30 Thread David Jencks
I think you have to use the single login-conf.xml file in server/[conf-name]/conf david jencks On 2002.07.30 16:16:19 -0400 Gary S. Cuozzo wrote: > Hello all, > I'm at the point of configuring security parameters for my app and have > a few questions. > > I ultimately want to use the DatabaseS

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
preRegister is called immeadiately after creation of the mbean. This is well before the first JBoss mbean service life cycle event and so there is no chance the name can be based on the attributes of an mbean you depend on. I see no point to allowing JBoss mbean services to be defined without a na

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread David Jencks
This might be possible, but I don't see a use case or any value to allowing this. Can you explain why you would go to the trouble of writing down the configuration for a single mbean in a configuration file without knowing its object name? david jencks On 2002.07.30 16:23:02 -0400 Michael Stanl

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> Yes, depends has to be an ObjectName and it cannot have a pattern. hmm... The example I showed previosuly using the pattern, seems to be working. > ObjectNames are fixed at registration/creation time. If you need an mbean > that is so dynamic that its name is not known until it is to be regi

[JBoss-user] application security configuration

2002-07-30 Thread Gary S. Cuozzo
Hello all, I'm at the point of configuring security parameters for my app and have a few questions. I ultimately want to use the DatabaseServerLoginModule and authenticate via a web-app, but have been trying some of the simpler modules just to get started. So far I have not been successful.

RE: [JBoss-user] Type mappings

2002-07-30 Thread JD Brennan
Title: RE: [JBoss-user] Type mappings That would be cool.  Then I could have one EJB jar that would support multiple databases by undeploying/redeploying a mbean with my type mapping. JD -Original Message- From: David Jencks [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002

Re: [JBoss-user] JBoss & Tomcat

2002-07-30 Thread Peter T. Abplanalp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Jul 30, 2002 at 11:54:38AM -0700, Scott M Stark wrote: > That is correct. It uses the configuration embedded in the > tomcat4-service.xml > descriptor. thanks for the reply! i am unable to find a tomcat4-service.xml in the jboss directory st

[JBoss-user] RE: JMS and Tibco

2002-07-30 Thread McKnight, David
You need some kind of adapter, whether you buy it from tibco or build it yourself in java using the rv api. It will basically listen for a jms message and republish a tibco message, and vice versa. Not sure if it would be a bean, or if it would be a stand-alone daemon. My guess is it would be a da

RE: [JBoss-user] JBoss & Tomcat

2002-07-30 Thread Enrique Vetere
Tomcat's server.xml is not used. jBoss quick start explains that you have to configure some attributes in the Catalina plugin. Enrique Vetere --- Baufest http://www.baufest.com Phone: 11-4807-8080 Av. Las Heras 3257 (C1425ASJ) Buenos Air

[JBoss-user] SFSB Clustering

2002-07-30 Thread Jerry Smith
Hi all, I've been playing with the clustering for a bit now using JBoss3.0.1RC1. I've got a 2 node cluster with a SFSB that is clustered, here's something I'm seeing: 1. Node A and B are brought up fine and see each other. 2. I hit my app and see my SFSB message call on A. 3. I kill A, hit my

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
Yes, depends has to be an ObjectName and it cannot have a pattern. The point of notification is one of many in the life cycle and is all that has been needed so far. Additional notifications could be added so that you could wait for the right state. ObjectNames are fixed at registration/creation

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
Cool. Thanks I have things working now. Very nice. Question on the depends: Does the value of the element have to be the ObjectName? And if so can it be a pattern, or does it have to be the full name? for example - is something like this legal -> *:EJBModule=MyEJB.jar,* Thanks again for

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
Also, is there a way to dynamically set the ObjectName (like in preRegister), or is this something that always needs to be done in the declaration? Mike Scott M Stark wrote: > No, the best way to add an mbean for your ejb is to include an > mbean in your ear that has a dependency on the ejb.

Re: [JBoss-user] JBoss & Tomcat

2002-07-30 Thread Scott M Stark
That is correct. It uses the configuration embedded in the tomcat4-service.xml descriptor. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Peter T. Abplanalp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Se

[JBoss-user] JBoss & Tomcat

2002-07-30 Thread Peter T. Abplanalp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi all. i am trying to integrate jboss/tomcat with apache and after some research have come to the conclusion that the tomcat in jboss/tomcat does not use the server.xml file in ~jboss/catalina/conf. has anyone else noticed this? am i missing someth

Re: [JBoss-user] Integrating Non-JMS Messaging with JBoss

2002-07-30 Thread Dan Christopherson
You could pretty easily build an MBean to run your listeners. However, the JMS approach isn't actually that difficult (we've done this - I'll send more details in a private email) a top-notch developer who knows the specs could get this done in a month or say, maybe quicker. Either way, I'd wr

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
No, the best way to add an mbean for your ejb is to include an mbean in your ear that has a dependency on the ejb. If you don't already have a doc subscription go and get one as it has a draft of the 3.0 admin and devel manual that talks about the JBoss mbean extension that supports a richer servi

Re: [JBoss-user] A CMR collection may only be used within the transction in which it was created

2002-07-30 Thread Alex Loubyansky
Hello Bertrand, it's not a problem. It's rule. Do you really use cmr collections in a transaction that didn't create them? Tuesday, July 30, 2002, 6:43:55 PM, you wrote: BP> Hi, BP> I have a problem with my CMP entity bean with 1:N relation BP> Deployement is ok, but when I want use a relation

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread David Jencks
I'm a little confused. Are you talking about stateless session beans here? I'll assume you are using a jboss 3 version and know about the jboss mbean service lifecycle. I think what you want to do is create a mbean for each stateless session bean you wish to have access to and include a depends

[JBoss-user] Integrating Non-JMS Messaging with JBoss

2002-07-30 Thread Robert Martin
Hi - We're using a messaging product called TIBCO Rendevous that I would like to integrate with an application running on the JBoss server. TIBCO does have a JMS product but we have decided not to use it for cost reasons. My question is - what is the best way to integrate non-JMS messaging w

RE: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Lucas McGregor
I have an open source project that pretty much does this. It startes a JMX agent with an HTML Adaptor so you can access all the MBeans via a web browser. I have built some objects that will use your jndi.properties file to locate your EJB application server, then they will transverse your jndi tr

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
Let me add, that I figured the best way to do this would be to listen for Deployment Notifications, then I would be able to look up the newly registered ObjectNames for the deployed EJB's. This would allow me to determine the JNDI name, get a copy of its Local Interface and invoke methods bas

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
First let me thank you for your help. I'm still a little confused. > Create your own mbean that simply invokes methods on the > EJB through its remote or local interfaces. I still have to manually register this Mbean however correct? Or will it be detected and registered automatically on de

Re: [JBoss-user] JBossQL problem

2002-07-30 Thread Asif R. Ahmed
All: Well I am not sure about other databases but Oracle and Mysql both do not require the Column to be in the select list if you want to order by that. I just ran test on both Oracle 8i and Mysql 3.23.51 version both work fine if the order by column is not in the select statement. -Asif Rafiq

Re: [JBoss-user] Multiple datasources

2002-07-30 Thread David Jencks
You can put all the configurations into one file. You just need to make sure all the jndi names are unique and all the object names of the mbeans are unique. In 3.1 (cvs head) there is a much simpler configuration system starting with -ds.xml files. The same rules apply there, you can put as ma

Re: [JBoss-user] JBoss.net installation/configuration help!!!

2002-07-30 Thread David Jencks
Starting jboss like bin/run.sh -c all uses the configuration including jboss.net. There are some tests of jboss.net functionality in the testsuite, other than that I don't know much about it. david jencks On 2002.07.30 10:46:22 -0400 "Akbar, Wasif" wrote: > I am little new to JBoss and to J2

[JBoss-user] A CMR collection may only be used within the transction in which it was created

2002-07-30 Thread Bertrand PAQUET
Hi, I have a problem with my CMP entity bean with 1:N relation Deployement is ok, but when I want use a relation method, I have the error 17:11:46,279 ERROR [STDERR] java.lang.IllegalStateException: A CMR collection may only be used within the transction in which it was created Does anybody know

RE: [JBoss-user] RE: MS SQL XA driver (was: "You are not getting the semantics you expect" warning)

2002-07-30 Thread Burns, Jamie
This thread seems to have got split into 2 or 3 threads. I thought l had posted replies to this thread but they have ended up under http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg19277.html instead of http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg19302.html A

Re: [JBoss-user] JMS - Adding a message in transaction

2002-07-30 Thread Leon Doud
Thanks, that fixed it! --- Igor Fedorenko <[EMAIL PROTECTED]> wrote: > Leon Doud wrote: > > We have an application that updates a database and > > creates JMS messages within one transaction. If > one > > or the other fails both should be rolled back. > > > > > > Both the database updates an

[JBoss-user] Multiple datasources

2002-07-30 Thread Enrique Vetere
Hi,     I've successfully configured a datasource to MS SQL 2000. How do I configure many datasources (with same driver) to different databases? Should I make multiple copies of mssql-service.xml and change parameters? Thanks   Enrique Vetere-

[JBoss-user] FW: JBoss.net installation/configuration help!!!

2002-07-30 Thread Akbar, Wasif
Figured this out, thanks again. wasif > -Original Message- > From: Akbar, Wasif > Sent: Tuesday, July 30, 2002 10:46 AM > To: '[EMAIL PROTECTED]' > Subject: JBoss.net installation/configuration help!!! > > I am little new to JBoss and to J2EE as well. I recently downlo

Re: [JBoss-user] JMS - Adding a message in transaction

2002-07-30 Thread Igor Fedorenko
Leon Doud wrote: > We have an application that updates a database and > creates JMS messages within one transaction. If one > or the other fails both should be rolled back. > > > Both the database updates and the JMS messages are > done within one method of a session bean (there are a > coupl

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
Create your own mbean that simply invokes methods on the EJB through its remote or local interfaces. If you want untyped invocations call the EJB container mbean. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - F

[JBoss-user] JBoss.net installation/configuration help!!!

2002-07-30 Thread Akbar, Wasif
I am little new to JBoss and to J2EE as well. I recently downloaded and installed JBoss 3.0.1. I am trying to integrate JBoss.net into this, however I was told that JBoss 3.0.1 already comes with the JBoss.net components and it's just a matter of 'turning them on'. I am not sure how to go ab

[JBoss-user] JMS - Adding a message in transaction

2002-07-30 Thread Leon Doud
We have an application that updates a database and creates JMS messages within one transaction. If one or the other fails both should be rolled back. Both the database updates and the JMS messages are done within one method of a session bean (there are a couple of these session beans, each wi

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
> All EJBs are all ready DynamicMBeans. See the org.jboss.ejb.Container class. I see.. How can I (or where should I) override the implementation of some of these methods like preRegister? How should I add more attributes and operations? Mike > > > Scott Stark > Chie

Re: [JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Scott M Stark
All EJBs are all ready DynamicMBeans. See the org.jboss.ejb.Container class. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Michael Stanley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, Jul

[JBoss-user] MBean interfaces to EJBs

2002-07-30 Thread Michael Stanley
What is the best approach to adding MBean interfaces to your ejb's? More importantly, is there a way to have these MBeans registered automatically on ejb deployment? Thanks, -- --- This sf.net email is sponsored by: Dice - The leading o

Re: [JBoss-user] "Unpack WAR" option w/ Tomcat

2002-07-30 Thread Burkhard Vogel
Yep, this has been around a thousand times... The easiest way is to simply extract your war into the server/default/deploy/ dir. If you made changes simply touch the deployment descriptor and JBoss will redeploy hth, Burkhard - Original Message - From: "Brian Topping" <[EMAIL PROTECTED]> T

Re: [JBoss-user] "Unpack WAR" option w/ Tomcat

2002-07-30 Thread Scott M Stark
jboss-3.0.1RC1 comes with an example of an unpacked war, see jboss-3.0.1RC1/server/default/deploy/jmx-console.war/ Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Brian Topping" <[EMAIL PROTECTED]> To: "JB

Re: [JBoss-user] isUserInRole returning incorrect boolean under load

2002-07-30 Thread David Ward
I've submitted the bug here: http://sourceforge.net/tracker/index.php?func=detail&aid=588537&group_id=22866&atid=376685 Thanks Scott, David -- Scott M Stark wrote: > There was a threading bug fixed in 2.4.7 and 3.0 regarding user identity > so post a bug to sourceforge with the example and I'l

Re: [JBoss-user] javax.management.QueryExp Woes

2002-07-30 Thread Adrian Brock
If we could get rid of jmxri.jar the queries and other jmx satellite services could live in the Unified ClassLoader space. Definitley a bug as it stands. Regards, Adrian >From: "Scott M Stark" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: Re: [JBoss-user] j

Re: [JBoss-user] FireBird & JBoss

2002-07-30 Thread David Jencks
What you attached won't work because you have 2 mbeans with the same name. Either comment out the FBManaged mbean entirely or leave it with its unique object name and give it server and port attributes. Without the interference, the ConnectionManager mbean looks ok to me. david jencks On 2002.

Re: [JBoss-user] FireBird & JBoss

2002-07-30 Thread Stephen Davidson
Hi David. Have you checked in an updated sample yet? The attached sample, which I believe has your suggested changes, still does not work for me. I get an "Incomplete Deployment" error, using the rar file supplied by the Firebird project. Thanks, Steve David Jencks wrote: > On 2002.07.28 09

[JBoss-user] "Unpack WAR" option w/ Tomcat

2002-07-30 Thread Brian Topping
Hiyas, I suppose this question has been asked a thousand times and I am just not finding it, but is there a way to have the 3.x/Tomcat deployer unpack my WAR and run from there? I'd like to be able to make changes to view components on a running development system without having to redeploy the

RE: [JBoss-user] CMP Deployment with

2002-07-30 Thread Brian Topping
Dain, Burkhard, I think these solutions are both excellent, just being able to execute arbitrary SQL is fine, it doesn't have to be a script. In the mean time, I'll investigate building a mbean. Thanks guys, -b > -Original Message- > From: Dain Sundstrom [mailto:[EMAIL PROTECTED]] > S

RE: [JBoss-user] RE: MS SQL XA driver (was: "You are not getting the semantics you expect" warning)

2002-07-30 Thread Burns, Jamie
I am not getting any "You are not getting the semantics you expect" messages in the log now that l am using SQLServerDataSource. Thanks This electronic mail system is used for information purposes and is

Re: [JBoss-user] RE: MS SQL XA driver (was: "You are not getting the semantics you expect" warning)

2002-07-30 Thread Burns, Jamie
Found my problem which has left me feeling very red faced. I put the code from my standalone test class that listed the class heirarchy for com.microsoft.jdbcx.sqlserver.SQLServerDataSource into XAManagedConnectionFactory and compared the results. It turns out l was using a pre v2.2patch1

Re: [JBoss-user] Clustering: Possible to use a "backplane" to connect the servers??

2002-07-30 Thread Holger Baxmann
but at all, mind the gap! ... if you are the generating pk with your ejb's for example in a PrimaryKeyGenerator and not database based like through triggers or 'autoincrement' and the clustering fails on one interface, but all nodes are still alive ... bax - Original Message - From: "Sac